Questions tagged [substrate-node-template]
Posts that reference the Substrate node template, a basic Substrate node typically used for getting started with Substrate.
512
questions
-2
votes
1
answer
37
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
26
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
73
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
139
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
41
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
1
answer
27
views
While authorizing specific nodes in building a blockchain i got the following error
I got this error while authorizing specific nodes in building a blockchain.
It gives me error like this.
error: failed to select a version for `bounded-collections`.
... required by package `sp-...
0
votes
0
answers
44
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
27
views
zsh: no matches found: --pallet=*
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
22
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
69
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
39
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
23
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
157
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: ...
1
vote
1
answer
46
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
219
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
52
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
120
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
31
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 ...
2
votes
1
answer
62
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
29
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
29
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
131
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 ...
0
votes
1
answer
73
views
Can't configure the test network settings
I am trying to Configure the test network settings. I am following this tutorial.
This is my config.toml file
[relaychain]
default_command = "./binaries/polkadot/polkadot"
default_args = [&...
2
votes
1
answer
36
views
Configure test network file
I am trying Simulate Parachain tutorial, in 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 ...
0
votes
1
answer
17
views
No block are producing in substrate parachain template
I am using 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?
0
votes
1
answer
19
views
how to query in the substrate node?
I want to get collection data using collectionId 1
the collection was created on the on the node already with the id 1. How can I do this is substrate? Any CLI tools?
2
votes
1
answer
68
views
Steps to connect chain to rococo test
I have chain built using substrate-node-template. Now what are the steps to connect my chain to Rococo test network?
2
votes
0
answers
26
views
Uncaught error substrate-node-template pallet-contract
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.
Uncaught error. ...
1
vote
2
answers
97
views
Not able to upload contract in substrate node template
I have added pallet-contract in our chain. 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 ...
0
votes
1
answer
31
views
Where can I find the js code of polkadot pallet?
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?
1
vote
0
answers
52
views
How to make substrate-node-template accessible via wss connection?
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(?) ...
2
votes
0
answers
39
views
Someone suggest me some resources of NFT Pallet frontend react implementation?
I am using nft-pallet 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 ...
1
vote
1
answer
53
views
I got this error while building a blockchain
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/...
1
vote
2
answers
52
views
How to add funds to Treasury?
Someone please point me how to add funds in Treasury?
0
votes
1
answer
15
views
proposal not funded in pallet_treasury
I am using pallet_treasury. I have created proposal and verified it. I have set SpendPeriod in min. Even after 1 min proposal doesn't get funded. What I am missing here? Why it's not working? Someone ...
0
votes
2
answers
33
views
Difference between EitherOfDiverse vs EnsureSigned inside pallet config?
When using this one, I get BadOrigin as in screenshot,
type ApproveOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<AccountId, ...
0
votes
1
answer
53
views
I got this error while doing simulating a network when building a blockchain
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/...
2
votes
2
answers
118
views
How to start substrate-node-template and substrate-front-end-template remotely?
I want to start my own blockchain. I try to start substrate-node-template and substrate-front-end-template remotely, but there is guide instructions only for local machine. I installed and compiled ...
0
votes
1
answer
77
views
Tutorial: Use macros in a custom pallet - Compile Error
I have looked through other posts on the compile errors for "Use macros in a custom pallet". None of them seemed to get me through the following error. I made sure to have a clean install of ...
1
vote
1
answer
38
views
Address already in use
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:
2023-07-09 18:20:01 🏷...
1
vote
2
answers
88
views
Can't able to peer two different node on different computers
We wan't to run multiple node on multiple devices. We use substrate-node-template to do that. We build the project using cargo build --release and follow this Add trusted node tutorial. We were able ...
3
votes
2
answers
171
views
How node and runtime are connected?
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 is ...
0
votes
0
answers
52
views
Mapping EVM Address to Substrate Address with Preserved Balance
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 ...
0
votes
1
answer
48
views
Bech32 encode/decode library for no_std to convert bytes32 into string address in runtime pallet?
I want to convert bytes into string address.
I have only two options because of Junction limitation: bytes32 or bytes20.
pub enum Junction {
...
AccountId32 { network: Option<NetworkId>, ...
0
votes
1
answer
29
views
No block are producing while running node in dev mode
Even though I set genesis staker here no block are producing. Someone please help me.
ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % ./target/release/node-template --dev
2023-07-02 08:15:58 ...
2
votes
1
answer
105
views
Issues with Function Call on EVM-Compatible Substrate Using Metamask and Polkadot
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.
Here's the function used to sign and send ...
1
vote
0
answers
32
views
How to send XCM message from parachain to solochain via the parity bridge
I am quite new to substrate and polkadot parachains. I am trying to bridge a parachain and a solochain using the substrate bridge repo
Is it possible to send arbitrary data from the para chain to ...
2
votes
1
answer
92
views
what does reorg means in substrate?
up until block (best:#34, finalized #32) all nodes have the same output, then
we are seeing the following log statements from some of our validators like this:
2023-06-24 15:32:22 💤 Idle (4 peers), ...