This technical report describes the implementation of Toychain: a simple, lightweight blockchain implemented in Python, designed for ease of deployment and practicality in robotics research. It can be integrated with various software and simulation tools used in robotics (we have integrated it with ARGoS, Gazebo, and ROS2), and also be deployed on real robots capable of Wi-Fi communications. The Toychain package supports the deployment of smart contracts written in Python (computer programs that can be executed by and synchronized across a distributed network). The nodes in the blockchain can execute smart contract functions by broadcasting transactions, which update the state of the blockchain upon agreement by all other nodes. The conditions for this agreement are established by a consensus protocol. The Toychain package allows for custom implementations of the consensus protocol, which can be useful for research or meeting specific application requirements. Currently, Proof-of-Work and Proof-of-Authority are implemented.
翻译:本技术报告介绍了Toychain的实现:一种用Python实现的简单轻量级区块链,专为机器人研究中的易部署性和实用性而设计。它可以与机器人学中使用的各种软件和仿真工具集成(我们已将其与ARGoS、Gazebo和ROS2集成),也可部署在具备Wi-Fi通信能力的真实机器人上。Toychain软件包支持部署用Python编写的智能合约(即能够由分布式网络执行并在全网同步的计算机程序)。区块链中的节点可以通过广播交易来执行智能合约函数,这些交易在获得所有其他节点同意后更新区块链状态。达成此同意的条件由共识协议确立。Toychain软件包允许自定义实现共识协议,这对于研究或满足特定应用需求非常有用。目前系统已实现工作量证明和权威证明两种共识机制。