Questions tagged [substrate]

Substrate is a framework for blockchain prototyping and development written in Rust. General questions about Substrate should be asked on https://substrate.stackexchange.com

Substrate is a framework for prototyping and development written in . At its heart, Substrate is a combination of three technologies: , and AfG Consensus. It is both a library for building new blockchains and a skeleton key of a blockchain client, able to synchronize to any Substrate-based chain.

Substrate chains have three distinct features that make them next-generation: a dynamic, self-defining state-transition function (STF), light-client functionality from day one and a progressive consensus algorithm with fast block production and adaptive, definite finality.

The STF, encoded in WebAssembly, is known as the runtime. This defines the execute_block function and can specify everything from the staking algorithm, transaction semantics, logging mechanisms and procedures for replacing any aspect of itself or of the blockchain’s state (governance). Because the runtime is entirely dynamic, all of these can be switched out or upgraded at any time. A Substrate chain is very much a living organism.

587 questions
0
votes
1 answer

How can I initialize a user's balance in a Substrate blockchain?

When I start my Substrate blockchain, I want to initialize users with some free balance. How can I achieve this? What if my chain is already running and I do not want to restart it?
Shawn Tabrizi
  • 12,206
  • 1
  • 38
  • 69
0
votes
1 answer

What's the function of `` in Substrate's `fn deposit_event() = default`?

In reference to the Substrate Collectables Workshop, what does the actually do and refer to in fn deposit_event() = default;? Can I omit it when my Event doesn't include for example AccountId?
mountbranch
  • 334
  • 2
  • 7
0
votes
1 answer

How do I define a custom type with the oo7 Substrate library?

I am using the Substrate Bonds library (oo7) to generate custom UI for my custom Substrate Runtime Module. To support my custom module in the Substrate UI, I need to define a custom type. How do I do that?
Shawn Tabrizi
  • 12,206
  • 1
  • 38
  • 69
0
votes
1 answer

In the oo7 Substrate UI, Alice has zero funds

In the Substrate-UI using the Bonds library (oo7), it shows that "Alice" has zero funds on a development chain. I also notice that some accounts are labeled as ed25519 and other are sr25519. How can I repair this and gain access to the correct…
Shawn Tabrizi
  • 12,206
  • 1
  • 38
  • 69
-1
votes
1 answer

I am attempting the quick start tutorial and I am at this command "cargo build --release --package node-template-runtime" on this page

https://docs.substrate.io/quick-start/modify-the-runtime/ and I get this error after it completes a bunch of the build. the current crate is indistinguishable from one of its dependencies: it has the same crate-name pallet_grandpa and was compiled…
-1
votes
2 answers

Substrate: How to perform Parachain Runtime Upgrade via Democracy using Chopsticks

I am trying to perform a runtime upgrade using Acala's Chopsticks. I followed the authorize > enact an upgrade flow for my parachain, and it works. To produce blocks in local Polkadot, i connected through ws and executed the command: { "jsonrpc":…
Jitterbug
  • 302
  • 1
  • 11
-1
votes
1 answer

Start Relay Chain error "substrate : command no found"

I am trying to do a substrate tutorial, "Start your relay chain". (https://docs.substrate.io/tutorials/v3/cumulus/start-relay/) Here, I copied the code and run it to start the alice validator. ./target/release/polkadot \ --alice \ --validator…
-1
votes
1 answer

How use hex::encode in Substrate offchain worker?

I'm calling hex::encode from offchain worker, but compilation fails with: state.serialize_field("account_id", &hex::encode( self.account_id.encode().as_slice() ) )?; | ^^^^^^ not found in `hex` My…
psu
  • 111
  • 1
  • 10
-1
votes
1 answer

How to open localhost:8000 using VPS Ubuntu

hello I need help how to open http://localhost:8000 from my pc. because my project polkadot substrate installed on a VPS Ubuntu, after I try to open IP:8000 it also doesn't work Images
-1
votes
1 answer

Error when run substrate-front-end-template$ yarn install

I have been following the instruction to Install the Front-end template , error when I run substrate-front-end-template$ yarn install.The error is following: Error: Cannot find module 'worker_threads' ## Heading ##at…
-1
votes
1 answer

What are current and finalized blocks in the substrate blockchain node template?

I have a question regarding : substrate-node-template (https://github.com/substrate-developer-hub/substrate-node-template). I have run the node together with the frontend and I noticed there is some activity on the blockchain event without…
balteo
  • 23,602
  • 63
  • 219
  • 412
-1
votes
1 answer

Where am I to run `yarn start` for substrate front end template?

I went on an ubuntu terminal and ran substrate-front-end-template then ran yarn start but nothing seems to happen. Or where exactly am I to run yarn start. When I run yarn start on ubuntu, I'm met with this error message…
Stephen
  • 11
  • 1
-1
votes
1 answer

How to launch a substrate blockchain as a test network?

Please forgive my stupid question here. To launch my node-template under the TEST NETWORKS category, do I need to host my own polkadot/apps like what GeekCash did? What is the correct command to perform on substrate-node-template? the examples are…
Jitterbug
  • 302
  • 1
  • 11
-1
votes
1 answer

Substrate node template tutorial connected to polkadotjs app showing 0 account balances

I am new to this I am following the Substrate node and new to. t template tutorial and connected to the Polkadot js app. When I navigate to the Accounts section 0 balances are shown for all the accounts. How to define balances for…
not 0x12
  • 19,360
  • 22
  • 67
  • 133
-1
votes
1 answer

Configuring Substrate on MacOS

Doing a Substrate tutorial for the first time and not able to find an answer elsewhere on the web - getting this error when I try to load Substrate framework: $ curl https://getsubstrate.io -sSf | bash -s -- --fast Mac OS (Darwin) detected. ==>…
Mountaineer
  • 7
  • 1
  • 2