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.
Hamster nodes need to perform block-out and packetization transactions, so they have certain requirements on the system hardware. At the same time, since the block-out process and packaged transaction process require high network stability, we recommend that the block-out node use a fixed public IP, otherwise it will bring losses due to block-out instability and other situations.
We offer two different ways to start the underlying chain, one as a docker and also by compiling the source code directly, we recommend the first one here
docker is the easiest way to build, we recommend using docker for building Hamster nodes
Points to note before run in docker:
- You need to install docker by yourself before starting, refer to docker official website for details
- You can choose to run your own test node with Docker. The start command is as follows
- modify YourOwnPath and customize the location where the files are stored
- modify YourNodeName
docker run -p 30333:30333 -p 9944:9944 -p 9933:9933 --restart=always -d -v ~/YourOwnPath/data:/tmp/db --name=hamster hamstershare/hamster:v1.0.0 /opt/ttchain/node-template --dev --name YourNodeName --ws-external --rpc-external --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns
First, complete the basic Rust setup instructions.
git clone https://github.com/hamster-shared/hamster.git && cd hamster
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
./target/release/node-template --dev --ws-external --rpc-external --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns
First go to polkadot.js.org, click the icon on the top left corner, then select "DEVELOPMENT", click "Local Node", and finally click "Switch" to enter the blockchain browser interface
Or, if your chain node has a public ip, you can enter your own ip in the address field below and click save.
Then click on "Accounts", "Accounts", "Add account".
Please make sure to save your own mnemonic seeds and click "Next". Enter name and password.
All transactions on the chain require tokens, you can try a test account first and trade a certain amount of tokens into your account
Select "send", select the account and amount, and click "Make Transfer"
At this point, you have a test chain and the address on the test chain