substrate-package | Known working releases of the Substrate Node Template | Blockchain library
kandi X-RAY | substrate-package Summary
kandi X-RAY | substrate-package Summary
Known working releases of the Substrate Node Template, Substrate Module Template, and Substrate UI.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of substrate-package
substrate-package Key Features
substrate-package Examples and Code Snippets
Community Discussions
Trending Discussions on substrate-package
QUESTION
My objective is to store hash values in the substrate chain. I have declared the storage and the module for it in the following code:
...ANSWER
Answered 2020-Mar-17 at 18:13You should be using a hash of known size, so do something like:
QUESTION
Right now, I can add a submodule. Make changes, add and commit. However, I cannot push. It gives me the error.
Here's what I do:
git submodule add --branch v1.0 https://github.com/substrate-developer-hub/substrate-package
I run a simple shell script within the submodule
...ANSWER
Answered 2019-Oct-08 at 04:54You need to be a contributor of substrate-developer-hub/substrate-package
in order to be able to push back to that repository.
If you need to make modifications, you should:
- fork that repository
- add the fork as a submodule
- make changes in it, add, commit and push: the push will work, since it is your own repository.
- make a PR (Pull Request) to the original forked repository if you want your changes integrated back.
QUESTION
ANSWER
Answered 2019-Sep-14 at 10:59Let's try to address a few of the different topics you asked:
what is the difference behind build.sh and cargo build
The Substrate runtime is compiled to both a Native binary and a Wasm blob. In Substrate v1.0, these compilation steps are separate. build.sh
compiles your runtime to Wasm, while cargo build
compiles your entire node (like the CLI, database, etc..) including a native version of your runtime.
It seems that without purge-chain both the
substrate_node_template_runtime_wasm.compact.wasm
and./target/release/node-name
are not updated.
It is important to understand the specifics happening in the background here. When you run a node, a database is stored locally which has your chain state. So if you start a node with ./target/release/node-name --dev
for 50 blocks, stop the node, and then start it again, it will continue right where you left off (at block 51).
Remember that as part of your node's genesis configuration, the Runtime Wasm is stored on chain, and used to determine which version of the runtime you should run (native vs Wasm).
If you recompile your Wasm and your Native binary, and run it without doing anything else, you will see no differences. Even though your node binary is totally new and updated, it is using the same database with the old chain state. This means that in your database, you also have the old Wasm, and when the node does it's check for which version to use, it will fallback to use the Wasm from your database!
If you want your node to pull the latest changes you made, you can do one of two things:
Trigger an on-chain upgrade of your Wasm runtime. This will make your database have the latest runtime code, and thus your node would use the latest changes.
Purge your chain to restart your genesis. This will delete any old state of your Substrate blockchain, and ultimately populate the chain state with the latest Wasm runtime, which should agree with your node.
My suggestion of:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install substrate-package
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page