Questions tagged [substrate-node-template]
Posts that reference the Substrate node template, a basic Substrate node typically used for getting started with Substrate.
632 questions
1
vote
0
answers
22
views
sp-io v38.0.0 cannot find function `malloc` in module `crate::allocator`
I'm building custom solochain using polkadot-sdk-solochain-template.
After I've added some dependencies and fixed error with implementation I'm starting to get the sp-io error:
cannot find function `...
0
votes
0
answers
10
views
How to Generate Substrate Keys for a Custom SS58 Format (e.g., 567)?
I am working on a Substrate-based blockchain and need to generate keys for my network, which uses a custom SS58FORMAT = 567. I am using the key subcommand from my Substrate node executable. However, ...
0
votes
0
answers
9
views
Resolving Frame-Metadata Version Conflict Between Dependencies while updating version of substrate project
There seems to be a frame-metadata crate error where 2 versions are being referenced which is causing the error. The 2 versions are v16.0.0 and v18.0.0. The issue is that the substrate-wasm-builder ...
0
votes
1
answer
5
views
Issues with Dependency Version Mismatch and Rust Toolchain Version for Frontier polkadot-v1.8.0 Branch
Problem Description I cloned the polkadot-v1.8.0 branch of the Frontier repository and am attempting to build the Substrate chain using Cargo. However, I'm encountering issues with mismatched library ...
0
votes
1
answer
10
views
no matching package named `orml-vesting` found
I am trying to add orml-vesting in my project but I am getting error: no matching package named orml-vesting found issue while running cargo check -p node-template-runtime. Can somebody point out me ...
0
votes
1
answer
14
views
error[E0152]: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`
(I have the same problem, and use the same words. It means that still no solution here).
I am building a solo chain from Substrate node template, Now, I am trying to add pallet-contracts on the ...
0
votes
2
answers
22
views
How to burn total issuance
I have a solo chain with a total issuance of 10 billion tokens. I need to reduce this number to 5 million. What is the best way to burn the excess tokens to set the total issuance to 5 million?
0
votes
1
answer
19
views
Substrate: Transfers Work Only for Genesis Accounts, Not New Wallets
’m working on a Substrate-based blockchain with ExistentialDeposit = 0. Transfers between accounts defined in the genesis configuration work perfectly. However, when transferring tokens to a newly ...
0
votes
0
answers
7
views
Nova Wallet - Fee loading filed
I connected my custom blockchain to Nova Wallet. But if I try to send coins, I see error "Fee loading filed". The mobile app support said, that I have to use runtime metadata v14. but I ...
1
vote
2
answers
149
views
Resolving Sandbox Host Function Access After Deprecation in Polkadot v0.9.35
I am currently working on a Substrate-based solo chain that has migrated from polkadot-v0.9.34 to polkadot-v0.9.35 and is now on the stable branch 2409. In v0.9.35, the Sandbox host functions were ...
0
votes
1
answer
33
views
NetworkKeyNotFound not found
I am trying to run collators node after securing and onboarding para_id by using this tutorial but, after running collator command:
./target/release/parachain-template-node --collator \
--chain raw-...
0
votes
1
answer
18
views
Zombienet is not working. Getting `Error parsing spec file`
I have a solochain that I'm trying to run using zombienet with a simple script. Everything works fine until I make any modifications to the chain.
Here is my block-building.toml:
[relaychain]
...
0
votes
0
answers
10
views
How to Start a New Blockchain from a Specified Block State After a Host Function Failure?
I'm working on a blockchain that experiences a host function failure at block 100. To address this, I plan to initiate a new chain using the state from block 999. What methods or best practices are ...
0
votes
1
answer
13
views
Missing Native Executable After Rust Version Upgrade
We recently upgraded our Rust version from nightly 2024-02-18 (with rustc 1.78.0) to stable-x86_64-apple-darwin (default) rustc 1.81.0 (eeb90cda1 2024-09-04) while working on our private Substrate ...
0
votes
1
answer
16
views
How to clean a double storage map using primary key?
I have a double storage map.
pub type Schools<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
SchoolId,
Blake2_128Concat,
StudentId,
...
0
votes
0
answers
5
views
"Is there a relayer or a way to communicate Polkadot with Hyperledger Fabric?"
I am doing a project and I want to know if there is a stable relayer or bridge to connect both blockchains, so each one can read transactions to validate some operations.
I found a project that tries ...
0
votes
0
answers
59
views
How to limit xcm transfers to sudo account
I would like to limit xcm transfers to only the sudo account, aka only the sudo account should be able to call limited_teleport_assets and move tokens to the relaychain or other parachains. How would ...
0
votes
1
answer
27
views
Can't find substrate-node-template
I'm new to substrate.I'm following the a tutorial on youtube https://www.youtube.com/watch?v=G897F8Gw1PM&list=PL5dTjWUk_cPYdb4j2RH8BHEAK3z_ZME1j&index=2 and the substrate docs to build a local ...
0
votes
0
answers
9
views
Loading rocks db snapshots details
Goal:
If I have a folder containing rocksdb snapshots, and I just want to load the database dump such that it can read the various pallet's state and constants.
For the context I do not need the node ...
1
vote
2
answers
59
views
try-runtime Report Zero Weight Despite Successful Migration Execution in Polkadot 1.0
We are currently using node-template based on Polkadot 1.0 and testing a storage migration with try-runtime. We've successfully conducted several migrations in the past, but this time we're ...
1
vote
1
answer
21
views
What should be `Good Enough` requirement for Substrate based chain?
I am working on a Substrate based chain. I want to make sure my chain is up to par for Polkadot community.
For example: my chain should use latest Polkadot SDK stable version.
Are there other things, ...
0
votes
0
answers
9
views
how to use Substrate RPC metrics in Grafana
I need to use substrate_rpc_calls_time, substrate_rpc_calls_started, substrate_rpc_calls_finished to show RPC metrics on Grafana dashboard.
I added following section in my prometheus config file:
{
...
0
votes
2
answers
29
views
Substrate: How to call / import functions in the same pallet
Folders and file inside my pallet:
rpc, runtime-api, src, tests, Cargo.toml
Inside src/abc.rs:
impl<T: Config> Pallet<T> {
#[allow(clippy::indexing_slicing)]
pub fn doAction(id: ...
0
votes
0
answers
4
views
Would it be possible to show historical on-chain storage state for a particular block number?
Is there any way to present historical on-chain storage state for a particular block number?
I couldn't find way to do this. Can someone please help me to answer this?
0
votes
1
answer
39
views
How to enable js features in substrate? [duplicate]
I am trying to compile my substrate node but it is giving me the issue regarding js features:
error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js&...
0
votes
0
answers
6
views
Getting `Input("rpc finalized_head failed.")` while running try-runtime
I am trying to verify runtime-upgrade through try-runtime against a live environment using below commands:
cargo build --release --features try-runtime
try-runtime --runtime ./target/release/wbuild/...
0
votes
1
answer
20
views
How to convert public hex key (String format) to T::AccountId
Can somebody please guide me how to convert public hex key (which is in String format) to T::AccountId?
I have an extrinsic, which is accepting public key ...
3
votes
2
answers
73
views
use of undeclared crate or module `alloc` when upgrade to `v1.13.0`
I got this error below when running psvm -v 1.13.0
error[E0433]: failed to resolve: use of undeclared crate or module `alloc`
--> /Users/chungquantin/.cargo/registry/src/index.crates.io-...
1
vote
0
answers
42
views
frame-benchmarking-0.35.0: use of undeclared crate or module `alloc`
I am trying to upgrade the base-parachain to v1.13.0 and got an issue with the frame-benchmarking. This error coming from the frame-benchmarking crate which throws an error
error[E0433]: failed to ...
4
votes
1
answer
110
views
Unable to compile upgrade parachain node after running `psvm v1.13.0`
I am trying to upgrade my parachain node from v1.12.0 to v1.13.0 using psvm but it does not compile successfully due to some mismatch conversion error of libp2p. I believe this PR must cause that ...
0
votes
1
answer
8
views
more issues with "Authorize Specific Nodes" Tutorial
I am still having issues with this tutorial. https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/
I have spent today trying to find a solution but have been unable to do so....
0
votes
2
answers
48
views
Cannot get "Authorize specific nodes" tutorial working for substrate. Beginner question
I have been trying to get this working for a few days. I'd be really really appreciative if someone could help me as I just can't get it working. I am a complete beginner and not familiar with the ...
0
votes
1
answer
21
views
Why Off-chain worker does not deduct DispatchError in Substrate?
I am trying Substrate official off-chain example. I am throwing a DispatchError in my extrinsic.
#[pallet::call_index(0)]
#[pallet::weight({0})]
pub fn submit_price(origin: OriginFor&...
0
votes
0
answers
18
views
Not able to submit multiple signed transactions through off-chain worker
I have to submit 2 signed extrinsics through off-chain worker. The code structure of my off-chain worker is like this:
fn offchain_worker(block_number: BlockNumberFor<T>) {
if !...
0
votes
0
answers
14
views
How to create type for AccountId32 using Polkadot-JS api
I am writing integration test using Polkadot-JS api.
On the Substrate chain side, I have this structure:
pub type NodeKey = AccountId32;
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, ...
0
votes
0
answers
25
views
Is there e2e testing framework/example for Substrate solo chain?
I am working on a live solo chain. I have to test a scenario where I want to hit HTTP API through off chain-worker. Unfortunately it's not possible to test in mock environment.
We can take an example ...
0
votes
0
answers
20
views
How to verify merkle root with batch root and its adjacent_leaves inside a pallet?
I am using below code to create Merkle Root.
pub type MmrRootHash = H256;
pub fn create_merkle_root(leaves: Vec<MmrRootHash>) -> MmrRootHash {
sp_runtime::traits::BlakeTwo256::...
0
votes
1
answer
15
views
How to fix `cargo clippy` error for `#[pallet::call]` and `#[pallet::generate_deposit(pub(crate) fn deposit_event)]`
I have added a clippy check #![warn(clippy::missing_docs_in_private_items)] on the top of my pallet. I have added documents at all required places. However I am still getting below errors for #[pallet:...
1
vote
1
answer
32
views
Increment sufficient & providers
Can someone please provide me with an example of when to increase sufficients and providers in an account?
Providers
The providers reference counter prevents Substrate pallets from storing data about ...
0
votes
0
answers
21
views
When i tried to add the third well known node, it shows is added but it's not?
I am following the Authorize Specific Nodes and i tried to add the third known node, but i couldn't. It said it was added but it seems it did not even though i tried to added again it said it is ...
0
votes
0
answers
15
views
i want to send XCM message from my own react app
Can anyone help on Xcm Message I want to send message from my parachain. It work when I use Polkadot.js/app.But its not working with my own frontend tool. It says incorrect format. Can anyone tell ...
0
votes
0
answers
29
views
Error following the tutorial Authorize specific nodes [duplicate]
i am following the tutorial Authorize specific nodes, but when i arrive to the point where i have to add the line
construct_runtime!(
pub enum Runtime where
Block = Block,
NodeBlock = opaque::...
0
votes
2
answers
58
views
Where do I find the construct_runtime macro?
I'm trying to do the tutorial Authorize specific nodes, however I'm not sure where to find the construct_runtime macro in my lib.rs file. The tutorial requires the line NodeAuthorization: ...
0
votes
1
answer
23
views
Fixed Amount of Minting per block?
If i want to mint specific amount of native coin by the end of every block where should i implement the logic . Do i customize the pallet-template using pallet hooks , or do i implement a existing ...
4
votes
1
answer
98
views
Unexpected panics after upgrading template to v1.10.0
After upgrading one of Pop template's to polkadot-v1.10.0 I noticed some unexpected logs.
Even though the parachain include blocks, emits the expected events from the executed extrinsics and so on.
...
1
vote
1
answer
39
views
Should I Copy or Fork the Substrate Node Template for My Node?
We are developing our DeFi blockchain using the Substrate Node Template. Should we fork the template or copy it and use it as a standalone repository? What are the pros and cons of each approach?
0
votes
0
answers
28
views
What is a minimal requirements for a Frontier Template based blockchain's network?
I'm trying to figure out what a minimal blockchain would look like using substrate's frontier node.
What I'm trying to build:
A public minimal blockchain network
Aura consensus model
EVM and Ethereum ...
3
votes
3
answers
102
views
Substrate Tutorials - No more Nick's Pallet?
Im running through the Substrate Tutorials and just started the Build Application Logic tutorial series. This series starts with implementing pallet_nicks which appears to have been discarded with ...
0
votes
0
answers
16
views
Unable to build substrate-parachain-template?
As i was building substrate-parachain-template on tag polkadot-v1.0.0, I encountered the following error
Can anyone guide me through this.
0
votes
1
answer
18
views
How to Sync Two Boot Nodes for Redundancy?
I'm working on a blockchain project and want to ensure uninterrupted block production even if one of our boot nodes goes down. How can we effectively sync two boot nodes so that if one goes offline, ...