Questions tagged [substrate-node]

Questions about the included blockchain node in the main Substrate code-base.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Subscribing events from Polkadot blockchain

I would like to ask you how to subscribe events from Polkadot blockchain? I am writing a rust application and I need this functionality there. Is the using Substrate the right direction to achieve ...
user avatar
  • 1
-1 votes
0 answers
9 views

How to use the created asset as Free Balance

I want to create a new Asset names PET in Substrate. What I did is from the PolkadotJS App Created and Minted the asset using the account Alice I want to make this assetid to use as Freee Balance and ...
user avatar
  • 105
-2 votes
0 answers
28 views

Substrate v3.0 Compilation Error when requesting modules from workspace

I get these errors on compilation, although all the dependencies are specified correctly. I've went through the repo of substrate v3 and the code has been merged as expected. Is there a need to use a ...
user avatar
0 votes
1 answer
6 views

How do I hardcode asset id's?

Using pallet-assets, how do I create a pallet that has hardcoded (pallet-)asset id's for it's on-chain assets that the pallet handles? I wasnt able to find a good documented way to do this
user avatar
0 votes
0 answers
9 views

Similar eth_call for substrate

a function like we have in ethereum : eth_call exists for substrate ? Thank you.
user avatar
  • 51
0 votes
0 answers
12 views

Grafana Dashboard not populating the basic node metrics data

I am unable to populate substrate node metrics data in Grafana dashboard. I was following the instructions as shared in substrate doc Visualise Node Metrics I am able to establish the connection ...
user avatar
1 vote
1 answer
13 views

Is there a way to cap the amount of weight that a type of extrinsic can consume in a block?

My understand in substrate is that there are three types of dispatches, normal, operational, and mandatory. This types of dispatch classes can consume a portion of the total weight in a block. I can ...
user avatar
  • 207
-1 votes
0 answers
14 views

Using Graph with Substrate

Does Substrate support graph storage for the blockchain? To clarify, if the data model that needs to be stored on chain is organized like a graph node in json or json-ld, can the data be stored in ...
user avatar
0 votes
0 answers
27 views

Would it be possible to run solochain and parachain from single code base?

A few months ago, we worked on a parachain and have been trying to integrate into Kusama but we couldn't win the slot. This is affecting our business. Would it be possible to have a single code base ...
user avatar
1 vote
1 answer
27 views

Substrate Node v3.0 getrandom Compilation error

The error described below is produced when attempting to compile the node upgraded to v3. The Cargo.toml files indeed specify the js feature; the issue occurs when compiling packages within Cargo.lock,...
user avatar
0 votes
0 answers
9 views

How to test forkless runtime upgrade with Substrate Parachain Template [duplicate]

I am following https://docs.substrate.io/tutorials/v3/cumulus/start-relay/ to test para chain on local by connecting with local relay chain. I am able to connect parachain with relay chain. I also ...
user avatar
0 votes
0 answers
21 views

Guidelines for Substrate based standalone blockchain with POS consensus

what are the guidelines to create a standalone substrate blockchain with POS consensus mechanism and people can join the network as validators and get rewards?
user avatar
1 vote
0 answers
31 views

What is the best way to make a cross contract call on Ink!

I found 2 ways to make cross contract calls on ink!. The first is in this link here where another contract is called directly, The second is in this link here where a reference(ref) is being used. I ...
user avatar
1 vote
0 answers
13 views

Era time is not completing

I have deployed my blockchain sometime ago and just checked that the era time is stuck, i have tried to forceNewEra() using sudo command, i have also tried forceNewEraAlways() but it changes the era ...
user avatar
0 votes
1 answer
16 views

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types

I am using the latest substrate-node-template few weeks back it was building fine. But the same project isn't building now, I did not do any changes. Error is occurring in runtime interface. I am ...
user avatar
0 votes
1 answer
31 views

Computer freezes when compiling substrate

I am trying to run all of the tests in the substrate codebase. When the pc gets to the 1670th dependency it freezes. All of my RAM is being used and the pc won't respond. I have 16GB of RAM, Ryzen 5 ...
user avatar
  • 59
0 votes
1 answer
21 views

Do I need to write migration script if upstream pallet's storage has been changed?

I have my substrate blockchain application based on Polkadotv0.9.16. I want to upgrade it to latest Polkadot version v.0.9.21. I will be doing this step by step, version by version to avoid big ...
user avatar
0 votes
0 answers
17 views

kubernetes public node behind dns & load balancer

I have a problem with our parachain deployment in kubernetes. Currently we have setup that works but its very a bit hacky and i would like to know if its possible to set it up the way we want. We ...
user avatar
  • 41
1 vote
1 answer
14 views

Recurring Proposal on Substrate Frontend

So from polkadot js (UI) while creating treasury proposal and want to make it recurring per cycle, you do you achieve that? Say set the segment input in the picture attached to any positive integer, ...
user avatar
0 votes
0 answers
19 views

Best practice upgrading bootnodes

What is the best practice for upgrading boot nodes on a live chain ( if we don't have the node id file ) ? Just change the node id in the genesis file, recompile and upgrade all the bins ?
user avatar
  • 175
-1 votes
0 answers
16 views

Adding babe pallet in node-template

I am trying to add babe pallet in node-template,as there is lots of dependency of other pallets in babe pallet like staking,authority-discovery etc.. so I added all those dependencies but i am facing ...
user avatar
0 votes
0 answers
23 views

Running a listener node in ReadOnly mode

I would like to run a non-validator node (listener node) and prevent it from accepting and broadcasting transactions (ReadOnly mode). Except for accepting transactions, I would like it to behave like ...
user avatar
  • 217
1 vote
0 answers
23 views

How do I customize or view all the available Substrate-Prometheus metrics

I would like to view or define custom metrics on Substrate node. Also, I would also like to access the alert rules as currently it returns PAGE NOT FOUND:
user avatar
1 vote
0 answers
31 views

Signature getting rejected by node when submitting a balance transfer on Westend

I'm involved in a .NET substrate-based project and I started working towards an implementation for making balance transfers on Substrate. I would swear that I'm doing everything exactly the same way ...
user avatar
  • 123
5 votes
0 answers
31 views

Are Offences ever pruned?

In our runtime we have a custom implementation of offence reporting. I want to write an adapter for grandpa equivocation offences (implementing the ReportOffence trait), and have been using the ...
user avatar
0 votes
0 answers
17 views

How to enable breakpoints in IntelliJ

I am using IntelliJ as Ide for substrate development. I would like to enable breakpoints to debug it. How can I? Thank you!
user avatar
1 vote
1 answer
27 views

Clarity on storage read/write caching

I came across the following substrate recipe Cache Multiple Calls that explains how we can cache multiple reads by cloning the value or copying. Is this still a valid recipe? My understanding is that ...
user avatar
  • 207
1 vote
0 answers
31 views

Getting error in rust while compiling substrate node-template

I am trying to add the staking pallet with other dependencies in node-template and getting this error during compiling, I will be thankful if someone help me to resolve this issue
user avatar
0 votes
0 answers
5 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 = "...
user avatar
  • 121
0 votes
0 answers
10 views

Error from construct_runtime!() in mock.rs

For a pallet I am trying to write unit tests, the pallet config looks like below: #[pallet::config] pub trait Config: CreateSignedTransaction<Call<Self>> + frame_system::Config {} and for ...
user avatar
2 votes
4 answers
179 views

How to speed up compilation

I was wondering how to speed up the substrate build? it takes me about half an hour to get the binaries (without cache) any leads are welcome other than changing my laptop!
user avatar
3 votes
1 answer
26 views

the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256` & `ethereum_types::U256`

I am using: ethereum-type version = "0.12", codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"]} scale-...
user avatar
  • 121
0 votes
1 answer
24 views

Error expected struct `AccountId32`, found associated type when saving an AccountId who

I have a data structure as follows // definition for account id is // pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId; use primitives::{AccountId, ...
user avatar
  • 105
1 vote
1 answer
35 views

Do we need to resubmit a crowdloan, if we don't win the slot?

I have opened a crowdloan to get enough funds to win a parachain slot on Kusama. I just want to know what to do if I don't get enough funds and I don't win the slot: Do I need to resubmit the ...
user avatar
1 vote
0 answers
16 views

type annotations needed in libp2p-noise

On cargo build --release in my substrate project I am getting error[E0282]: type annotations needed --> /home/asmita-mfs/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/...
user avatar
  • 121
0 votes
0 answers
28 views

How to get on-chain data on pallet?

I want to get some 'trustful' on-chain data on the pallet, for example, get transaction data by transaction hash. I found Offchain Workers might do that job but is it really trustful because the API ...
user avatar
0 votes
0 answers
17 views

offchain http issue

I have integrated offchain http cal to fetch ibfo from infura as below ''' fn fetch_block(block: &str) -> Result<BlockHeader, http::Error> { // debug::native::debug!("INFURA: ...
user avatar
  • 121
1 vote
1 answer
40 views

Acala local testnet with parachain-launch not producing blocks

I am currently working on trying to add a token to Karura. In order to ensure I am doing it correctly I need to run Karura and my chain on a local relay chain. To do this I am using following the ...
user avatar
  • 11
2 votes
1 answer
23 views

How to check if a node's p2p endpoint is working properly?

Is there a way to verify that an endpoint is properly set up to receive p2p connections using ping, curl or some other tool? The reason I ask this is because I'd like to set up a proxy to use a custom ...
user avatar
1 vote
0 answers
13 views

How are polkadot bootnodes set up?

I'm trying to set up my own public blockchain and have been running into issues when setting up a bootnode to be accessible over DNS rather than IP4. Based on the Polkadot chain specification, their ...
user avatar
3 votes
1 answer
36 views

How to setup bootnode to use DNS address instead of IP4?

I currently have a node running on the cloud and I've set its websocket port to a custom domain following Polkadot's Nginx config (here). I would like to be able to use this node as a bootnode for ...
user avatar
1 vote
2 answers
29 views

How to connect to cloud hosted node using WebSocket?

I'm currently running a node on a cloud machine and I'm running into several issues when trying to connect to it using the Polkadot Portal. I've tried doing it in two ways, the first is by running the ...
user avatar
0 votes
0 answers
24 views

How to connect two nodes running on different computers?

I'm currently trying to deploy a private blockchain and I'm having problems trying to have nodes running on different machines but still communicating with each other. I've created a docker image ...
user avatar
0 votes
2 answers
51 views

How to execute an ELF binary after a successful transaction

I am working on figuring out an efficient way to run an ELF binary after successful transaction. I also want to pass arguments along the execution. Example: /bin/ping 1.1.1.1 OCW might be a solution, ...
user avatar
  • 3
2 votes
1 answer
41 views

Perform large migration between substrate versions

We want to perform a large migration on a chain composed with standard pallets ( balance, babe, ... ) to a most recent substrate tag which is polkadot-v0.9.18. Is there a way to call all the ...
user avatar
  • 175
0 votes
2 answers
155 views

Why is substrate written like this? [closed]

I am curious about the way substrate is written. Let's take for example the assets pallet. Most of the functions in the lib.rs file don't reveal too much detail, but enough to understand what each ...
user avatar
  • 59
1 vote
1 answer
23 views

no function or associated item named `set_block_number` found for struct `frame_system::Pallet` in the current scope

I have updated rust version. when i try to build the frontier template i am getting the below error: * error[E0599]: no function or associated item named `set_block_number` found for struct `...
user avatar
0 votes
2 answers
24 views

Substrate Pallet::Call, unpack the Pallet:Call's content

In default Substrate-Node-Template I want to make some actions inside validate_transaction function which is located in runtime/src/lib.rs: fn validate_transaction( source: ...
user avatar
1 vote
1 answer
19 views

Is it possible to give Balance for transactions?

I know that transactions require certain fees to ensure the correctness of the network, but i was wondering if it is possible to do the reverse operation. I want to give users that send transactions ...
user avatar
  • 542
0 votes
2 answers
52 views

Custom RPC parameters

I'm trying to return an item that is within a storageMap. Its key is a Vec(u8), but I don't know how to send this type using a curl call. I tried using the id as string and using its hex version and I ...
user avatar
  • 542