- Make sure Python 3.6+ is installed.
- Install pipenv.
$ pip install pipenv
- Create a virtual environment and specify the Python version to use.
$ pipenv --python=python3.6
- Install requirements.
$ pipenv install
- Run the server:
$ pipenv run python blockchain.py
$ pipenv run python blockchain.py -p 5001
$ pipenv run python blockchain.py --port 5002
Owner Key:PKo,SKo
Operator Party Key:PKp,SKp
Manufacture Key: PKm,SKm
Robot Key:PKr,SKr
Right Map
{
"Robot":"PKr",
"Role":["Owner","Administrator","Operator"],
"Owner":["CMD1","CMD2","CMD3"],
"Administrator":["CMD1","CMD2"],
"Operator":["CMD1"],
}
Command Flow
Owner->Robot( Owner->Operator->(Check Ledger)->Ledger->Operator->Robot )
Sign: SKo(PKp,PKr,CMD) //CMD is public unavailable
Robot->Owner( Robot->Operator->Ledger->Operator->Owner )
Sign:SKr(PKp,PKo,Result)
Ledger Format:
'sender': sender,
'recipient': recipient,
'cmd': Hash(SKo(PKp,PKr,CMD)),
'amount':number #Add Robot will decrease the sender's amount