Questions tagged [substrate-node-template]
Posts that reference the Substrate node template, a basic Substrate node typically used for getting started with Substrate.
55
questions
4
votes
1
answer
138
views
How can I make my node generate blocks only when they receive transactions?
In substrate node template we can see that blocks are producing and finalizing if no transaction happening so how I can make my node to only generate blocks when there are transactions happening.
1
vote
2
answers
169
views
Substrate change node template from PoA to PoS
Is there any documentation on how to change Substrate from PoA to PoS?
5
votes
1
answer
734
views
How to add custom RPCs?
I have the template pallet in the Substrate node template.
This pallet template has a function do_something that store a value in the storage.
I would like to create an RPC call that queries that ...
4
votes
2
answers
641
views
"error: failed to select a version for `parity-util-mem`"
Currently dealing with an issue building my chain where parity-util-mem is conflicting with parity-util-mem-ban duplicates and I don't know the exact way to specify a certain version for all ...
3
votes
1
answer
140
views
Unified accounts with AURA
I want to use unified accounts for a Substrate-based EVM chain. I've looked into the mooonbeam implementation, and they are using it with a custom module pallet-author-inherent which is used for block ...
3
votes
1
answer
149
views
Missing `successful_origin` in implementation when running runtime-benchmarks
With a fresh substrate-parachain-template
I ran cargo build --features runtime-benchmarks
I get error from a deep dependency in pallet_society, which doesnt seem relevant to the parachain-template's ...
2
votes
1
answer
113
views
Why my solo chain block time is 12 seconds when set to 6?
I have an my own Substrate node (not a parachain, based on the template-node, so Aura consensus is used) and I changed the block time to 6 seconds in the runtime/src/lib.rs by setting
pub const ...
2
votes
1
answer
347
views
Substrate Node Template does not start
I followed the tutorial on https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/ exactly, but after building the node template (https://github.com/substrate-developer-hub/...
5
votes
1
answer
93
views
adding an account
I just want to simply add an account in the development config but have no idea how to do it, i tried simply adding the seed in the development_config function but it dosent work, what can i do to add ...
4
votes
2
answers
2k
views
failed to resolve: use of undeclared crate or module `imp`
I got this error when building the whole project 'cargo build --release'. But build package works fine 'cargo build -p pallet-template'
error: the wasm32-unknown-unknown target is not supported by ...
4
votes
2
answers
368
views
Local network does not change validator set
Currently, we have a local test net with 4 substrate nodes using this runtime which has the staking and session pallets. 2 nodes (Alice and Bob) are validators, placed in the chain spec json file and ...
4
votes
3
answers
262
views
How do i find the address of the treasury?
I have implemented pallet_treasury just like Kusama, how do i find the resulting address?
2
votes
1
answer
113
views
Offchain Worker Not Initializing - Cumulus Parachain Template
I am observing unexpected behavior with the Cumulus Parachain Template. Our pallet uses off-chain workers (OCW), and the functionality successfully runs when we attach it to the Substrate Node ...
2
votes
1
answer
123
views
Problem adding a smart contract into a Substrate node
I added these pallets into runtime Cargo.toml :
pallet-contracts = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", " ...
2
votes
1
answer
70
views
Derived H160 address is different than showing in metamask?
I know ss58 public key and private key, also I have derived the EVM HS160 account from the same public key, next is how I can import that EVM HS160 Account in metamask. If I put the private key of ...
1
vote
1
answer
262
views
Invalid usage of `RuntimeEvent`
I am a beginner learning the substrate framework, So am actually following the documentation on the substrate website where it references the use of macros in a custom pallet, after implementing all ...
1
vote
1
answer
687
views
Problem compiling substrate node in WSL ( windows )
Getting error: failed to run custom build command for jemalloc-sys v0.3.2 error` when compiling substrate-node-template in wsl environment.
1
vote
2
answers
245
views
Zombienet: Substrate-Parachain-Template ... How to write the Dockerfile?
This question follows those questions below:
Q1 Zombienet: how to test custom parachain collator - block height(producing blocks) test
Q2 Zombienet: Substrate-Parachain-Template ... block height(block ...
1
vote
1
answer
123
views
Build a substrat node template on digitalocean problem
I try to cargo build the substrate node template on the server digital ocean. I have the exact same configuration between my own Ubuntu and Digitalocean droplet : Default host: x86_64-unknown-linux-...
9
votes
1
answer
212
views
Single node performance
I've a couple of questions:
I'm running a the node-template on a machine that has 8 cores and 64GB of RAM and its using an SSD. I have some pallets working there and I'm using the python client to ...
4
votes
1
answer
156
views
Adding pallet-gilt to a running chain breaks the chain
I am running a simple 2-validator substrate chain with my own keys (https://github.com/paritytech/substrate, branch = polkadot-v0.9.27). I have removed pallet-gilt from the runtime and what I am ...
4
votes
1
answer
351
views
How the transaction payment pallet handles transaction fee of every extrinsic?
I was doing some experiments with Substrate Node Template. I found that for every extrinsic, user is charged with some fee. I explored
https://github.com/paritytech/substrate/blob/master/frame/...
4
votes
2
answers
208
views
How to increase performance of building Substrate by "cargo build --release" command
I using Substrate-template-node to build pallet and my laptop have Core-i7 chip, but the time to build is range from 9-12 minutes. So, when I change code and have to wait to build and run.
So, my ...
4
votes
1
answer
1k
views
Error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`
I was trying to build the substrate-node-template (https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) for the first time. I am using WSL2 with Ubuntu 22.04 LTS.
I came to the ...
4
votes
1
answer
120
views
Is there any way to access the accountid inside the offchain worker?
I am coding a pallet in which I need to know who I am inside a offchain worker to check if I should send a transaction or not. Right now I have access to the account in the send_signed_transaction ...
3
votes
1
answer
129
views
change consensus of substrate
I want to change my substrate chain consensus but I don't know how to set the new consensus in substrate.
I want to set dops consensus for my substrate chain also please guide my for implement dpos in ...
3
votes
1
answer
73
views
How should we choose a license?
The substrate node template comes with Unlicense whilst the substrate code base itself comes with a split license of Apache 2.0 and GPL3. What does this mean for a developer trying to build and deploy ...
3
votes
2
answers
52
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(...
2
votes
1
answer
102
views
How to overwrite endowed account balance (Build a local blockchain)
I followed this tutorial to build a local blockchain and everything worked fine.
Now I would like to change the account balances for instance 0 for all accounts.
By looking at this post, I thought ...
2
votes
1
answer
123
views
How to upgrade Frontier to use a specific Substrate version
The Substrate team(https://github.com/paritytech/substrate/) produces releases like polkadot-v0.9.25 every a few weeks,
and my team needs to upgrade our parachain to follow those Substrate versions.
...
2
votes
2
answers
226
views
How to change the native token in Substrate to a custom token?
I want create a custom token in Substrate by the name GGG and I want to use this token for each transaction fee instead of the default Substrate token. Can someone please guide me on how to change the ...
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 ...
2
votes
1
answer
111
views
How to write a custom query for storage?
When you declare a storage say
pub type Something<T> = StorageValue<_, u32>;
We get query function "something".
But I want to write some specific functions that reads storage ...
2
votes
1
answer
571
views
How to curl custom RPC methods?
We have a pallet (called pallet_supersig), and have an RPC module that we have implemented into a substrate node template with supersig, when running the dev node we can find the rpc methods() that ...
2
votes
0
answers
32
views
Cant produce new blocks with custom ChainSpec file
I was using substrate version of 4.0.0-dev-41ad4a6c9d7 and following the Add Trusted Nodes for making a custom account as a Authorites account
here, I can't able to produce new blocks, I don't know ...
2
votes
1
answer
57
views
Replacing Endowed Account Address in a Local Substrate Blockchain: A Tutorial
Hello Substrate community!
If you have been following the tutorial on building a local blockchain using Substrate, you may have noticed that your address is hard-coded in a JSON file.
To replace your ...
2
votes
1
answer
236
views
file not found for module `sys`
Geeting following error's how can i fix this error?
error[E0583]: file not found for module `sys`
--> /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/...
1
vote
1
answer
29
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 ...
1
vote
1
answer
239
views
Question: Substrate vs Cosmos SDK [closed]
I need to gain some developer perspective on this if possible.
Essentially I'm trying to understand the following:
Are there any barriers to entry to use either of these? Or can any developer ...
1
vote
2
answers
156
views
Runtime upgrade error: host doesn't provide such function: env:ext_storage_root_version_2
Our goal is to migrate code to the newer substrate version and keep the block history.
My old running node substrate version is tag = 'monthly-2021-09+1' -> New substrate version is branch = "...
1
vote
2
answers
426
views
Not able to build librocksdb-sys library for substrate-node-template
Getting this error while building substrate-node-template,
Command uses: cargo build --release
error: failed to run custom build command for librocksdb-sys v0.6.1+6.28.2
MacBook Air 2017, MacOS ...
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 ...
1
vote
1
answer
78
views
How can I call my pallets and it functions in a smart contract?
How can I call my pallet functions from a smart contract?
For example I have a pallet with name dex, this pallet has some function with name A , B , C. Now I want to call and use this functions in my ...
1
vote
3
answers
273
views
Docker container...-p 9944:9944 running Node Template not working on polkadot js apps
I'm trying to run a substrate node through docker container but i am not able to with this command:
docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 docker.io/decentration/supersig-...
1
vote
1
answer
64
views
in the second tutorial i didn't had to specify a key for bob, how did it work?
In the second tutorial where we simulate a network with two nodes, we add Bob however we use --bootnodes option and we didn't specify the keys for bob.
what does that option do specifically, i assume ...
1
vote
6
answers
2k
views
Unable to compile substrate template `error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`
First, I have looked at several previous posts regarding similar build errors but have yet to get the substrate template to build locally successfully. The exact error I encounter is:
error: failed to ...
1
vote
1
answer
91
views
Error when add pallet-contracts in substrate : no matching package named `pallet-contracts-rpc-runtime-api` found location
i want to add pallet-contracts into substrate on branch but i faced errro .
Repository
i will tell you step by step what i did :
Step One : Add Depency Pallets
pallet-contracts = { version = "4.0....
1
vote
3
answers
235
views
How to store a string in substrate storage?
I would like to store a string/message in substrate storage because I am writing a pallet, later on, I would like to use the Polkadot.js portal to write the message on the front-end and store it, and ...
0
votes
3
answers
291
views
Mac m1 substrate node template can't be build
I get this issue when I try to build the substrate-node-template
error: failed to run custom build command for `prost-build v0.10.4`
Caused by:
process didn't exit successfully: `/Users/elioprifti/...
0
votes
3
answers
192
views
Enabling off-chain workers for substrate-node-template
I'm trying to test offchain workers in my local substrate node.
It seems that by default the ocw is not enabled? I've only been able to see logs from ocw's when running the node with the --dev option (...