Watch-only consensus nodes

As could be verified in the Network tutorial, NEO network operates in a fully distributed fashion, such as this figure above, extracted from this Medium Article:

Transaction is retransmitted until it reaches the Consensus Nodes (green)

The green boxes represents consensus, which are emerged in the pool of nodes. Messages are all broadcasted to neighbors (in an optimal scenario). Nodes with special feature can be designed for just monitoring the CN P2P messages, as can be accesed here in the NeoCompiler Eco Shared Privatenet.

Info from a watch only node

In this figure, this Watch-Only node also has the feature of RPC. It is noteworthy that nodes can have special features and summarize any information desired by those that manage that client, as already emphasized in the Tutorial.

dBFT consensus scenarios

We will now outline possible consensus scenarios, using the following characters to represent nodes:

dBFT consensus node characters

By using these 7 consensus nodes and their virtues, we are going give some examples that may enlighten the mind of the readers about how dBFT may work:

The Genesis Block

Genesis block is created with 3 transactions, in which native assets NEO and GAS are created then subsequently transferred to a multi-signature account composed of the current validators.

Case 1 (normal operation)

Case 2 (faulty primary)

Case 3 (faulty after commit)

It should be noticed that 3 faulty nodes are f+1 which is expected to halt the progress of the network. On the other hand, it should be noticed that no real Byzantine behavior was really detected, only delays and connections problems. In this sense, it is expected that due to the partially synchronous protocol, messages will eventually arrive at these nodes.

Case 4 (Byzantine Primary)

A 4-node consensus multi-sig

As you may already known, an address in the NEO blockchain 2.x is formed by 21, which means “Push 34 bytes on the evaluation stack”, the public key and ac, which is an opcode that invokes an script for checking witness of the address.

We suggest readers to take a look at the following article:

Let’s consider nodes with the following pubkeys (21+rootOfPubKey+ac):

Basically, a trivial way to create a multi-signature account can be done using the following script:

532102103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e2102a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd622102b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc22103d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee69954ae

which is: 53 (number of signers) + 21 + 02...6e + 21 + 02...62 + 21 + 02...c2 + 21 + 03...99 + 54 (number of owners) + ae

We a holders pick those 4 nodes as their desired validators, the following script will be one signing every block, with the following public address: AZ81H31DMWzbSnFDLFkzh9vHwaDLayV7fU. The latter can be achieved by converted that script to “Scripthash big-endian” and then converting to base-58. We suggest readers to access NeoCompiler-Eco if they want to play with these conversors.

multisig 3/4

scripthash to address base58

A simple single-node consensus multi-sig

Let’s take the first node (N1) previous described and create a multi-signatures acount with 1 owners and one signers by just switing 53 and 54 to 4f.

512102b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc251ae

The latter would result in the following Address: AbU69m8WUZJSWanfr1Cy66cpEcsmMcX7BR

Return to contents.