github: https://github.com/hamster-shared/hamster
hamster is a blockchain-based blockchain infrastructure service. Any computing device can easily access the Hamster network.
Hamster Nodes are the underlying chain nodes of the Hamster Network and provide services to the entire Hamster Network.Hamster node is a custom node built on Substrate framework . It provides basic functions such as provider registration, calculating market, and executing orders.
Hi! Thank you for choosing Hamster.
Hamster is a blockchain that providers infrastructure service.
We are excited that you are interested in contributing to Hamster. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
-
Issues are exclusively for bug reports, feature requests and design-related topics. Other questions may be closed directly.
-
Before submitting an issue, please check if similar problems have already been issued.
-
Fork this repository to your own account. Do not create branches here.
-
Commit info should be formatted as
[File Name]: Info about commit.
(e.g.README.md: Fix xxx bug
) -
If your PR fixes a bug, please provide a description about the related bug.
-
Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
- main: 1.0.0 code, for prod
- develop: 2.0.0 dev code, for test
First, complete the basic Rust setup instructions.
Use Rust's native cargo
command to build and launch the template node:
cargo run --release -- --dev --tmp
The cargo run
command will perform an initial build. Use the following command to build the node
without launching it:
cargo build --release
Once the project has been built, the following command can be used to explore all parameters and subcommands:
./target/release/node-template -h
The provided cargo run
command will launch a temporary node and its state will be discarded after
you terminate the process. After the project has been built, there are other ways to launch the
node.
This command will start the single-node development chain with persistent state:
./target/release/node-template --dev
Purge the development chain's state:
./target/release/node-template purge-chain --dev
Start the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/node-template -lruntime=debug --dev
Once the node template is running locally, you can connect it with Polkadot-JS Apps front-end to interact with your chain. Click here connecting the Apps to your local node template.
If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.
├── docs docs
├── node substrate node module package
│ └── src substrate nodesource package
├── pallets substrate pallets package
│ ├── provider computing provides contract packages
│ │ └── src Computing provides contract implementation source code
│ ├── resource-order resource order contract package
│ │ └── src resource order contract implementation template
│ └── template substrate pallet template
│ └── src substrate pallet template hello-world case
├── primitives public object package
│ └── src public object source package
├── runtime substrate runtime package
│ └── src substrate runtime implementation package
└── scripts substrate run tool script directory
- provider: Provide functions such as registering resources, modifying the unit price of resources, adding rental hours and deleting resources
- resource-order: Provide functions for purchasing resources, executing orders, heartbeat reporting, pledge amounts, retrieving rewards, cancelling orders, renewing orders, etc.
Thank you for considering your contribution to hamster!
If you use this project for commercial purposes, please comply with the Apache2.0 agreement and retain the author's technical support statement.