Objectives for the 4th quarter of 2019

Babble

Babble, the first component of the Mosaic Networks suite, is a pluggable soft-

ware component that provides BFT Consensus to applications written in any programming language. It was initially based on the Hashgraph consensus algorithm which is particularly suited for mobile deployments due to its low networking overhead. Our objective is to improve on the current codebase and add critical features to support our vision of mobile ad-hoc blockchains.

1. Blockchain Interface

• Goal

Map Hashgraph Events onto a linear chain of blocks as they come out from

the core algorithm in consensus order. Blocks will contain a header and a list

of transactions in consensus order. A block header contains the application’s

state hash, resulting from applying the block’s transactions sequentially. The

application consumes blocks directly, ignoring the underlying Hashgraph details.

Block signatures, gossiped by piggy-backing on the hashgraph routines, offer a trivial block verification mechanism.

• Success Criteria

The resulting Blockchain contains transactions in the correct consensus order.

Signatures are gossiped and appended to Blocks as part of the normal hashgraph messaging routines.

Implementation Plan:

Design the new Header, Block and Blockchain data structures — Achieved

Extend the Store interface to handle these new objects — Achieved

Project Hashgraph Events onto the Blockchain as they come out of

the core consensus methods — Achieved

the core consensus methods — Update the Proxy API so that Babble commits Blocks to the App — Achieved

Sign Blocks, gossip, and collect signatures — Achieved

Implement Inmem proxy — Achieved

Document new interface and breaking changes — Achieved

“Merkelize” the block structure. Hashes should be obtained from Merkle trees rather than hashing a flat JSON encoding

Implement a light-client

Add CheckTx method

Look into gRPC

2. Package for Mobile SDK — Completed

Goal

Create a babble/mobile package with a wrapper around the Node object to

expose functionality to native mobile apps. This package will ultimately be

compiled into the mobile SDK using the gomobile tool.

Success Criteria

The SDK and language bindings produced from this package and gomobile are usable from native Android and iOS applications. They allow the application to start a Babble node with a specific configuration, submit transactions, and receive committed results from the node.

Implementation Plan:

Design a satisfactory interface between the Node object and Java or

Objective-C clients. Consider configuration options, how to submit

transactions and how to receive committed objects (Blocks, Events

or Transactions) — Achieved

Objective-C clients. Consider configuration options, how to submit transactions and how to receive committed objects (Blocks, Events or Transactions) Create a wrapper around the Node object that will generate the

appropriate bindings when run through the gomobile tool — Achieved

3. FastSync — Completed

Goal

Create a mechanism whereby a node that fell behind can catch up with the tip of the Hashgraph without having to sync all the Events that it missed.

Success Criteria

Test with docker demo that a node that was stopped for a long time can join

the network, execute the fast-sync routine automatically upon detecting that

it is too far behind, and proceed with the regular babbling routine once it has

caught up with the tip of the Hashgraph. Ensure that the solution does not

undermine the BFT guarantees of Hashgraph.

Implementation Plan:

Introduce concept of Frames — Achieved

Include FrameHash in Block header — Achieved

Implement FastForward methods in core — Achieved

Implement FastForward methods in node — Achieved

Document the solution and prove that it does not undermine the

BFT properties. — Achieved

4. Dynamic Membership Protocol — Achieved

Goal

Enable the list of peers to change as participants join and exit a network.

Success Criteria

Robust end-to-end tests demonstrate the workability of our solution. Practical

tests on live networks indicate the effectiveness of joining and leaving without

undermining the rest of the network or affecting the user experience.

Implementation Plan:

Refactor config/peers management — Achieved

Update the core consensus methods to use a dynamic list of partici-

pants. — Achieved

pants. — Define the interface between Babble and Application that enables

dynamic changes to the peers list. — Achieved

dynamic changes to the peers list. — Create a special type of transaction for Entry/Exit requests that

gets intercepted by Babble and handled in a special way. This is a

non-standard type of transaction because Babble does not read and

interpret normal transactions. — Achieved

gets intercepted by Babble and handled in a special way. This is a non-standard type of transaction because Babble does not read and interpret normal transactions. — Extend the proxy interface with a method to interrogate the application if an JoinRequest should be accepted. — Achieved

Monitor the transaction until it reaches consensus and approval by

+1/3 of participants and update the participant list accordingly. — Achieved

Click here to back to deliverables list in the beginning of the article.