Added contract id verification. (#180)

* Added contract id config.
* Verify contract id with user/peer challenge.
* Updated cluster scripts.
* Updated node client lib for contract id verification.
This commit is contained in:
Ravin Perera
2020-12-01 16:08:41 +05:30
committed by GitHub
parent de71b97371
commit 596fd2b43c
16 changed files with 140 additions and 56 deletions

View File

@@ -73,6 +73,7 @@ do
# Update contract config.
node -p "JSON.stringify({...require('./tmp.json'), \
contractid: 'dummy', \
binary: '$binary', \
binargs: '$binargs', \
appbill: '', \

View File

@@ -346,6 +346,7 @@ do
# Merge json contents to produce final contract config.
echo "$(cat ./cfg/node$n.cfg)" \
'{"contractid":"dummy"}' \
'{"binary":"/usr/bin/node"}' \
'{"binargs":"'$basedir'/hpfiles/nodejs_contract/echo_contract.js"}' \
'{"peers":'${mypeers}'}' \