This proof-of-concept implementation contains full node that runs mining process and at the same time provide an interactive client interface to the user. Particular nodes can be run anytime, as blockchain is synchronized on start up. The implementation uses account/balance model (not UTXO).
In the first shell, let log messages to be displayed on the fly:
$ tail -f -n0 ./logs/node-1.log
In the second shell, run a node, and its client interface, respectively:
$ python3 ./BaseNode1.py [--verbose] [--selfish]
Our implementation support 3 known nodes - called base nodes.
To run them, use the previous commands with index of node changed to 2
and 3
.
In one shell:
$ tail -f -n0 ./logs/node-1000.log
In the next shell:
$ python3 ./UnknownNode4.py
Display help and all available commands:
> help
[chain]
: displays current blockchain
[txns]
: displays all transactions made by this client
[stats]
: displays statistics about miners
[balance[s]]
: get my balance | all balances
[send RECEIVER, AMOUNT [, COMMENT]]
: sends crypto-tokens to RECEIVER, including optional comment
[block ID]
: displays info about block with length = ID
[whdrs]
: displays current cache of weak headers
[exit | quit]
: ends operation of this node
[verbose [on | off]]
enables verbose at log file.
[help | h]
: shows this help
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。