Release scalechain embedded edition
Closed this issue · 2 comments
Kangmo commented
What
Release ScaleChain embedded edition
Why
Need to make ScaleChain run under embedded systems to experiment virtual currencies in small devices such as lego mindstorms ev3, rcx2.0, rp II, and Intel edison
How
- Make sure that tests passed under leJos
- create a tag v0.8
- Upload a release with a release node.
Kangmo commented
Introduction
ScaleChain Embedded Edition runs on small devices such as Lego Mindstorm ev3, Intel Edision, RP II, enabling them to issue and transfer assets and virtual currencies.
17 RPC(remote procedure call)s
- Help
- GetBestBlockHash
- GetBlock
- GetBlockHash
- SubmitBlock
- GetPeerInfo
- DecodeRawTransaction
- GetRawTransaction
- SendRawTransaction
- ImportAddress
- GetAccount
- GetAccountAddress
- GetNewAddress
- GetReceivedByAddress
- ListTransactions
- ListUnspent
- SignRawTransaction
Example
curl --data-binary '{"jsonrpc": "1.0", "id":1, "method": "getbestblockhash", "params": [] }' -H 'Content-Type: application/json' http://127.0.0.1:8080/
17 CLI(command line interface)s
All RPCs have corresponding CLIs.
Example :
cd bin
# Specify RPC port as PORT environment variable.
PORT=8080 ./scalechain-cli getbestblockhash
How to run
- Connect your device to your desktop using either Wi-Fi or Bluetooth PAN.
- copy scalechain-embedded-v0.8.tar.gz to your device
scp -oKexAlgorithms=+diffie-hellman-group1-sha1 ../scalechain-package.tar.gz root@10.0.1.1:scalechain.tar.gz
- (in your device) unzip tar.gz
gunzip scalechain.tar.gz
- (in your device) untar tar
tar xvf scalechain.tar
- (in your device) execute run-ev3.sh
cd scalechain-package
./run-ev3.sh
Running with two nodes
The default configuration files work when you run only one node for testing purpose.
If you want to run two nodes, you need to change the following sections in the following files.
config/scalechain.conf
scalechain {
...
p2p {
...
peers = [
# List ip addresses and ports for the nodes you want to create in your blockchain network.
{ address:"127.0.0.1", port:"7643" },
{ address:"127.0.0.1", port:"7643" }
]
}
...
}
config/hosts.config
#server id, address and port (the ids from 0 to n-1 are the service replicas)
0 127.0.0.1 11000
1 127.0.0.1 11001
7001 127.0.0.1 11100
config/system.config
#Number of servers in the group
system.servers.num = 2
#Maximum number of faulty replicas
system.servers.f = 0
...
#Replicas ID for the initial view, separated by a comma.
# The number of replicas in this parameter should be equal to that specified in 'system.servers.num'
system.initial.view = 0,1
...
#This sets if the system will function in Byzantine or crash-only mode. Set to "true" to support Byzantine faults
system.bft = false
Kangmo commented
done