Questions tagged [runtime]
Questions that have to do with the FRAME runtime
258
questions
0
votes
0
answers
10
views
Modifying storage and calling extrinsics for overhead benchmark
I am trying to implement the Overhead benchmark command for our parachain
Here is the code I have already:
BenchmarkCmd::Overhead(cmd) => runner.sync_run(|config| {
...
1
vote
1
answer
26
views
Invalid JSON blob: unknown field `allianceMotion`
I am trying to generate raw json file but encounter with this error
./target/release/dip-consumer-node-template build-spec --chain plain-parachain-chainspec.json --disable-default-bootnode --raw > ...
4
votes
2
answers
70
views
Alternative to BlakeTwo256 for WASM Compatibility in a no_std Environment in Rust
I'm developing a Rust script that I need to convert to WebAssembly (WASM). In this script, I'm using the BlakeTwo256 hasher, which is imported from the sp_runtime crate. However, I'm unable to compile ...
0
votes
0
answers
27
views
How can I enable the proof size recorder during runtime testing?
I am attempting to enable and utilize the proof_size recorder host function in the runtime, but I am stuck in the runtime testing.
The default TestExternalities does not enable the recorder, so I ...
0
votes
1
answer
9
views
What is the proper way to replace a pallet with an entirely new one in a runtime migration?
We have pallet_xyz and we want to replace it with pallet_abc at the exact same pallet index, i.e. just removing one and replacing the other. What's the proper way to migrate this?
More specifically, ...
0
votes
1
answer
10
views
Should the runtime version be included in the block header by default?
If I retrieve a block and want to decode it, I have to know what version of the runtime's metadata to use. With only having the block header (or maybe the full block) is there any way I can decode it ...
1
vote
1
answer
38
views
Runtime Upgrade with Block Time Change Stops Block Production
I am performing a runtime upgrade for my Substrate-based blockchain, specifically changing the block time from 6 seconds to 1 second. The upgrade is executed successfully using the set_code function, ...
0
votes
0
answers
11
views
Runtime Upgrade from standard Node Template to Frontier Template Node
I’m curious, is it possible to do a runtime upgrade that also adds EVM functionality?
Currently my project has a solochain that is already public and we’d like to integrate EVM functionality/...
0
votes
0
answers
36
views
Can't sync with network
We have a solochain testnet running with a lot of users. Our nodes managed by us yet. Some blocks ago the nodes stopped producing new blocks, because of a crash in a pallet. The pallet was from ...
0
votes
1
answer
18
views
Suddenly TransactionPaymentApi_query_info is generating wasm errors at block height 21455372 (maybe runtime 1.2.5?)
I was using the following JSON-RPC method to hit query_info, but suddenly got a wasm error from today. Is this an effect of the runtime update?
If so, what changes are needed?
% curl -H "Content-...
2
votes
0
answers
23
views
How to build `CheckMetadataHash` extension in tests?
After thoroughly following the guide to enable the metadata hash and looking through the Polkadot SDK, I unfortunately still fail to verify extrinsics in my integration tests which have ...
0
votes
1
answer
29
views
What are `RuintimeFreezeReason` and `RuntimeHoldReason`?
What are they, and how do we determine their values (based on what)?
What will happen if I left them as Runtime*Reason = ()?
Additionally, I noticed there are MaxFreezes and MaxHolds. Since MaxHolds ...
0
votes
1
answer
14
views
Missing Benchmark Helper in Implementation
When building the polkadot runtime in https://github.com/polkadot-fellows/runtimes
using
cargo build --profile production --features runtime-benchmarks
i encounter this error every time.
error[E0046]:...
0
votes
1
answer
19
views
How to Funnel All Runtime Calls Through a Custom Pallet in Substrate?
I’m developing a Substrate-based blockchain and I want to create a pallet that intercepts all runtime calls. I have created a pallet that accepts a runtime call as a parameter, but it doesn’t ...
0
votes
0
answers
25
views
Runtime support for XCM message passing
Can someone help me pinpoint which pallets and APIs are required from a runtime perspective to implement support for passing XCM messages between parachains (if I decide to implement it from scratch) ?...
0
votes
1
answer
27
views
the trait bound `Runtime: frame_system::pallet::Config` is not satisfied the trait `frame_system::pallet::Config` is not implemented for `Runtime` [closed]
The ranked_collective pallet has been updated to include AddOrigin and RemoveOrigin, my intention it to update the various collectives in the kusama and Polkadot runtimes to include these but I keep ...
0
votes
0
answers
17
views
Srtool rust nightly not installed
I am trying to build my runtime using the following command
srtool build --root --package my-runtime --runtime-dir node/runtime --build-opts="--features=fast-runtime"
I am getting the ...
1
vote
2
answers
31
views
EnsureOriginBy using an account set on a pallet's storage
I'm working on a feature that requires pallet-nfts ForceOrigin to only be callable by an account configured inside a separated pallet's storage. For example in pallet-A I have the following
#[pallet::...
1
vote
0
answers
25
views
Validator Reward curve tweaking without runtime upgrade
I am facing with the following issue:
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 ...
3
votes
1
answer
149
views
Sync error while upgrading Polkadot SDK from 1.0 to 1.6
We're in the process of updating the Polimec runtime and node from the Polkadot SDK 1.0 to 1.6. We're doing the final tests before the merge and we are encountering an issue while syncing the ...
0
votes
0
answers
20
views
How to integrate Eirgon EVM execution client into substrate chain
I am building a substrate based chain (not a parachain) and I require 100% EVM compatibility. As such, I would like to leverage erigon as an EVM execution client and use substrate as the consensus ...
1
vote
1
answer
36
views
problem with pallets bounties & treasury
hello I am trying to add the bounties pallet to the substrate node-template. the version I am using is "release-polkadot-v1.7.0". I keep getting
the following error:
the traitframe\_support::...
1
vote
1
answer
50
views
How to debug an extrinsic (the runtime code) after migration to wasm-only execution in Polkadot?
Polkadot is moving away from native execution mode and in the first step they removed the native execution mode. This means that the --execution Native does not work anymore which is the solution in ...
0
votes
1
answer
54
views
IEEE 754 Floating Point Numbers wasm impelementation
We are looking to enable reproducible floating point operations on chain by implementing the IEEE 754 standard as an on-chain wasm function.
As discussed in this stackoverflow post,
substrate does not ...
0
votes
0
answers
31
views
Trying to add democracy precompile and getting an error that says the trait `LinearCostPrecompile` is not implemented for `DemocracyWrapper<Runtime>'
I am trying to add a precompile to my runtime(I hope this is what it is called).
What I did was import the precompile first in my runtimes's cargo.toml file. All my dependencies are fetched from ...
1
vote
1
answer
44
views
Where is the plain chain spec for kusama that i can use with a kusama runtime locally?
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?
...
0
votes
0
answers
38
views
Updating SLOT_DURATION on Mainnet - Seeking Assistance!
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 ...
1
vote
1
answer
46
views
Modifying / extending existing substrate pallet without cloning full source
I would like to modify the substrate transaction-payment pallet's CurrencyAdapter without cloning the entire crate into the local pallets.
What's the best practice to provide another implementation ...
1
vote
1
answer
54
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 ...
2
votes
0
answers
31
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/...
1
vote
1
answer
99
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 {...
0
votes
2
answers
61
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 ...
2
votes
1
answer
64
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 ...
1
vote
0
answers
44
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 ...
2
votes
0
answers
36
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?
1
vote
0
answers
20
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?
2
votes
1
answer
78
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,
...
2
votes
1
answer
34
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 = (
// ...
0
votes
0
answers
21
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 ...
0
votes
0
answers
15
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. ...
1
vote
1
answer
46
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?
1
vote
1
answer
81
views
thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped) [closed]
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 ...
2
votes
0
answers
41
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/...
1
vote
1
answer
85
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:
...
1
vote
1
answer
78
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 ...
1
vote
1
answer
89
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/...
1
vote
1
answer
35
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).
0
votes
1
answer
27
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 ...
3
votes
1
answer
46
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 ...
0
votes
0
answers
28
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, ...