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
3
votes
1
answer
82
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 \...
3
votes
1
answer
150
views
Missing `successful_origin` in implementation when running runtime-benchmarks
With a fresh substrate-parachain-template
I ran cargo build --features runtime-benchmarks
I got errors from a deep dependency in pallet_society, which doesn't seem relevant to the parachain-template's ...
1
vote
1
answer
34
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 ...
0
votes
2
answers
2k
views
error: linking with `cc` failed: exit status: 1 (Mac m1)
Not able to build a project because of this issue:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-arch" "arm64" "/var/folders/5w/...
0
votes
1
answer
56
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. ...
2
votes
1
answer
84
views
Test Case failing on on_initialize hook!
I'm writing a test case for the on_initalize hook!
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(_now: T::...
1
vote
0
answers
34
views
Can't transfer balance in polkadot.js.org?
I start running development node, and try to test about transfer balance in polkadot.js.org
Problem: Make Transfer button only hidden, not show
0
votes
1
answer
35
views
Access storage from another pallet
I need to get the owner of an asset to filter extrinsic calls.
I tight couple the assets pallet to my pallet and I'm trying to access the Asset storage but getting the following error:
How can I ...
0
votes
1
answer
190
views
Build error on substrate-node-template
I'm met with an error when running this command cargo build --release on substrate-note-template.
I haven't really done anything other than git clone to my directory and executed the cargo build ...
0
votes
1
answer
32
views
Use criterion for statistic driven benchmarking of Substrate pallets
Criterion version 0.4.0 seems to support WASM builds: https://www.tweag.io/blog/2022-03-03-criterion-rs/#first-class-wasm-support
Can we us it to benchmark extrinsics of Substrate pallets?
2
votes
1
answer
103
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
1
answer
240
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 ...
0
votes
1
answer
22
views
What is the use case for inherent transactions?
Just for curiosity!
In what conditions we can use Inherent transactions?
Thanks
0
votes
1
answer
36
views
connect custom frontend to my local substrate
I Created custome pallet with substrate in my local system .
I gonna to connect my custome front-end ( Angular ) to my local substrate .
i tryied to do it in angular with these codes :
import { ...
0
votes
1
answer
21
views
how do I add statemine to local parachain setup? where do I find the statemine repo?
I am running a local parachain setup.
how do I add statemine to the network ? is there a github registry for statemine with instructions? basically I would like to setup a local relaychain with assets ...
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 ...
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 ...
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....
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 ...
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: ...
1
vote
1
answer
70
views
How to start a GRANDPA blockchain without any initial voters?
I've tried modifying the repository so initial voters for the grandpa pallet. In doing so, I noticed there are many checks to prevent that modification.
The reason why we do not want any initial ...
1
vote
1
answer
59
views
while building an application logic (use macros in a custom pallet)
[][in build an application logic im facing this error im new to substrate please help me fix this.]
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 ...
2
votes
0
answers
35
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 ...
1
vote
1
answer
37
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", ...
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(...
1
vote
1
answer
42
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:
...
1
vote
1
answer
63
views
Best setup for separate runtimes
I want a "Mainnet" and "Testnet" for my network. It's forked off https://github.com/paritytech/substrate. Mainnet and Testnet will have some parameters set differently, many of ...
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: ...
0
votes
0
answers
17
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-...
0
votes
1
answer
20
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?
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 🙌...
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 ...
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 ...
1
vote
1
answer
52
views
Update ERC-20 Storage slot from Substrate
I'm trying to make a PoC (using frontier template) where I should update the balance of an EVM ERC-20.
I guess that the steps should be as follows:
Calculate the storage slot like this tool does: ...
1
vote
1
answer
55
views
Upgrade from substrate node tag v3.0.0 to last version
We are maintaining a blockchain based on substrate node tag v3.0.0. Now we upgraded to substrate branch polkadot-v0.9.27. (We need to upgrade to support native smart contracts with Ink! with the last ...
0
votes
1
answer
25
views
how to store blocks of development node
I am using the substrate development node and each time I stop the node I lose all the data stored on the blocks.
Is there a way to store these blocks so that I can access them even when I restart the ...
2
votes
1
answer
39
views
Undeclared crate error (pallet_scheduler) when trying to follow the getting started tutorial "Upgrade a running network"
I am trying to following the tutorials at substrate.dev and I am getting stuck on this one. Specifically, when I add this code to my runtime/src/lib.rs file:
impl pallet_scheduler::Config for Runtime ...
1
vote
1
answer
27
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> ...
0
votes
1
answer
30
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 ./...
2
votes
1
answer
37
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 ...
0
votes
1
answer
51
views
panic_with_hook in session change
We are dealing with a runtime panic. We are looking for advice on how to best debug and are looking for help to get past it.
At the change of an epoch we want a function to scan for a specific asset ...
3
votes
1
answer
62
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 ...
0
votes
1
answer
57
views
Check if the funds are locked for LockableCurrency
I'm using fn set_lock inside LockableCurrency trait. It's possible to extend or remove lock, but no way to check if funds are in fact locked. Is this by design? and if so what is a good way to check ...
1
vote
1
answer
72
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)
...
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
0
answers
25
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 ...
2
votes
1
answer
33
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 ...
1
vote
1
answer
27
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.
1
vote
2
answers
125
views
How can I increase contract memory in pallet-contracts + chain-extension?
I am exposing some external functions to ink! contracts via a chain-extension in pallet-contracts. I am essentially passing a vector of bytes as a parameter to a contract method and directly ...