Questions tagged [runtime]

Questions that have to do with the FRAME runtime

Filter by
Sorted by
Tagged with
1 vote
1 answer
35 views

How does parachain upgrade works?

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 ...
Данила Алексеев's user avatar
2 votes
0 answers
15 views

Is it possible to register parathread with compact.compressed wasm file

In official guides they use wasm built with export-genesis-wasm command to register a parathread/parachain: https://youtu.be/BaWcQxKRFmM?t=134 https://docs.substrate.io/tutorials/build-a-parachain/...
Данила Алексеев's user avatar
1 vote
1 answer
63 views

What are the risks of panicking inside an extrinsic call?

Let's imagine the following extrinsic. #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::might_panic_extrinsic())] pub fn might_panic_extrinsic(origin: OriginFor<T>) -> DispatchResult {...
clst's user avatar
  • 11
0 votes
1 answer
35 views

How to parse a raw signature from PolkadotJS in Substrate runtime

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 ...
Drew Stone's user avatar
  • 1,164
2 votes
0 answers
15 views

when will `‘Balances::transfer' will be removed` take into effect on main-net?

In this link Balances::transfer will be removed it say 'transfer' is deprecated. I have experienced this change on test-net and fixed my Dapp after got failure report. But when does it take into ...
breeze wang's user avatar
1 vote
0 answers
37 views

How do I monitor runtime upgrades with sidecar?

We need to monitor the spec version of the block, that is, the runtime upgrade. Of course, we know that openGov's suggestions will determine the upgrade. So we're going to run this guide to monitor ...
hs1228's user avatar
  • 45
2 votes
0 answers
29 views

What is the rationale behind the node architecture (Runtime + Host)

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?
user2862's user avatar
  • 309
0 votes
0 answers
15 views

Why can't runtime APIs have default implementations?

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. Why is this not possible?
liamaharon's user avatar
2 votes
1 answer
73 views

Reusing old Pallet Instance Number

This may come out nonsensical but I'll ask it anyway. construct_runtime!( pub enum Test { System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0, ...
Jitterbug's user avatar
  • 219
2 votes
1 answer
22 views

How come SignedExtra satisfies SignedExtension trait bound in substrate runtime?

In substrate runtime, https://github.com/paritytech/polkadot-sdk/blob/f60318f68687e601c47de5ad5ca88e2c3f8139a7/substrate/bin/node/runtime/src/lib.rs#L2106C10-L2106C21 pub type SignedExtra = ( // ...
akhil nichenametla's user avatar
0 votes
0 answers
16 views

What is the usecase of `PassBy` trait bound

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 ...
vedhavyas's user avatar
  • 155
0 votes
0 answers
12 views

Standalone Runtime

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. ...
Saman H. Pasha's user avatar
0 votes
1 answer
19 views

How do I cargo expand a non-compiling runtime?

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. Any tips?
Squirrel's user avatar
  • 3,769
0 votes
0 answers
18 views

thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped)

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 ...
BlockBird's user avatar
2 votes
0 answers
27 views

wasm compilation for later rust versions

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/...
cocokick's user avatar
  • 165
1 vote
1 answer
43 views

How to Add and configure Democracy Pallet to Substrate Runtime

I've made an attempt to incorporate the "pallet-democracy" into my Substrate runtime. In the runtime/Cargo.toml file of my Substrate node template, I've added the following configuration: ...
Ariful Islam's user avatar
1 vote
1 answer
39 views

Two different Assets Pallet instance for pallet_asset_conversion Pallet

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: impl ...
ZKT's user avatar
  • 103
0 votes
1 answer
72 views

Cycle detected when computing layout of `RuntimeCall`

My pallet is using the following frame pallets: Democracy, Utility & Collective. The error I get is: cycle used when elaborating drops for `<impl at /home/kazu/Polkadot/fair-squares/runtime/src/...
Kazunobu Ndong's user avatar
0 votes
0 answers
15 views

`sp_io::crypto::ed25519_batch_verify` was removed amid Polkadot 0.9.39 and 0.9.43. What is replacement in Runtime?

We useded25519_batch_verify in runtime from sp_io::crypto mod. sp_io::Crypto and Verify traits require self, but I cannot find implementation. In substrate primitives core I see verify calling fn ...
Dzmitry Lahoda's user avatar
1 vote
1 answer
30 views

How to entirely clear a pallet storage on a living chain?

Would it be possible to clear a pallet storage with a call on a live chain ? Precisely I would like to remove all contracts and code hash existing on my chain (as sudo).
SailorSnoW's user avatar
0 votes
1 answer
21 views

Error in deploying call_runtime contract from ink!

I am running 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 ...
Ganesh11's user avatar
  • 1,208
0 votes
0 answers
22 views

Can a Substrate Runtime bulk-read many storage keys at once?

This question is about the Substrate host functions and storage implementation and is not specific to FRAME (although relevant FRAME-related information is welcome). Imagine that the runtime knows it ...
JoshOrndorff's user avatar
  • 1,125
3 votes
1 answer
37 views

How to avoid double work when building with srtool

I'm integrating 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 and run cargo build to get the client. But ...
Maksim Ramanenkau's user avatar
0 votes
0 answers
21 views

After runtime upgrade council proposals calls becomes <unknown>

We experienced an issue where we had a motion open before upgrading our runtime, after this upgrade this motion became "uncloseable". When inspecting the chainstate for the council, ...
Dylan Verstraete's user avatar
0 votes
1 answer
45 views

Error transfering "Arithmetic: Underflow"

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/...
Dylan Verstraete's user avatar
5 votes
2 answers
77 views

Understanding the Use Case of `saturating_inc()`

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. Upon examining the saturating_inc() function, I found the ...
ALeSD's user avatar
  • 469
3 votes
0 answers
36 views

Filter pallet call by origin

Is there a way to access the call origin when using BaseCallFilter from frame_system::Config? Something like: // Disallow any call to a given pallet pub struct CallFilter; impl frame_support::traits::...
Rodrigo Quelhas's user avatar
1 vote
0 answers
56 views

Is 'Ran out of free Wasm instances' a bad symptom?

I develop a custom chain based on Substrate. The chain business logic involves stateful sessions where the state is managed through Http and unsigned transactions submitted via Offchain workers. Until ...
Yury Yukhananov's user avatar
1 vote
1 answer
31 views

Error WrongProposalWeight when proposing a runtime upgrade using the council

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. On an earlier ...
Dylan Verstraete's user avatar
1 vote
1 answer
39 views

Db weights in Runtime

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 ...
lime's user avatar
  • 111
4 votes
1 answer
27 views

ModuleError, BadState

Setup I'm currently integrating staking functionality into my pallet. Here is a snipped of the relevant part: let who = ensure_signed(origin.clone())?; let required_stake = T::RequiredStake::get(); ...
Mathis Wellmann's user avatar
0 votes
2 answers
52 views

duplicated sessionkey

In polkadot.js staking , when i put the session key, the result is "duplicated session key" I use the command in SSH "echo '{"id":1,"jsonrpc":"2.0","...
jay p's user avatar
  • 61
3 votes
2 answers
44 views

Substate node not compiling on Archlinux

Recently anytime i try to run substrate-node i get this error message, all attempts to update packages hasn't been helpful Error: Service(Client(VersionInvalid("cannot deserialize module: ...
Abimbola Adebayo's user avatar
6 votes
1 answer
44 views

Parachain support for light clients

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....
user2862's user avatar
  • 309
3 votes
1 answer
17 views

Query chain for types in a storagemap

I want to get the meta function description of pallets storage maps. Returning an output like this: { Twox64Concat, [u8; 16], u32 } = query.storagemap(pallet: "template", storagemap: "...
flipchan's user avatar
  • 319
3 votes
1 answer
92 views

Is it possible to use a flat structure storage in the Runtime?

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 ...
Dan's user avatar
  • 31
2 votes
1 answer
234 views

1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable`

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 ...
Arunjot Singh's user avatar
2 votes
0 answers
56 views

Why Hosts set storage information directly and not through the Runtime

Why Host set storage information directly and not through the Runtime api? (e.g. Grandpa Authorities, Accounts, Code, Heap_Pages) Is this an expected behavior or legacy?
user2862's user avatar
  • 309
4 votes
0 answers
56 views

What is the core functionality (pallets) that should be part of the specification

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. So we ...
user2862's user avatar
  • 309
4 votes
1 answer
48 views

offchain-workers vs asynchronous task

There is not much info about using an asynchronous task in substrate docs i.e. task_manager in service.rs I want to know when one should be using offchain-worker and when one should use background ...
Rusty Pythonic Script's user avatar
4 votes
1 answer
34 views

What is the best practice to change on-chain storage from asynchronous task?

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? Thanks
Rusty Pythonic Script's user avatar
4 votes
1 answer
44 views

Change state from a task

I have a asynchronous task running in service.spawn_essential_task(task). Which does some stuff and wants to write data in storage. How can i achieve this? Changing state by making runtime_apis to ...
Guest's user avatar
  • 43
1 vote
1 answer
109 views

How to interact substrate node with reactjs frontend?

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 ...
Ganesh11's user avatar
  • 1,208
1 vote
1 answer
42 views

What's the difference between the runtime Block type and the opaque::Block type?

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.. : // runtime/src/lib.rs pub type Block = ...
Purple_Turtle's user avatar
3 votes
1 answer
57 views

How to filter extrinsics senders?

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? We could ...
Данила Алексеев's user avatar
5 votes
2 answers
59 views

Is there a canonical resource describing when migrations are needed

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. But when else? Is there a ...
gatsey's user avatar
  • 183
2 votes
2 answers
78 views

Calling std-based host function from a pallet

Based on: Use std only rust library to extend substrate runtime interface? How to understand [runtime-interface] and `Externalities`? I understand that I should be able to: have a crate that is not ...
pmikolajczyk41's user avatar
2 votes
2 answers
79 views

How to integrate Fellowship

I'm trying to integrate Fellowship in this PR according to https://github.com/paritytech/polkadot/pull/5205, but when I run make check-all it gives the following error: error[E0277]: the trait bound `...
Sora's user avatar
  • 41
2 votes
0 answers
27 views

no matching package named `sc-network-statement` found

sc-network-statement = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } I am using this package from substrate ...
Ganesh11's user avatar
  • 1,208
0 votes
1 answer
60 views

epoch_config must not be None

This is my substrate-code. Running cargo build --release works fine but while starting node using ./target/release/node-template --dev, I get this error. Thread 'main' panicked at 'epoch_config must ...
Ganesh11's user avatar
  • 1,208

1
2 3 4 5