A computer readable non-transitory medium containing one or more computer instructions, which when executed by a processor of a network node cause the processor to:
- update a peers queue containing descriptors of a random subset of peer nodes selected from connected peer nodes;
- receive transaction information from a first peer node in the random subset of peer nodes;
- append a transaction descriptor for a transaction associated with the transaction information to an unconfirmed transactions queue;
- transmit the transaction descriptor in the unconfirmed transactions queue to a second peer node in the random subset of peer nodes;
- generate a transaction ballot containing a first subset of transaction descriptors in the unconfirmed transactions queue, wherein the first subset of the transaction descriptors is based upon block size of a blockchain;
- receive a second subset of transaction descriptors from a third peer node in the random subset of peer nodes;
- update the transaction ballot by appending one or more transaction descriptors from the first set of transactions, wherein the one or more transaction descriptors are not present in the transaction ballot;
- transmit an updated transaction ballot to a fourth node in the random subset of peer nodes;
- generate a proposed next block to be appended to the blockchain and containing the transaction descriptors in the updated transaction ballot;
- determine majority consensus of a plurality of nodes regarding a block to be appended to the blockchain by:
- generate a first hash of the proposed next block to be appended to the blockchain by the network node;
- append the first hash to a hash votes queue;
- receive from a plurality of the connected peer nodes a plurality of hashes of the respective proposed next blocks to be appended to the blockchain generated by the plurality of connected peer nodes;
- determine which of the received hashes belongs to a majority of received hashes;
- determine whether the first hash is the same as the received hashes that belong to the majority of received hashes;
- upon determining by the processor that the first hash belongs to a majority of the received hashes:
- append the next block to a local copy of the blockchain;
- upon determining by the network node that the first hash does not belong to a majority of received hashes:
- transmit a block request to a peer node of the connected peers nodes that generated a hash belonging to the majority of received hashes;
- receive a block corresponding to the majority of hashes from the peer node;
- and
- append, by the network node, the block corresponding to the majority of hashes from the peer node to the local copy of the blockchain;
- upon determining by the processor that the transaction information from the first peer node is invalid:
- append a descriptor of the first peer node into a suspected nodes queue;
- and
- update the suspected nodes queue in response to determining that a predetermined number of epochs have passed.