Skip to main content

Questions tagged [substrate-node-template]

Posts that reference the Substrate node template, a basic Substrate node typically used for getting started with Substrate.

Filter by
Sorted by
Tagged with
1 vote
1 answer
158 views

How to establish web socket connection in offchain_worker

Is there any way/example to establish web socket connection through off chain worker? There are many Rust examples but I can't use standard library. Can someone please help me?
Boleng's user avatar
  • 545
4 votes
1 answer
132 views

Facing issue in adding offchain worker

I'm using pow substrate chain. I'm running 3 validators by using these commands: For bob ./target/release/node-template \ --base-path /tmp/bob \ --chain local \ --bob \ --port 30335 \ --rpc-port 9944 \...
Deepak Chaudhary's user avatar
1 vote
1 answer
48 views

Build a test node without exposing Alice account

I need to build and run a substrate node in a such way that polkadot.js.org/apps will not display Alice, Bob etc at accounts page. I tried to remove all mentioning of Alice, Bob etc. from the rust ...
Denis Reshetov's user avatar
1 vote
1 answer
67 views

What is the use case for inherent transactions?

Just for curiosity! In what conditions we can use Inherent transactions? Thanks
Deepak Chaudhary's user avatar
0 votes
0 answers
27 views

node-template compilation failed on: sc-network-bitswap v0.10.0-dev [duplicate]

I am following guide at https://docs.substrate.io/quick-start/start-a-node/ git clone https://github.com/substrate-developer-hub/substrate-node-template cd substrate-node-template git switch -c my-...
jangorecki's user avatar
0 votes
1 answer
26 views

How to read treasury pallet funds?

I am able to add funds in treasury pallet, now I want to get the total balance of treasury pool. How can this be done? Can someone provide some suggestions?
go11li's user avatar
  • 1,241
1 vote
2 answers
104 views

failed to get `pallet-node-authorization` as a dependency of package `node-template-runtime v4.0.0-dev

I am learning "substrate" now and I set dependence according to the tutorial as below: [dependencies] pallet-node-authorization = { default-features = false, version = "4.0.0-dev", ...
Henry's user avatar
  • 13
2 votes
1 answer
48 views

Hardcode additonal validator in chainspec

I was referring the substrate documentation on preparing a local relay chain . The documentation has provided a sample plain chain spec with two validators Alice and Bob. I need to hardcode an ...
RRR's user avatar
  • 45
1 vote
1 answer
321 views

TypeError: api.tx.balances.transfer is not a function substrate contracts node

api.tx.balances.transfer was working perfectly some time ago. I tried to re-run my testcase today and I'm getting this error. const rawTX = api.tx.balances.transfer(alice.address, 30) ...
Anmol Bansal's user avatar
0 votes
0 answers
38 views

Why Transaction would exhaust the block limits

locally we are not getting this issue but in tanssi getting this issue RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Transaction would exhaust ...
go11li's user avatar
  • 1,241
2 votes
1 answer
35 views

How to join substrate as infrastructure provider

I wanted to know the complete process of joining polkadot builders as infrastructure provider but could not get a proper guide explaining that. Can someone please tell the process and what happens in ...
Mrigesh Patni's user avatar
1 vote
1 answer
64 views

while building an application logic (use macros in a custom pallet) [duplicate]

[][in build an application logic im facing this error im new to substrate please help me fix this.]
Preethi M's user avatar
2 votes
0 answers
67 views

segmentation fault ERROR

I just started in learning substrate and I want to run the example. I take the tutorial on the site https://docs.substrate.io/install/macos/. I have already done all steps. I tried run test blockchain ...
Kirill's user avatar
  • 21
0 votes
0 answers
24 views

Designing a Mechanism to Improve the Efficiency of Applications Deployed on Parachains?

As I was going through the mechanism of working of parachains , I came across a scenario that currently the time taken from collator producing a block on a parachain, to that block becoming finalised, ...
Ipsa Gupta's user avatar
2 votes
1 answer
31 views

What is the difference between the node folder and runtime folder in substrate node template?

In the Substrate node template there are two folder node and runtime. When I am building the chain I guess runtime folder is utilized. I am wondering what is the purpose of the two folders?
Tahlil's user avatar
  • 341
2 votes
0 answers
46 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 ...
Mojo's user avatar
  • 95
2 votes
2 answers
103 views

How to Retrieve Value by Single Key from StorageDoubleMap in Substrate?

I'm developing a Substrate-based blockchain and using StorageDoubleMap to store label details. The StorageDoubleMap is defined as follows: #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn ...
Mr Coder's user avatar
  • 923
1 vote
1 answer
65 views

Trait Bound f64: scale_info::TypeInfo Is Not Satisfied

I'm working on a Substrate-based blockchain project and I've run into an issue related to type information and encoding. Specifically, I'm trying to use an f64 field within a struct that also uses ...
Mr Coder's user avatar
  • 923
1 vote
1 answer
79 views

How to Add and configure Democracy Pallet to Substrate Runtime

I've made an attempt to incorporate the "pallet-democracy" into my Substrate runtime. In the runtime/Cargo.toml file of my Substrate node template, I've added the following configuration: ...
Ariful Islam's user avatar
1 vote
1 answer
51 views

How to change POA to POS with babe?

How to change the the consensus of node-template from POA to POS with babe?
Deepak Chaudhary's user avatar
0 votes
1 answer
45 views

How to restrict the minting in pallet-nft?

We need to find a way to restrict the minting in the nft pallet so only certain accounts can mint a nft or can create a collection. How can this be done?
go11li's user avatar
  • 1,241
1 vote
1 answer
31 views

Handling Nested Option Types in StorageDoubleMap::iter_prefix Method

I am building a Substrate pallet where I have a storage item defined as a StorageDoubleMap: #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn labels)] pub(super) type Labels<T: Config> ...
Mr Coder's user avatar
  • 923
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? ...
Deepak Chaudhary's user avatar
0 votes
1 answer
40 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 ...
Mr Coder's user avatar
  • 923
3 votes
2 answers
64 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(...
Mojo's user avatar
  • 95
1 vote
1 answer
53 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 ...
Abubakar Mujahid's user avatar
0 votes
1 answer
35 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 ...
donkeydonkey's user avatar
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 ...
Preethi M's user avatar
1 vote
1 answer
82 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 ...
Ajit's user avatar
  • 827
0 votes
1 answer
62 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 ./...
Mr Coder's user avatar
  • 923
0 votes
0 answers
65 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 ...
Immanuel John's user avatar
5 votes
1 answer
165 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-...
Deepak Chaudhary's user avatar
5 votes
1 answer
79 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 ...
Abubakar Mujahid's user avatar
3 votes
1 answer
79 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 ...
Max's user avatar
  • 31
1 vote
1 answer
35 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(&...
donkeydonkey's user avatar
1 vote
1 answer
97 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 ...
Mr Coder's user avatar
  • 923
1 vote
1 answer
68 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: [...
Arjan van Eersel's user avatar
1 vote
1 answer
41 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.
Preethi M's user avatar
0 votes
0 answers
32 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?
Arunjot Singh's user avatar
1 vote
0 answers
53 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 ...
user4676's user avatar
0 votes
1 answer
109 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-...
Syed Kamran's user avatar
1 vote
1 answer
76 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 ...
Arjan van Eersel's user avatar
1 vote
1 answer
14 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::...
Arjan van Eersel's user avatar
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 ...
Mr Coder's user avatar
  • 923
2 votes
0 answers
57 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 ...
rirotho's user avatar
  • 113
0 votes
0 answers
187 views

Rust Compile Error: Unresolved imports crate::pallet, crate::types::Types::Config

I am working on a Rust project where I have multiple modules. I'm facing an issue with unresolved imports when I try to compile my code. Here's the relevant code structure: types.rs pub mod Types { ...
Mr Coder's user avatar
  • 923
2 votes
1 answer
163 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 ...
Ipsa Gupta's user avatar
1 vote
1 answer
93 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 : ...
Mr Coder's user avatar
  • 923
0 votes
1 answer
136 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 ...
Alan Ma's user avatar
  • 47
1 vote
0 answers
17 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. ...
Mr Coder's user avatar
  • 923

1 2
3
4 5
13