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
3 votes
1 answer
69 views

Substrate Node and Docker Compose

The docker-compose.yml file has been removed from the Substrate Node Template. I previously found that using Docker Compose is a great way to get started with the node. The docker-compose.yml file is ...
Anas Tiour's user avatar
4 votes
1 answer
81 views

This function takes 2 arguments but 1 argument was supplied

I'm working on a Substrate project, and I have the following storage definition: #[pallet::storage] #[pallet::getter(fn bids)] pub(super) type Bids<T: Config> = StorageDoubleMap< _, ...
Mr Coder's user avatar
  • 873
3 votes
0 answers
34 views

the function or associated item `offchain_worker` exists for struct

i wanna add a new pallet in substrate runtime.rs this is the contract of the file : #![cfg_attr(not(feature = "std"), no_std)] /// Edit this file to define custom logic or remove it if it ...
Mr Coder's user avatar
  • 873
3 votes
2 answers
44 views

Substate node not compiling on Archlinux

Recently anytime i try to run substrate-node i get this error message, all attempts to update packages hasn't been helpful Error: Service(Client(VersionInvalid("cannot deserialize module: ...
Abimbola Adebayo's user avatar
1 vote
1 answer
28 views

Stash does not have enough balance to bond

I am getting this issue while running node using ./target/release/node-template --dev this command. I try to change GenesisConfig -> balance same as substrate example from here and add ...
Ganesh11's user avatar
  • 1,208
2 votes
1 answer
77 views

Why my node doesn't create any block?

I Added pallet-staking and it's build fine. When I'm running the node in dev mode using ./target/release/node-template --dev this command, it doesn't create any blocks. Can someone point out me why ...
Ganesh11's user avatar
  • 1,208
3 votes
0 answers
32 views

How to compare current date with a stored date in a Substrate blockchain module?

I'm working with a Substrate blockchain and have a structure with a field named end_date. I'd like to check if the current date is greater than end_date within a Substrate runtime module, but I'm ...
Mr Coder's user avatar
  • 873
2 votes
1 answer
39 views

the trait bound `RuntimeOrigin: From<pallet_collective::RawOrigin<AccountId32, Instance2>>` is not satisfied

This is my github repo here. I am getting this issue. I try to look how pallet_collective implemented in substrate main branch runtime here but I can't able to find any solution. Someone please help ...
Ganesh11's user avatar
  • 1,208
-1 votes
1 answer
64 views

The trait bound is not satisfied

I am using staking-pallet in my runtime here , added all the requirements and after that I try to check dependencies using cargo check -p node-template-runtime --release this command but I'm getting ...
Ganesh11's user avatar
  • 1,208
0 votes
2 answers
50 views

Production ready substrate chain

Currently i am using substrate-node-template and I have done all my work in that I want to make it production ready, Can someone tell me is there any guide that what changes I have to make in the ...
Abubakar Mujahid's user avatar
3 votes
1 answer
46 views

Local Parachain blocks not getting finalized - logs show websocket error

I am following the build a parachain however, after I run the parachain collator and the relay chain validators, and then make a transfer from one account to another (Alice to Bob) on the parachain ...
Neo's user avatar
  • 283
3 votes
2 answers
80 views

Enable to build substrate node template on M2

The following error msg is given out error: failed to run custom build command for `tikv-jemalloc-sys v0.5.3+5.3.0-patched` Clang version Apple clang version 14.0.0 (clang-1400.0.29.202) Target: ...
Nakul Amate's user avatar
2 votes
1 answer
95 views

How to Implement MaxEncodedLen Trait for Structs Containing Vec<u8> in Rust

i'm trying to create a blockchain runtime module using Substrate. I have defined a few data structures with the #[derive(MaxEncodedLen)] attribute, but I'm running into a problem when trying to ...
Mr Coder's user avatar
  • 873
2 votes
1 answer
228 views

1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable`

I've added pallet-nft and pallet-uniques in Relay Chain. All the things are working fine but when I'm signing the transaction in the pallet-uniques fn create(collection,admin), it is showing me this ...
Arunjot Singh's user avatar
4 votes
1 answer
18 views

error[E0282]: type annotations needed --> /libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45

While running this project https://github.com/jimmychu0807/substrate-offchain-worker-demo I'm geting this error: error[E0282]: type annotations needed --> /libp2p-noise-0.32.0/src/protocol/x25519....
S Miss's user avatar
  • 41
1 vote
1 answer
52 views

Duplicate lang item error (E0152) with sp_io crate when integrating Frontier pallets with Substrate

I'm trying to make my Substrate-based blockchain compatible with Solidity and MetaMask. I've cloned Substrate from the polkadot-v0.9.39 branch and am trying to integrate Frontier's Ethereum ...
Mr Coder's user avatar
  • 873
4 votes
1 answer
48 views

What's the difference between calling T::Currency::transfer() and T::Currency::withdraw()

In the crowdfund pallet linked here: https://github.com/substrate-developer-hub/substrate-how-to-guides/blob/main/example-code/template-node/pallets/simple-crowdfund/src/lib.rs the withdraw function ...
Muhammed Rasheed's user avatar
4 votes
1 answer
48 views

Error- Connecting Parachain to Relay Chain: Unsupported or Invalid BabeApi Version

I have already run a relay chain on two ports, but when I try to connect my parachain to the relay chain, I encounter the following error. I have attached a screenshot of the error to this message. I ...
support's user avatar
  • 135
2 votes
1 answer
66 views

How to Integrate a Substrate Chain with MetaMask and Implement Specific Features?

I am currently working on a project that involves creating a Substrate chain and I have several questions related to this: Integration with MetaMask: I want to be able to connect my Substrate chain to ...
Mr Coder's user avatar
  • 873
4 votes
0 answers
132 views

How to solve this Failed to compact generated WASM binary.: Error(UnknownOpcode(192))

For one assignment I have run the command cargo build --release so that I can build the pallet. After that I was getting the error After that according to this- Error Building Substrate contract Node(...
Nakul Agrawal's user avatar
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 ...
Muhammed Rasheed's user avatar
3 votes
1 answer
68 views

Where does the transaction fee go after balance transfer without a treasury pallet in solo chain?

I am using Substrate node template for my application. I have added custom pallet. This is a solo chain. I just want to know where transaction fee goes after a successful balance transfer. I have read ...
Boleng's user avatar
  • 413
1 vote
1 answer
51 views

failed to select a version for `zstd-sys`

```sh error: failed to select a version for `zstd-sys`. ... required by package `zstd-safe v4.1.1+zstd.1.5.0` ... which satisfies dependency `zstd-safe = "=4.1.1"` of ...
Abubakar Mujahid's user avatar
2 votes
1 answer
62 views

Permissioned network with Substrate

I trying to build permissioned network with Substrate. I don't understand diagram following. Let help me explain it. Thanks.
Dung Nguyen's user avatar
1 vote
1 answer
72 views

Cannot dispatch any more messages on lane [0, 0, 0, 0]

I'm sending XCM message from one chain to another through Bridge. But i'm facing an issue for receiving the message. 023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: ...
Arunjot Singh's user avatar
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/...
Abubakar Mujahid's user avatar
1 vote
1 answer
104 views

How to interact substrate node with reactjs frontend?

In ink! smart contract, we upload .contract file on chain and get the deployed contract address and use metadata.json file in frontend to interact with contract. Can someone tell me what's the ...
Ganesh11's user avatar
  • 1,208
3 votes
1 answer
36 views

sp-consensus-babe issue key `branch` is ignored for dependency (sp-consensus-babe)

Hi i am trying to use the sp-consensus-babe but I am having issues when I'm running the command command: cargo build --release The issue that I am receiving is this error: failed to load manifest for ...
Abubakar Mujahid's user avatar
4 votes
1 answer
45 views

Pallet generate store is deprecated how to avoid this warning and compile the code?

I am getting error in #[pallet::generate_store(pub(super) trait Store)] which is showing deprecated warning due to which I could not compile my custom pallet is there any solution
Parth Kohli's user avatar
1 vote
1 answer
81 views

What is distinction between self (lowercase) and Self (uppercase) In Rust?

I am trying to fetch caller address in ink smart contract to apply some checks. let owner = self._check_token_exists(&id)?; let caller = Self::env().caller(); I am confused which one i should use ...
UPENDRA SINGH's user avatar
0 votes
1 answer
55 views

upgrading substrate node from Polkadot 0.9.28 to 0.9.40

I have a substrate node of Polkadot 0.9.28. It is customised to enable contracts, and I have enabled the contract and runtime pallets. The tutorial I worked on is no more available in substrate docs. ...
Stanly Wilson's user avatar
1 vote
1 answer
42 views

How to execute reportEquivocation function in babe pallet?

I was trying to execute a function reportEquivocation(equivocationProof, keyOwnerProof)in the babe pallet . I was stuck in filling the parameters for the same.Could anyone guide me about how to fill ...
Ipsa Gupta's user avatar
0 votes
1 answer
51 views

CustomSpec Balance doesn't change

following this tutorial, I created CustomSpec.json file and this contains balances like this: When I change the default set balance into like this, it doesn't change in polkadotjs frontend. Someone ...
Ganesh11's user avatar
  • 1,208
4 votes
1 answer
33 views

Why doesn't getMetadata show my callable methods as extrinsics in Substrate-node-template

When running Substrate-node-template - basically the Kitties - and with a callable eg create_kitty() as a dispatchableResult in the call pallet, what I assume to be an extrinsic in the metadata, this ...
kim mcclymont's user avatar
1 vote
1 answer
43 views

Cannot create a runtime error=Other("can't convert a memory import into an export: failed to insert a new memory section

I was running my substrate-blockchain on dev mode. And it gave me this error.
Arunjot Singh's user avatar
2 votes
2 answers
21 views

integer literal is too large error

I was following the substate documentation of authorize specific nodes tutorial referance:-https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/ In the add genesis storage ...
Akansha Banerjee's user avatar
0 votes
0 answers
19 views

how to make an extrinsic that allows election commission (author+validator) to upload the encoded candidate list to the blockchain

I am trying to make a substrate solo blockchain for the election voting using homomorphic encryption scheme use case. Till now, I have created a permissioned blockchain, used the node authorization ...
Akansha Banerjee's user avatar
1 vote
1 answer
63 views

unresolved import `amiquip`

I've added new amiquip dependency in the cargo.toml [package] name = "sender" version = "0.1.0" edition = "2021" [package.metadata.docs.rs] targets = ["x86_64-...
Arunjot Singh's user avatar
2 votes
2 answers
94 views

subkey: command not found error

I installed subkey by following instructions https://docs.substrate.io/reference/command-line-tools/subkey/ and ./target/release/subkey --help command is working fine but any other subkey commands are ...
Akansha Banerjee's user avatar
4 votes
2 answers
36 views

Modifying substrate-node-template for voting system use case

As a major project for my college, we are trying to modify the substrate node template for the voting system use case. Can anyone guide us on what would be the most important modules, palettes, and ...
Akansha Banerjee's user avatar
2 votes
0 answers
27 views

no matching package named `sc-network-statement` found

sc-network-statement = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } I am using this package from substrate ...
Ganesh11's user avatar
  • 1,208
0 votes
1 answer
60 views

epoch_config must not be None

This is my substrate-code. Running cargo build --release works fine but while starting node using ./target/release/node-template --dev, I get this error. Thread 'main' panicked at 'epoch_config must ...
Ganesh11's user avatar
  • 1,208
2 votes
1 answer
208 views

Not able to run PolkadotJS apps on local

I tried to clone https://github.com/polkadot-js/apps and run on local. When I execute yarn or yarn install, I get below logs: ➤ YN0013: │ @polkadot/react-identicon@npm:3.4.1 can't be found in the ...
Boleng's user avatar
  • 413
5 votes
1 answer
106 views

How to implement `into_rpc` method in jsonrpsee's rpc macro

I'm trying to add custom RPC to Substrate node template. As explained in the jsonrpsee's proc_macro doc here, I define BalancesApi trait where #[rpc(server)] attribute added, and implement ...
Shunsuke's user avatar
  • 432
11 votes
1 answer
125 views

Understanding service.rs in substrate-node-template

Recently, I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs: 1- In the new_partial() method when ...
dadzerlaze's user avatar
  • 1,073
2 votes
1 answer
89 views

problem with sign wallet for use in substrate and nodejs : Cannot read properties of undefined (reading 'specVersion')

i wanna to craete wallet for user in nodejs and substrate . i using these codes for connect to substrate node and create a wallet : const { ApiPromise, WsProvider } = require('@polkadot/api'); const { ...
Mr Coder's user avatar
2 votes
1 answer
53 views

Error when implementing contract-pallet into substrate-node-template

I was looking to implement smart-contract into substrate-node-template as I do not want to use substrate-contracts-node. I was trying to follow this guide - https://substrate-developer-hub.github.io/...
BHappy's user avatar
  • 45
1 vote
1 answer
34 views

How can i fetch the node identity from cli?

How we can fetch the node identity(local node identity in snapshort) after running the node i would need it so that i can make process automatic to start the second node by using that node key
Pankaj's user avatar
  • 1,896
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 ...
support's user avatar
  • 135
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/...
Arunjot Singh's user avatar

1 2
3
4 5
11