编译dev分支的最新代码.
git clone https://github.com/fsn-dev/dcrm-walletService.git
cd dcrm-walletService
git checkout dev
make
./bin/cmd/bootnode -genkey bootnode.key
./bin/cmd/bootnode -nodekey ./bin/cmd/bootnode.key
./gdcrm --genkey node1.key
./gdcrm --genkey node2.key
./gdcrm --genkey node3.key
./gdcrm --nodekey node1.key --rpcport 9011 --port 8011 --datadir ./node1 --bootnodes enode://7aeaca86c21017581af71f0631ce7f62f24e58ad301d0a42f4926354720c30519003e575628089ba2be5108e7f17b8b3153a5ab5c850da3b5e7022d79ec94037@127.0.0.1:4440
./gdcrm --nodekey node2.key --rpcport 9012 --port 8012 --datadir ./node2 --bootnodes enode://7aeaca86c21017581af71f0631ce7f62f24e58ad301d0a42f4926354720c30519003e575628089ba2be5108e7f17b8b3153a5ab5c850da3b5e7022d79ec94037@127.0.0.1:4440
./gdcrm --nodekey node3.key --rpcport 9013 --port 8013 --datadir ./node3 --bootnodes enode://7aeaca86c21017581af71f0631ce7f62f24e58ad301d0a42f4926354720c30519003e575628089ba2be5108e7f17b8b3153a5ab5c850da3b5e7022d79ec94037@127.0.0.1:4440
./dcrm-client -test SetGroup -url http://127.0.0.1:9011 -ts 2/3 -node http://127.0.0.1:9011 -node http://127.0.0.1:9012 -node http://127.0.0.1:9013
./dcrm-client -test REQDCRMADDR -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 1 -url http://127.0.0.1:9011
./dcrm-client -test SetGroup -url http://127.0.0.1:9011 -ts 2/3 -node http://127.0.0.1:9011 -node http://127.0.0.1:9012 -node http://127.0.0.1:9013
./dcrm-client -test EnodeSig -url http://127.0.0.1:9013 -keystore ~/Downloads/UTC--2020-04-23T15-19-31.919Z--4bb81aeee94b383211ece6e840ff6173e74b25b5 -passwd 123456789
./dcrm-client -test EnodeSig -url http://127.0.0.1:9012 -keystore ~/Downloads/UTC--2020-04-23T15-20-09.393Z--f3dc381f4e30e180c0e2fee5405e5424d41d134f -passwd 123456789
./dcrm-client -test EnodeSig -url http://127.0.0.1:9011
./dcrm-client -test REQDCRMADDR -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 0 -url http://127.0.0.1:9011 -sig enode://c015c5d26c76fed1f966e258c576d951774364745b11aba43ac8d1853b47202bde2ec6cbb86072b39497a43f622a779e3a355143db2904a209b955893422824a@127.0.0.1:80110x785a76241ac536ed7282e92d9333a31498aae6ce6f8e51bff9e378efc19a9b7829d5f3ea0895189b682f2eabcf7f0f155ca7a629ad242ea4e198f58491283b5201 -sig enode://6ce5fb11959a34a8f1d66bbf738303951c0774ee35210de1f99f2f5e11ef8aa87704274682c4d4fcb652d111649c7450160f924f25346276f23706653a686088@127.0.0.1:80120xce5d8d248a54bc1960c9365c8336786ac9822e53660193aebac4c06d93d03db02c05db3786ed5599603e024c63ee4024fd91c1ece7d41fdc886ea4aaa9c1c32e00 -sig enode://7564acc03e4464e5e8d75217c235e01291d340b01ddf16881fb9b609cfe421829590ebb6ba6b1555679012d9bd28b1be0c3aa96dac3a7ec3ed6ae391b30a16b6@127.0.0.1:80130x4307924e97063a8f07fd1e8f89d802227bb826da5fe2c3b2955bcaacf7bd327437105c1cfe82f8fa1ec9067cf2825850337e655c7fc0165a5d0d53ab4d7443f101
在节点2和3上用上面命令获取的keyid作为-key参数,发送同意审批。发起节点1不需要审批同意。
./dcrm-client -test ACCEPTREQADDR -url http://127.0.0.1:9012 -keystore ~/Downloads/UTC--2020-04-23T15-20-09.393Z--f3dc381f4e30e180c0e2fee5405e5424d41d134f -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
./dcrm-client -test ACCEPTREQADDR -url http://127.0.0.1:9013 -keystore ~/Downloads/UTC--2020-04-23T15-19-31.919Z--4bb81aeee94b383211ece6e840ff6173e74b25b5 -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccounts","params":["0x00c37841378920E2BA5151a5d1E074Cf367586c4","0"],"id":67}' http://127.0.0.1:9011
./dcrm-client -test REQDCRMADDR -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 1 -url http://127.0.0.1:9011
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccountsBalance","params":["04f6380894cb47734d27dcb3c3de31c12d30e862f51ecb189fd21c02f4b4b1e66cd5f23cef25fb3d8082c376cc43f7a0093b4eb149b160af8d206998b6ef4af8c0","0x00c37841378920E2BA5151a5d1E074Cf367586c4"],"id":67}' http://127.0.0.1:9011
./dcrm-client -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -url http://127.0.0.1:9012 --ts 2/3 -test LOCKOUT -mode 1 -from 0x2d559B4cB9Ab109e95d6B59b645c3A48fE6e4e61
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccountsBalance","params":["04f6380894cb47734d27dcb3c3de31c12d30e862f51ecb189fd21c02f4b4b1e66cd5f23cef25fb3d8082c376cc43f7a0093b4eb149b160af8d206998b6ef4af8c0","0x00c37841378920E2BA5151a5d1E074Cf367586c4"],"id":67}' http://127.0.0.1:9011
./dcrm-client -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -url http://127.0.0.1:9011 --ts 2/3 -test LOCKOUT -mode 0 -from 0x2d559B4cB9Ab109e95d6B59b645c3A48fE6e4e61
./dcrm-client -test ACCEPTLOCKOUT -url http://127.0.0.1:9012 -keystore ~/Downloads/UTC--2020-04-23T15-20-09.393Z--f3dc381f4e30e180c0e2fee5405e5424d41d134f -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
./dcrm-client -test ACCEPTLOCKOUT -url http://127.0.0.1:9013 -keystore ~/Downloads/UTC--2020-04-23T15-19-31.919Z--4bb81aeee94b383211ece6e840ff6173e74b25b5 -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccountsBalance","params":["04f6380894cb47734d27dcb3c3de31c12d30e862f51ecb189fd21c02f4b4b1e66cd5f23cef25fb3d8082c376cc43f7a0093b4eb149b160af8d206998b6ef4af8c0","0x00c37841378920E2BA5151a5d1E074Cf367586c4"],"id":67}' http://127.0.0.1:9011
./dcrm-client -test REQDCRMADDR -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 1 -url http://127.0.0.1:9011
./dcrm-client -test SIGN -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 1 -url http://127.0.0.1:9011 -pubkey 04fa589c020026e11005383b59a6f8a0348380741c893d04a7fc7beb069ce030f6907c68fa6fd0e3aca43265b7aee86db8dc2f4af08a5fb9cee963e10445e7b72d
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccounts","params":["0x00c37841378920E2BA5151a5d1E074Cf367586c4","0"],"id":67}' http://127.0.0.1:9011
./dcrm-client -test SIGN -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -mode 0 -url http://127.0.0.1:9011 -pubkey 04fa589c020026e11005383b59a6f8a0348380741c893d04a7fc7beb069ce030f6907c68fa6fd0e3aca43265b7aee86db8dc2f4af08a5fb9cee963e10445e7b72d
./dcrm-client -test ACCEPTSIGN -url http://127.0.0.1:9012 -keystore ~/Downloads/UTC--2020-04-23T15-20-09.393Z--f3dc381f4e30e180c0e2fee5405e5424d41d134f -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
./dcrm-client -test ACCEPTSIGN -url http://127.0.0.1:9013 -keystore ~/Downloads/UTC--2020-04-23T15-19-31.919Z--4bb81aeee94b383211ece6e840ff6173e74b25b5 -passwd 123456789 -key 0x0336f740d84844f08fc61d700cc3183d0a96eade10061145a2563bc04a924d7d
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getSignStatus","params":["0xeca87b94f8dd53b51c33e0981d4b7a457b1e3281d9ce5a36189ff8e1de9e809b"],"id":67}' http://127.0.0.1:9011
curl -X POST -H "Content-Type":application/json --data '{"jsonrpc":"2.0","method":"dcrm_getAccounts","params":["0x00c37841378920E2BA5151a5d1E074Cf367586c4","0"],"id":67}' http://127.0.0.1:9011
./dcrm-client -test SetGroup -url http://127.0.0.1:9011 -ts 2/2 -node http://127.0.0.1:9011 -node http://127.0.0.1:9012
./dcrm-client -test RESHARE -url http://127.0.0.1:9011 -ts 2/3 -gid 50ade4633ff5051a4805da762725d1e1c41d4e936f0299c2eea5199e2b46812fb1d4aac038ae389ec957852a50a8baeade1c9f721ebe68f8565049b3c96c1700 -tsgid 1e75bd2f9608991789e5dbbacdc4a75f252bda337b2039326d04e7193b0449fd36a5b339e391948ecb869fd60aab86eb52d614089c4ccd5a0a81a914bdb85ced -pkey 9f61408b96263e4978376c93bc4b78b7c63c5667da372d409cf762c0b34487af -pubkey 045027420ff062dd9e16d0ac4c10834c8cd738c0e4eb03224d695a6914cd717f472a495a57eb77f1c7b1fe4259b9983daa579f28be557c164e3a331c5b2e499536
./dcrm-client -test ACCEPTRESHARE -url http://127.0.0.1:9012 -pkey xxxxxxx
./dcrm-client -test ACCEPTRESHARE -url http://127.0.0.1:9013 -pkey xxxxxxx