Questions tagged [polkadot]

Use this tag for questions about the Polkadot blockchain network platform. General questions about Polkadot should be asked at https://substrate.stackexchange.com

203 questions
3
votes
2 answers

Is it feasible to implement a Raft/PBFT like (leader election between authorized nodes) consensus algorithm in the substrate?

I'm new to the substrate. I'm trying to improve the availability of block generation of permissioned networks by substituting Aura with Raft/PBFT like consensus algorithm. I'm referring to an algorithm that solves the "who can generate blocks"…
Lavoris
  • 71
  • 5
3
votes
1 answer

How are the development keys (Alice) added to the local keystore from `chain_specs.rs`?

I am trying to understand the internal logic of adding development keys to the local keystore in Substrate for development purposes. For example I can see that the session keys for Alice are being generated and added to the genesis config in…
Jdawg287
  • 117
  • 5
3
votes
1 answer

What flavor of underlying EVM is Substrate Frontier using (the EVM-compatible client)?

I was able to successfully build my own Ethereum-compatible Substrate by basically following the Substrate Dev Frontier Workshop tutorial ( which uses SputnikVM as the underlying EVM engine, as per the Frontier Evm Documentation ). I am aware of the…
Andy B.
  • 181
  • 2
  • 9
3
votes
2 answers

How do you pass and handle arguments to a `ChainExtension`?

I have an ink! contract which calls a extension method fetch_random(). // runtime/src/lib.rs pub struct FetchRandomExtension; impl ChainExtension for FetchRandomExtension { fn call( func_id: u32, env:…
lovelikelando
  • 7,593
  • 6
  • 32
  • 50
3
votes
1 answer

Address of assets in substrate blockchain

Every ERC20 token ethereum contract has an address. Substrate has assets pallet. How will I get the address of the assets or tokens so that it can be listed on exchanges?
Amiya Behera
  • 2,210
  • 19
  • 32
3
votes
1 answer

Why use ::Source instead of plain T::AccountId?

According to this PR, all dispatchable calls should use ::Source instead of T::AccountId. Why is it better to handle transfers with the lookups instead of addressing users with their accounts? How the lookups in Substrate…
Petr Mensik
  • 26,874
  • 17
  • 90
  • 115
3
votes
1 answer

How to implement background thread in Substrate?

Let's imagine I want to design a system similar to crowdfunding or to the auction. There is a fixed period of time for which such an event is running. Can I start a background thread that will periodically check whether the end time if the event has…
Petr Mensik
  • 26,874
  • 17
  • 90
  • 115
3
votes
2 answers

What are the Proof-of-Stake[PoS] algorithms available

What are the Proof-of-Stake[PoS] algorithms available which can be configured on substrate-node-template
3
votes
2 answers

Blocks are not being finalized in a private network

I am following the tutorial on running a basic 2 node private network in substrate. I have used subkey to generate aura and grandpa keys for both of the nodes and added the keys to keystore. I thought I did everything correctly, both of the nodes…
beqaabu
  • 74
  • 1
  • 8
3
votes
1 answer

Storage access at previous blocks: i.e storage::get(&key, &block)

How can my pallet access a substrate chain's storage at a previous block? For example: storage_name::get(&key, &block_number); Possible, is there documentation? Not possible, can we request this feature?
3
votes
2 answers

Use custom Substrate node name (Substrate FRAME pallet + Polkadot/Substrate frontend)

Scenario: You want to submit an extrinsic to your custom Substrate node based on the substrate-node-template by using the Polkadot/Substrate frontend. You have renamed the Substrate node either manually by carefully searching and replacing all…
sea212
  • 299
  • 2
  • 12
3
votes
1 answer

Error Connecting to Substrate: Unable to initialize the API: createType(StorageKey):: Derived

I've got a Substrate node running locally on my PC, following this tutorial. https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact. It can be viewed on two ports: Local: …
Sarah Kay
  • 81
  • 5
3
votes
1 answer

What does `.into()` do when called on `RawOrigin:Signed(who)` and how does the context affect it?

I have seen .into() used several times like frame_system::RawOrigin::Signed(who).into(). From what I understand it does some conversion but the docs for into do not make it clear (to me) how to know what it is converting to. For context a specific…
zeke
  • 320
  • 1
  • 6
3
votes
1 answer

When is an account in Polkadot / Kusama reaped?

Polkadot has the concept of reaping (killing) accounts whose balance falls below an existential threshold. What is that threshold and how often is the reaping process executed on the network to purge it of low-balance accounts?
Swader
  • 11,387
  • 14
  • 50
  • 84
2
votes
2 answers

Error adding Custom RPCs for custom pallet Substrate

I've been working with parity's contracts node (latest version) and the substrate template node (tag polkadot-v0.9.18), both present the same issue when compiling. I have a very simple pallet that stores certain items. The main structure is the…
andresvsm
  • 165
  • 1
  • 7
1
2
3
13 14