This invention relates generally to distributed systems, and more particularly to methods and systems for distributed consensus with applications to improving reliability in blockchain transactions in distributed systems. The invention is particularly suited, but not limited to, use in improving the reliability of computations in a computation exchange.

In this document we use the term ‘blockchain’ to include all forms of electronic, computer-based, distributed ledgers. These include, but are not limited to blockchain and transaction-chain technologies, permissioned and un-permissioned ledgers, shared ledgers and variations thereof. The most widely known application of blockchain technology is the Bitcoin ledger, although other blockchain implementations have been proposed and developed. While Bitcoin may be referred to herein for the purpose of convenience and illustration, it should be noted that the invention is not limited to use with the Bitcoin blockchain and alternative blockchain implementations and protocols fall within the scope of the present invention.

A blockchain is a consensus-based, electronic ledger which is implemented as a computer-based decentralised, distributed system made up of blocks which in turn are made up of transactions and other information. In the case of Bitcoin, each transaction is a data structure that encodes the transfer of control of a token between participants in the blockchain system, and includes at least one input and at least one output. Each block contains a hash of the previous block to that blocks become chained together to create a permanent, unalterable record of all transactions which have been written to the blockchain since its inception. Transactions contain small programs known as scripts embedded into their inputs and outputs, which specify how and by whom the outputs of the transactions can be accessed. On the Bitcoin platform, these scripts are written using a stack-based scripting language.

In order for a transaction to be written to the blockchain, it must be “validated”. Some network nodes act as miners and perform work to ensure that each transaction is valid, with invalid transactions rejected from the network. For example, software clients installed on the nodes perform this validation work on transactions that reference and unspent transaction outputs (UTXO). Validation may be performed by executing its locking and unlocking scripts. If execution of the locking and unlocking scripts evaluate to TRUE and, if certain other conditions are met (such as inclusion of a sufficient mining fee), the transaction is valid and the transaction may be written to the blockchain. Thus, in order for a transaction to be written to the blockchain, it must be i) validated by a node that receives the transaction—if the transaction is validated, the node relays it to the other nodes in the network; and ii) added to a new block built by a miner; and iii) mined, i.e. added to the public ledger of past transactions. The transaction is considered to be confirmed when a sufficient number of blocks are added to the blockchain to make the transaction practically irreversible.

Although blockchain technology is most widely known for the use of cryptocurrency implementation, digital entrepreneurs have begun exploring the use of both the cryptographic security system Bitcoin is based on and the data that can be stored on the Blockchain to implement new systems. It would be highly advantageous if the blockchain could be used for automated tasks and processes which are not limited to the realm of cryptocurrency. Such solutions would be able to harness the benefits of the blockchain (e.g. a permanent, tamper proof records of events, distributed processing etc.) while being more versatile in their applications.

In some such solutions, a distributed consensus may be achieved. For example, unlike many traditional payment systems, blockchain is largely immutable and can often be anonymous. The immutable and largely anonymous nature of blockchain technology present a number of technical challenges when guarding users against malicious behaviour. For example, because a number of blocks built on a block that includes a transaction cause the transaction to be practically irreversible, refunds are often not available and new technical systems are required in order to maintain the integrity of transactions. Such challenges are also difficult due to the decentralized trustless nature of blockchain technology. That is, there is no central party to ensure the integrity of transactions and transaction integrity is instead achieved through technical means. It would, therefore, be desirable for blockchain technology to improve reliability in transactions such as, for example, through employing a digital consensus.

Reliability challenges may be present in computation exchanges, which are sometimes referred to as computation marketplaces. Computation marketplaces are services that allow for off-chain execution of expensive computations. Such exchanges allow a node in a network to outsource the execution of an algorithm to another remote node. The result of the algorithm is then reported back to the node that outsourced the operation of the algorithm. The node receiving the result may not know whether the result is reliable. For the receiving node to determine whether the answer is correct, they would need to execute the algorithm themselves which would defeat the purpose of the outsourcing. It would, therefore, be desirable for blockchain technology to improve the reliability of results in a computation exchange.

Thus, it is desirable to provide improved methods and devices which improve blockchain technology in one or more of these aspects.

Thus, in accordance with the present invention there is provided a method as defined in the appended claims.

Therefore, in accordance with the invention there may be provided a computer-implemented method. The computer implemented method includes: i) joining, by a node, a group through transfer of tokens to a public group address to become a group member, the group being associated with a threshold signature scheme for which the node controls a private key share, the transfer of tokens being made on a proof-of-work blockchain network; and ii) cooperating, by the node, with other nodes of the group to achieve a distributed consensus as to the correctness of work product of a proposer in response to a challenge, by a challenger, of that work product, the challenge responsive to a request made by a requester, wherein achieving the distributed consensus includes: a) deploying a ghost chain to achieve the distributed consensus resolving the challenge, the ghost chain being a proof-of-stake blockchain in which miners of the ghost chain are members of the group; and b) terminating the ghost chain upon resolution of the challenge.

Conveniently, in this way, a distributed consensus may be achieved amongst nodes of a blockchain network. Achieving such a distributed consensus using a ghost chain may be more efficient as compared to a consensus reached using the proof-of-work blockchain.

The ghost chain may be a temporary blockchain. In contrast to a traditional blockchain, the ghost chain may be configured to terminate, disappear and/or expire upon performance or satisfaction of one or more criteria, goal or designated purpose. That is, the ghost chain may be a single-purpose blockchain which ceases to exist once its purpose has been achieved. The ghost chain may include a first block, which may be referred to as a genesis block, which may be created only when the ghost chain is deployed or created for its purpose, criteria or goal.

In some implementations, there is provided a computer-implemented method. The method includes: i) joining, by a node, a group through deposit of digital assets to a public group address to become a group member, the group being associated with a threshold signature scheme for which the node controls a private key share, the deposit of digital assets being made on a proof-of-work blockchain network; and ii) cooperating, by the node, with other nodes of the group to: a) detect a challenge, by a challenger, to work product of a proposer in response to a request made by a requester; b) deploy a ghost chain to resolve the challenge, the ghost chain being a proof-of-stake blockchain in which miners of the ghost chain are members of the group; and c) terminate the ghost chain upon resolution of the challenge.

The computer-implemented method may also include: cooperating with other nodes of the group to construct a transaction, payable to the group (i.e., transferring tokens to the group), with a bounty and proposer deposit as input and the bounty and the proposer deposit and a challenger deposit as output and providing the transaction to the challenger for adding of the challenger deposit as input. The bounty, proposer deposit and challenger deposit are tokens. The bounty and proposer deposit may be placed under exclusive control of the group prior to construction of the transaction. For example, the bounty and proposer deposit may be placed under exclusive control of the group when the challenge is detected within a time period following committal by the proposer to a solution to the request.

In some implementations, the computer-implemented method may also include cooperating with other nodes of the group to, when the challenge is successful: i) transfer at least the challenger deposit to the challenger; and ii) distribute the proposer deposit to miners of the ghost chain in proportion to absolute number of blocks mined.

In some implementations, the computer-implemented method may also include, if the work product of the proposer is determined to be valid: i) transfer the bounty and the proposer deposit to the proposer; and ii) distribute the challenger deposit to miners of the ghost chain in proportion to absolute number of blocks mined.

In some implementations of the computer-implemented method, the transfer may be performed by adding a partial signature, by the node using the private key share to a transaction to which other nodes add partial signatures based on respective private key shares until at least a threshold number of private key shares required under the threshold signature scheme are used to create a valid signature.

In some implementations of the computer-implemented method, deploying the ghost chain to resolve the challenge may include receiving evidence from the proposer and challenger and resolving the challenge based on received evidence. The received evidence may include one or both of a final solution or an intermediate result.

In some implementations of the computer-implemented method, deploying the ghost chain to resolve the challenge may include performing a task associated with the request on the ghost chain to determine a correct solution.

In some implementations of the computer-implemented method, deploying the ghost chain to resolve the challenge may include performing a portion of the task on the ghost chain to determine that one of the proposer or the challenger has erred in an intermediate step of a task associated with the request.

In some implementations of the computer-implemented method, terminating the ghost chain may include transferring information pertaining to the distributed consensus (i.e., resolution of the challenge) to the proof-of-work blockchain network.

In some implementations of the computer-implemented method, terminating the ghost chain may include constructing a terminal block that includes a record of mining fees due for blocks created during a signing of a final transaction.

In accordance with the invention, there may be provided an electronic device. The electronic device includes an interface device, a processor coupled to the interface device and a memory coupled to the processor. The memory has stored thereon computer executable instructions which, when executed, configure the processor to perform a method described herein.

In accordance with the invention, there may be provided a computer readable storage medium. The computer readable storage medium includes computer-executable instructions which, when executed, configure a processor to perform a method described herein.

