Fetch.AI’s Autonomous Economic Agents (AEAs) rely on a blockchain ledger for their transaction records. This blockchain is protected by a trust system which is overlaid onto the network connectivity and run on a per-node basis. Each of the nodes may be performing one or more of the varied roles in the distributed ledger. These roles include serving as a participant in the consensus or maintaining one or more of the data lanes.
The trust model encourages nodes to connect to each other when there is new information available. This information may include the existence of new blocks in the chain, new transactions or data about new nodes joining the network. The model also encourages nodes to disregard connectivity which provides ‘bad’ information such as blocks that have been seen before or which have an invalid proof.
We developed a narrow interface between the core of the node’s network software and the trust model. Parts of the networking and ledger code are then able to push feedback into the system through that interface. In addition, a query interface can suggest new peers to try and connect to. This enabled our applied maths research group to develop their more complicated trust dynamics system while allowing parallel development of the networking code. To test this, we implemented a simple heuristic-based model and proceeded with integrating the trust-feedback elements into the networking code developed by the main ledger team. You can read more about the work of the ledger team by reading our article about lead software engineer Edward Fitzgerald.
Our approach successfully resulted in faster delivery of the trust subsystem. The deliberate narrowness of the interface meant that delivery of the code from the research group was able to be seamlessly integrated. Indeed, for a while, the two systems were selectable with a command-line flag.
The diagram above shows how feedback informs the trust model. The Trust “Director” periodically examines the current network state, chooses a set of suitable peers based on the trust scores and issues commands so that the network sub-system maintains semi-static links to a number of nodes that are perceived to be ‘good’ and also to a number of ‘speculative’ links to other nodes. Data flowing over these links allow us to up or down rate the links. A sufficiently useful speculative link will become semi-static and replace a less useful link.