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
2
votes
1
answer
67
views
Facing Issue in integration of POS
I'm integrating the POS in freshly node template. I'm facing this error:
This is the code repository: https://github.com/Aideepakchaudhary/POA-to-POS
Can anyone please help me to solve this issue?
...
0
votes
1
answer
43
views
error[E0277]: the trait bound `LabelInfo<T>: parity_scale_codec::Decode` is not satisfied
I wanna to create pallet in substrate. I faced this error. How can I solve this problem?
#![cfg_attr(not(feature = "std"), no_std)]
/// Edit this file to define custom logic or remove it if ...
3
votes
2
answers
67
views
How to use bounded_vec macro in benchmarking.rs
I was using substrate-node-template, and created some benchmarking functions.
I was able to use bounded_vec macro in tests.rs but, can't able to use it in the benchmarking.rs file
my code
#![cfg(...
1
vote
1
answer
54
views
Call the extrensic of a pallet from the ink smart contract
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 ...
0
votes
1
answer
37
views
Polkadot Typegen importing JS extension instead of TS
We are using the typegen to create types for our custom chain.
Following the docs
The code that is generated is kinda strange. In the augment-api.ts file it tries to import all the other generated ts ...
0
votes
0
answers
36
views
Build a blockchain
I'm following substrate documentation in that build a blockchain tutorial while following the monitoring node metrics tutorial.
I got stuck while installing prometheus on my ec2 instance is there any ...
1
vote
1
answer
84
views
Node template with POS Babe consensus: Removal of Unnecessary Extra Pallets
Here is the node template with Babe:
https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/bin/node/runtime/src/lib.rs#L1583
The above template is functioning smoothly ...
0
votes
1
answer
66
views
Error Running Substrate Node: Unsupported or invalid BabeApi version
I am trying to run a Substrate node with a custom chain specification. I used the following command to run the node:
./target/release/substrate \
--base-path /tmp/pikamo \
--chain ./...
0
votes
0
answers
66
views
Maintained Substrate-NPoS-template?
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 ...
5
votes
1
answer
171
views
How to solve this error: associated type `BlockNumber` not found for `T`?
I have substrate node template with babe and i want to integrate orml-currencies.
I'm using this in cargo.toml:
orml-currencies = { default-features = false, git = "https://github.com/open-web3-...
5
votes
1
answer
85
views
Gas less Transactions
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 ...
3
votes
1
answer
80
views
How to add custom account as initial authorities in chain_spec.rs file
I've successfully added custom accounts in the Sudo account and pre-funded accounts following this stack adding an account but I also wanted to set custom accounts as initial PoA authorities.
Thank ...
1
vote
1
answer
38
views
Polkadot JS query response types are missing
No types for blockchain query responses are available in our IDE.
Doing any query like this
await blockchain.api.query.assets.asset(id, (res) => {
const info = res.toJSON()
console.log(&...
1
vote
1
answer
100
views
Substrate Node Error: Denied request: HTTP header: host value verification failed
I am trying to run a Substrate node with a custom configuration using the following command:
./target/release/node-template \
--base-path /tmp/pikamo \
--chain ./customSpecRaw.json \
--port ...
1
vote
1
answer
76
views
Can't build node when using pallet-nfts in custom pallet
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.
The custom pallet's Cargo.toml looks like this:
[...
1
vote
1
answer
47
views
I got this error while building a blockchain (building a local blockchain)
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.
0
votes
0
answers
35
views
How can I ensure that the validator and nominator do not incur transaction fees?
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?
1
vote
0
answers
55
views
BestWay The Restart Substrate Node
After adding the validator node, it may encounter issues preventing it from creating blocks and initiating the next era in the blockchain.
in this case,is there a way to restart the network?
keep the ...
0
votes
1
answer
132
views
how to resolve could not find `__private` in `frame_support?
I am following following tutorial to write collectibles pallet:
https://docs.substrate.io/tutorials/collectibles-workshop/.
My source code is available here:
https://github.com/sayyedkamran/substrate-...
1
vote
1
answer
80
views
Setting metadata of an item of the Nfts pallet in a custom pallet
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 ...
1
vote
1
answer
15
views
Using CollectionSetting::DepositRequired in create_collection causes a WrongSetting error
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:
let nft_collection_id = <T as Config<I>>::Nfts::...
0
votes
1
answer
47
views
How to Check if an Address is a Node in a Substrate Blockchain Network?
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 ...
2
votes
0
answers
58
views
How can I use the --rpc-cors flag properly?
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 ...
2
votes
1
answer
164
views
Is it permissible to retrieve the value of a private field within a struct from one pallet while working with another pallet?
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 ...
1
vote
1
answer
99
views
An argument of type `ark_ec::short_weierstrass::Affine<BandersnatchConfig>` is missing
I wanna to build a parachain to run it localy .
The rust version I am using is : rustc 1.72.0 (5680fa18f 2023-08-23)
But when I run the command : cargo build --release it show me this error :
...
0
votes
1
answer
141
views
I want to get ws rpc url with the docker image for our substrate node
I'm in the process of creating a Docker image for our Substrate-node, and I used that following method to accomplish it.
# This is an example build stage for the node template. Here we create the ...
1
vote
0
answers
20
views
How to Securely Notify Users of New Messages in a Substrate-based Chat Application?
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. ...
-2
votes
1
answer
48
views
How to prefund treasury pallet?
I want to prefund treasury pallet in chain_spec GenesisConfig. Is this possible? Someone please give some advice. Github
1
vote
0
answers
17
views
RelaychainwithChainbridge
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 ...
1
vote
0
answers
34
views
Uncaught error. Something went wrong with the query and rendering of this component
I am getting this error while adding pallet_contracts in my chain. This is my github-code. Can you please describe me why I am getting this issue?
Edit
As @forgetso suggested in comment, I change ...
1
vote
3
answers
41
views
Chainbridge-added in substrate-relaychain
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 ...
2
votes
1
answer
108
views
How to customize pallet_contracts?
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 ...
1
vote
1
answer
268
views
How to fix the problem to build docker image for the substrate-node-template
I try to build a docker image for the https://github.com/substrate-developer-hub/substrate-node-template.
I used this file to do it. Dockerfile.dev.
FROM paritytech/ci-linux:production as build
...
0
votes
2
answers
48
views
How to run Containerfile inside node-template?
There is Containerfile inside substrate-node-template. What command should I use to run this file. Is the file is similar like DockerFile?
I try to run using docker build -f Containerfile -t node-...
0
votes
0
answers
55
views
Stable coin in substrate
How can a stablecoin be developed on a Substrate-based blockchain? I came across this question, which suggests following the implementation approach of Acala. However, are there alternative methods to ...
1
vote
2
answers
43
views
zsh: no matches found: --pallet=* [closed]
Getting zsh: no matches found: --pallet=* while running substrate chain benchmarks.
My command-
./target/production/node-template benchmark pallet --chain dev --execution=wasm --wasm-execution=...
0
votes
1
answer
31
views
error[E0277]: the trait bound `xcm::v3::SendError: PalletError` is not satisfied
I'm attempting to utilize the XCM error within the context of my pallet's error handling, but I'm facing this problem.
The error which i'm using
#[pallet::error]
pub enum Error<T, I = ()> {
...
2
votes
2
answers
115
views
Why blocks are being created even when there are no active transactions?
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, ...
0
votes
0
answers
53
views
How to generate random number of a specific length in Substrate pallet
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.
I also can't use rand package because it doesn't ...
0
votes
1
answer
36
views
How to write Dockerfile to spin up substrate node template
How to write Dockerfile to spin up substrate node template, unit tests and/or integration tests, e2e tests, etc? Someone please suggest some resources.
1
vote
2
answers
821
views
system.ExtrinsicFailed Token.NotExpendable
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: ...
2
votes
1
answer
84
views
Substrate - Change logging library
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.
What I tried:
Installed the tracing-subscriber pallet with json ...
0
votes
1
answer
375
views
How to install Substrate using Docker on an Apple M2 chip?
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 ...
0
votes
2
answers
76
views
<C as TrieCacheProvider<H>>::Cache<'_>` does not live long enough
I found the exact same first issue here and I checked I don't have any duplicate dependencies. I also try cargo clean & cargo update command, nothing changes.
ganesholi@Ganeshs-MacBook-Air ...
0
votes
1
answer
236
views
error[E0583]: file not found for module sys
error[E0583]: file not found for module sys
cargo 1.73.0-nightly (7e9de3f4e 2023-08-13)
rustc 1.73.0-nightly (180dffb 2023-08-14)
1
vote
1
answer
41
views
Substrate node template build errors and rustup version
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.
is this ...
3
votes
1
answer
100
views
Incompatibility between subxt_signer and subxt
https://github.com/paritytech/subxt/blob/master/subxt/examples/tx_basic.rs
I want to call a function in my substrate pallet. I am using the
substrate-node-template
subxt
subxt_signer
use subxt::{...
2
votes
1
answer
37
views
Rococo Slot Request problem on adding file
When requesting Rococo slots here, there are two options:
Upload your Genesis Head (genesis state) - Do not submit a compressed
file.
Upload your Validation Code (genesis runtime Wasm) - Do not
...
2
votes
1
answer
67
views
What is the difference between port vs rpc-port?
While starting node, what is the difference between --port and --rpc-port?
0
votes
2
answers
242
views
unexpected argument '--ws-port' found
I am preparing local relay chain from this tutorial. Configure polkadot and added raw-local-chainspec.json file but while running first validator, it gives this error.
ganesholi@Ganeshs-MacBook-Air ...