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
1
vote
1
answer
67
views
the trait bound `Vec<u8>: EncodeLike<u32>` is not satisfied
I was making a function to store the some data in the pallet.
#[pallet::storage]
#[pallet::getter(fn number)]
// Learn more about declaring storage items:
// https://docs.substrate.io/main-docs/build/...
3
votes
1
answer
56
views
How to change the format of addresses on a substrate local blockchain?
I have run a local node on my local host using the substrate documentation at:
https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/
Also I git cloned the UI Frontend for ...
2
votes
1
answer
84
views
How to convert an associated type AccountId into a custom associated type AssetId in a Substrate pallet?
I'm working on a Substrate pallet, and I have a custom associated type AssetId. I need to convert an AccountId into this AssetId. My Config trait looks like this:
#[pallet::config]
pub trait Config: ...
2
votes
1
answer
45
views
panicked at 'Bad input data provided to query_info: Codec error' when running a dev node [closed]
I get an error when running dev node and transfer coin to test address.
I use: https://github.com/substrate-developer-hub/substrate-front-end-template
Here are the console logs:
2023-05-08 07:55:45 🙌...
3
votes
1
answer
53
views
Cannot connect to PJS Apps or Substrate front-end template with a custom endpoint
I have set up a Network of two Nodes in a local Network, but I cannot get the Polkadot Block explorer (polkadot.js.org) or the substrate-Front-End-Template to connect to it.
the polkadot app ...
2
votes
2
answers
72
views
Problems adding trusted Nodes on different machines on Windows 11(WSL)
I Cannot get the two Substrate Nodes to Work together in a local Network between two different PC running on Win11 + WSL
I have followed the Tutorial and everything seems ok till the point that i am ...
2
votes
0
answers
68
views
Which pallets cannot be added through a runtime upgrade?
We started our chain using substrate-node-template which is using PoA consensus with Aura for block production. Now we are trying to move to PoS with Babe. We found out that it is not possible to ...
2
votes
0
answers
58
views
Failed to compact generated WASM binary in substrate standalone chain [duplicate]
I'm building the substrate standalone chain with this cargo build --release command and facing the issue:
thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))...
3
votes
1
answer
107
views
bridge substrate solo chain to parachain
I am trying to bridge a solo substrate chain to a parachain .
I am very new to this.
I came across the parity-bridges-common repo (https://github.com/paritytech/parity-bridges-common) . I was able to ...
5
votes
0
answers
118
views
Query node information from PeerId only
How do I get Listen addresses of a node (and possibly other info like agent, protocols etc..) given that I only have node's PeerId? Is there any existing solutions available for this? Simple enter ...
3
votes
1
answer
57
views
How to troubleshoot synchronisation issues between two nodes in a local Substrate blockchain network using server?
I am trying to set up a local blockchain network using the Substrate framework and two separate servers running on Alice (port 9944) and Bob (port 9944). However, I am encountering an issue where the ...
6
votes
1
answer
81
views
Using Go Runtime in Substrate node template
I am trying to run a local network using Substrate Node Template and have replaced the wasm runtime with one, built from Go. Unfortunately, when I start the network I get the following error:
Error: ...
8
votes
1
answer
85
views
What are the best practices for keeping chain specifications for Devnet, Testnet, and Mainnet environments?
can anybody help me to understand what questions I should address before choosing the approach for keeping the runtime configuration for Devnet/Testnet/Mainnet environments in a substrate-based ...
4
votes
2
answers
90
views
How to fetch all accounts in a pallet?
I need to change the balances of all the accounts in my custom pallet, For that first i need to fetch the accounts in the pallet. How to do this?
3
votes
1
answer
41
views
How to print all genesis accounts and their balances for debugging purpose?
Would it be possible to get the information of all accounts in log? I would need this for debugging purpose.
Can somebody please help me to provide this information?
0
votes
0
answers
31
views
Feature has been removed [duplicate]
We have been trying to build the node locally on a colleague's computer. The node successfully builds on my computer but fails to do so on the other computer. The error thrown is:
Both the computer's ...
1
vote
1
answer
124
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-...
1
vote
1
answer
73
views
sudo.Sudid Error: BadOrigin on polkadotjs
I am adding asset pallet to the runtime. When I try to interact with it with sudo > asset > create, I got error: BadOrigin issue. Can someone please help me why I am getting this issue.
I found ...
1
vote
1
answer
62
views
Generating ethereum address from SS58 address [duplicate]
I have created keypairs for aura and grandpa and added it into customSpec file but i need to add ethereum address in customSpec file to fund it with some amount of ethereum. So, i have generated ...
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 ...
3
votes
1
answer
43
views
Add ed25519 address to chain_spec.rs
Trying to add an ed25519 address to the chain_spec file.
The node_template has the defaults
vec![get_account_id_from_seed::<sr25519::Public>("Alice"),
We would like to add a custom ...
2
votes
1
answer
48
views
Cargo update error - " no matching package named `sp-beefy` found"
I am trying to run cargo update but I keep getting this error
error: no matching package named `sp-beefy` found
location searched: https://github.com/paritytech/substrate?branch=master
required by ...
3
votes
1
answer
87
views
How to find waiting validator node is online?
I want to implement a business logic that needs to know if the node of validators in waiting state are up or not. So for that according to me pallet_im_online was the best solution (but open to any ...
2
votes
1
answer
73
views
How to decrease wasm smart contract deployment fee without decreasing Transaction fee?
i am using substrate pallet_contracts for wasm contract deployment how can i set the fees for contract deployment?
2
votes
1
answer
41
views
Implementing contract token transfers between users in a Substrate-based DEX
I am working on a decentralized exchange (DEX) using the Substrate framework, and I need help with transferring non-native tokens between user accounts within the DEX.
Suppose a user creates a token ...
4
votes
2
answers
161
views
Read a value from offchain storage of a node
I want to read a single value from OffchainStorage of a live substrate node. Is it possible? Assume I can not use localStorageGet rpc request because it is an unsafe rpc.
2
votes
1
answer
51
views
how to stop listening for gossiped transaction (restrict access to the TXpool)?
In outer node, i want to create a node that does not listen to gossiped transaction or in other words the transaction pool should not add any transaction from other peers, the only way to add ...
1
vote
2
answers
55
views
How do I compile only the Substrate node-template from the Substrate repo?
How do I compile only the Substrate node-template from the Substrate repo:
https://github.com/paritytech/substrate/tree/master/bin/node-template
1
vote
1
answer
192
views
how to pay transaction fee through custom token?
i am working on substrate i have created a custom token using pallet_assets,how can i configure the transaction_fee using the custom token i have seen the pallet_assets_transaction payment which say'...
2
votes
0
answers
82
views
linking with `cc` failed: exit status: 1
i want to use orml-traits in substrate project . im using this substrate repo : Substrate Repository
and also i cloned this repo for using orml porject in local :
orml Repository
i changed some crates ...
2
votes
1
answer
83
views
How to make orml-traits and orml-tokens compatible with sp-io version 7.0.0 in a Substrate project?
I am working on a Substrate project and want to use the orml-traits and orml-tokens crates in my custom pallet. I have added these crates to my Cargo.toml:
orml-tokens = { git = "https://github....
0
votes
1
answer
47
views
Is it possible to add council support and initial members during a runtime upgrade?
I have a running node without a council configured in genesis. I would like to add a council and initial council members using a runtime upgrade. Is this possible and how would i do it
2
votes
1
answer
38
views
Debugging 429 Too Many Requests
Somehow our node starts to yield 429 errors and we do not find a reason for this. More specifically, we do not even know hot to debug this.
I see that this gentlemen has logging for accepted ...
0
votes
1
answer
16
views
Add Nicks pallete [closed]
lenovo@lenovo-IdeaPad-3-15ADA05-Ua:~/substrate-node-template$ cargo check -p node-template-runtime
error: failed to load manifest for workspace member `/home/lenovo/substrate-node-template/node`
...
1
vote
1
answer
93
views
how to add vesting in customspec.json?
i am using Substrate i want to add Vesting in my customspec whats the format for adding it?
i tried using this but it did't work
genesis_config of pallet_vesting
i am getting this error
Error: ...
0
votes
1
answer
127
views
Substrate-Node-Template does not start after cloning and renaming the template UnknownOpcode(192) [duplicate]
I recently ran into issues with working on my substrate-node-template.
i had this issue as mentioned here:
cannot run substrate on a fresh macbook m2
or here:
Substrate Node Template does not start
...
2
votes
1
answer
84
views
How to fix "module group is private" error when using frame-support-procedural-tools v3.0.0?
I'm trying to use orml-tokens in my Substrate project and encountered the following error:
error[E0603]: module `group` is private
--> /home/kianoush/.cargo/registry/src/github.com-...
2
votes
1
answer
34
views
sc-finality-grandpa issue in my node-template v0.9.37
I am trying to compile the polkadot-v0.9.37 version of node-template with some added customisations.
I run cargo update and get this issue in the core pallets:
error: no matching package named `sc-...
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/...
0
votes
0
answers
189
views
Getting rust-analyzer error while running a substrate based chain
My problem
Running cargo build does not give any error in terminal but rust-analyzer of Visual studio code gives me 85 errors and 8 warnings.
I followed the installation guide from the substrate docs. ...
4
votes
1
answer
77
views
how to run some logic before gossiping the block as author?
In substrate-node-template, are there any available ways to execute a task or provide a callback to be executed just before the block gets gossiped to other validators, right after it has produced the ...
1
vote
1
answer
79
views
method not found" and "associated item not found" errors in a Substrate pallet function?
I am working on a Substrate-based blockchain project and I have the following function in my custom pallet:
#[pallet::call_index(8)]
#[pallet::weight(<T as Config>::WeightInfo::create_exchange())...
1
vote
2
answers
304
views
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
Below is my block of code where I am implementing this trait Config. I am not sure what I am doing wrong here I keep getting error "the type parameter T is not constrained by the impl trait, self ...
3
votes
3
answers
64
views
why blocks could contain failed transaction
After building and running substrate-node-template i started the local node with --dev flag :
./target/release/node-template --dev
i opened https://polkadot.js.org/apps/#/extrinsics and selected the ...
2
votes
1
answer
122
views
Can I deploy an old ink! v3.x contract on the latest version of substrate/polkadot (pallet-contracts >= polkadot-v0.9.37)?
I have old smart contracts written in ink! v3.x, and I need to update the substrate version (including pallet-contracts) to >= polkadot-v0.9.37. After the update, I'll need to redeploy my smart ...
1
vote
1
answer
74
views
Implementing a DEX with Substrate on the Polkadot Network, Allowing Custom Token Creation and Addition
I am in the process of developing a decentralized exchange (DEX) using Substrate on the Polkadot network and could use some assistance with the implementation. The key features I want to incorporate ...
1
vote
1
answer
16
views
Substrate node tempalate Facing error converting chainSpec.json to raw format
I am using substrate node-template for my blockchain, I want run with my own accounts, for some reason below code converting chainSpec.json raw format is throwing error.
macOS: : Apple M1 pro Ventura ...
1
vote
2
answers
176
views
How to add evm and ethereum pallet from scratch into substrate node?
I want to add evm pallet and ethereum pallet into my substrate node from scratch, so how I can do that.
0
votes
0
answers
84
views
Substrate Error [duplicate]
we create a local blockchain using substrate following this steps:- (https://docs.substrate.io/tutorials/get-started/build-local-blockchain/) upto cargo build --release steps is completed.then i using ...
3
votes
1
answer
42
views
Substrate node template fees deduction using native token
I have create blockchain using substrate-node-template with aura consensus and which contains own native coin and I have created stable-coin using pallet-contract. This stable token is contract, ...