Message brokering
The integration of blockchain technology in message brokers enables tamper-resistant proof of message consumption, addressing the challenges of message integrity and delivery in federated systems by providing transparent and secure message processing and payment mechanisms.
Patent Information
- Application Number
- PCT/EP2024/051069
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-27
- Filing Date
- 2024-01-17
- Publication Date
- 2024-09-06
AI Technical Summary
Message brokers in existing systems lack tamper-resistant proof of message processing, making it difficult for publishers to ensure message integrity and delivery, especially in federated brokering systems where message routing and consumption across multiple brokers can lead to uncertainties.
A federated message brokering system that integrates blockchain technology, allowing message brokers connected to blockchain nodes to generate and submit proof of consumption transactions, ensuring message integrity and transparency through immutability and transparency.
The system provides publishers with immutable proof of message consumption and tamper-resistance, incentivizing brokers to efficiently process and deliver messages, while ensuring transparent payment and message integrity across the network.
Smart Images

Figure EP2024051069_06092024_PF_FP
Abstract
Description
[0001] MESSAGE BROKERING
[0002] TECHNICAL FIELD
[0003] The present disclosure relates to a computer-implemented method for proving processing of a message by a consumer of a message brokering system, and a computer-implemented method for requesting the proof. The present disclosure also relates to a computer system and program from implementing the methods.
[0004] BACKGROUND
[0005] A message broker allows applications to communicate with each other and exchange information. It comprises a queue and an exchange. The queue temporarily stores the messages and allow applications, referred to as consumers, to get messages from them. The exchange is an agent for routing messages to queues, and push messages to the queues. Publishers can publish messages to the queues and consumers can subscribe queues to consume messages from these queues.
[0006] A message broker can connect to one or more other message brokers to from a federated brokering system. This enables publishers connected to one broker to send messages to a consumer connected to a different broker. There are two types of federated brokering systems: federated exchange systems and federated queue systems.
[0007] In a federated exchange system, a broker receives a message and, if not consumed by one of its consumers, duplicates the message and passes it to the other brokers it is connected to. These brokers receive a copy of the message and process it in parallel.
[0008] In a federated queue system, a broker receives a message and, if not consumed by one of its consumers, passes the same copy of the message to the next broker in the federated queue system. That is, in contrast to the federated exchange system, the brokers process the message in series.
[0009] SUMMARY Message brokers as known in the art cannot provide tamper-resistant proofs of processing messages.
[0010] Processing messages between applications can be problematic in terms of message integrity. Some messaging solutions are decoupling in nature, which makes it hard for publishers to track whether their messages have been consumed. If messages are not consumed, the existing solutions might not notify publishers of message delivery failures. A publisher may therefore not know that their message has not been consumed, and cannot be certain that the message, if consumed, has not been tampered with.
[0011] Federated message brokering systems are provided herein, in which message brokers which are connected to or comprise blockchain nodes are able to submit a proof of consumption transaction when a message is consumed from their queues. If the transaction is not submitted to the blockchain, it means there is a high probability that the message was not consumed. In addition, the transaction can be used to prove that the message is not tampered with when transferred across the brokers. Thus, the proposed federated brokering system not only has the characteristics of existing message brokers but also has the benefits of a blockchain, such as immutability and transparency.
[0012] According to one aspect disclosed herein, there is provided a computer-implemented method for proving processing of a message by a first consumer of a message brokering system, the message brokering system comprising a plurality of message brokers, the first consumer, and a first publisher, wherein the first publisher is in communication with at least one message broker of the plurality of message brokers, wherein the first consumer is in communication with a consumer message broker of the plurality of message brokers, wherein the message is published by the first publisher, wherein a message blockchain transaction is generated by the first publisher, the method comprising: obtaining a consumer signature generated using a private key of the first consumer in response to the first consumer processing the message; providing, in a first unlocking script of a proof blockchain transaction, the consumer signature, a public key of the first consumer, a broker signature generated using a private key of the consumer message broker, and a public key of the consumer message broker, wherein the first unlocking script is configured to unlock a first locking script of the message blockchain transaction; and making the proof blockchain transaction available to one or more nodes of a blockchain.
[0013] BRIEF DESCRIPTION OF THE DRAWINGS
[0014] To assist understanding of embodiments of the present disclosure and to show how such embodiments may be put into effect, reference is made, by way of example only, to the accompanying drawings in which:
[0015] Figure 1 is a schematic block diagram of a system for implementing a blockchain,
[0016] Figure 2 schematically illustrates some examples of transactions which may be recorded in a blockchain,
[0017] Figure 3 schematically illustrates a message broker;
[0018] Figures 4A and 4B schematically illustrate federated exchange systems;
[0019] Figure 5 schematically illustrates a federated queue system;
[0020] Figure 6 schematically illustrates a blockchain integrated federated exchange system;
[0021] Figure 7 provides example steps of a Merkle proof method implemented in a federated exchange system;
[0022] Figure 8 provides example steps of a publisher confirm method implemented in a federated exchange system;
[0023] Figure 9 schematically illustrates a blockchain integrated federated queue system; and
[0024] Figure 10 provides example method steps performed by a broker in a federated exchange or federated queue system. DETAILED DESCRIPTION OF EMBODIMENTS
[0025] 1. MESSAGE BROKERING
[0026] 1.1 MESSAGE PROPERTIES
[0027] Publishers can set message properties at the time of publishing a message. The table below provides a common, but not mandatory, set of message properties.
[0028] 1.2 MESSAGE BROKER
[0029] A message broker is a software that enables applications, systems, and services to communicate with each other and exchange information. It can maintain the order of messages, validate, store, route, and deliver messages to the appropriate destinations.
[0030] There are three basic components in message brokers:
[0031] • Producer / Publisher: the application that sends messages, called publishers in the pub / sub messaging pattern.
[0032] • Consumer / Subscriber: the application that receives messages, if consuming messages from a subscribed topic, is also called a subscriber.
[0033] A consumer is typically registered on a queue when an application starts, and a consumer tag is returned when the registration is successful. Applications can choose one of two delivery modes: automatic (deliveries require no acknowledgement) or manual (deliveries require client acknowledgement).
[0034] • Queue / Topic: a data structure used by message brokers to store messages. The First-In-First-Out (FIFO) Queue is used in known message brokering systems and represents that the first message sent to the queue is the first message consumers can consume.
[0035] There are two basic messaging patterns in message brokers:
[0036] 1. Point-to-Point (PZPoint): there is a one-to-one relationship between a message sender and a message receiver. Each message sent to a queue is only consumed once by the receiver from that queue. The producer usually knows who the consumer is.
[0037] 2. Publish and Subscribe (pub / sub): there is a one-to-many relationship between a message publisher and the corresponding subscribers. Each message is sent to a 'topic', and consumers subscribed to that topic can consume messages. The publisher does not need to know who the consumers are, and the consumers also do not need to know who the publisher is.
[0038] 1.3 RABBITMQ
[0039] RabbitMQ is an open-source message-queueing software also known as a message broker or queue manager. It is software which defines queues, an exchange, and the connecting rules of applications to transmit messages.
[0040] A description of RabbitMQ is provided herein as an example of a message-brokering system. However, it will be appreciated that the features of RabbitMQ may be common across other message-brokering systems, such that RabbitMQ is provided herein as an example only. It will be appreciated that the methods provided herein are not limited to use only with the RabbitMQ system, but rather can be used with any other suitable message-brokering system as will be apparent to the person skilled in the art.
[0041] Figure 3 provides an example message broker 306, comprising an exchange 308 and a message queue 310. In the RabbitMQ messaging system, a message is first sent to the exchange 308 instead of a queue 310. An exchange 308 is used to accept messages from the producer 302, route messages to the correct message queues 310, and to link queues via a binding key. A binding is a 'link' that is configured to establish a connection between an exchange 308 and a queue 310.
[0042] A routing key can resemble an 'destination address' of the message. Note that a routing key must be a string. The producer 302 adds the routing key to the message, and the exchange 308 uses that routing key to decide how to route the message to the correct queues 310.
[0043] The format of the routing key depends on the type of an exchange, e.g., 'blockchain. bsv.tx.#' matches any routing keys beginning with 'blockchain. bsv.tx'.
[0044] Simply put, a binding key can be regarded as the address of the house, and the routing key is the address on the letter.
[0045] There are four main types of exchange 310 in RabbitMQ:
[0046] * Direct exchange: delivers messages to queues based on routing keys that exactly matched the binding keys. It adopts the Point-to-Point messaging pattern.
[0047] * Topic exchange: delivers a message to one or many queues based on wildcard match between the routing key and the routing pattern specified in the binding. The routing pattern may contain an asterisk * to specify the position of a word in the routing key, or a pound symbol # to indicate a match on zero or more words in the routing key. This adopts the publish- subscribe messaging pattern.
[0048] * Fanout exchange: delivers messages to all the queues that are bound to it. Fanout exchange can be useful when the same message needs to be sent to one or more queues with consumers who may process the same message in different ways, like in distributed systems designed to broadcast various state and configuration updates. The routing keys in this exchange will be ignored. * Header exchange: delivers messages to queues based on the header values (e.g., all or any) instead of the routing keys. The header values are added to the binding in the form of 'x-match = header value'. For example, 'x-match = all' means all message headers must match the binding key exactly, 'x- match' = any' means at least one of message headers match the binding key. Note that the actual order of the header pairs in the message is irrelevant.
[0049] Message priority means that a message with a higher priority level can be processed before other messages. RabbitMQ supports message priority with a priority queue that is set to have a range of priority, represented between 1 and 255. Publishers 302 use this range to specify the priority level of a message in message properties. Larger numbers indicate higher priority levels. If the priority level is set to 0, it means messages has no priority level. Messages with the higher priority level will be placed at the head of a queue. Note that the cost of using a priority queue is the consumption of CPU resources.
[0050] 1.3.2 FEDERATION IN
[0051] "Federation" is a way to allow multiple brokers 306 to be connected. The connection between brokers 306 can be done through exchange-to-exchange or queue-to-queue. Such exchanges 308 and queues 310 are called federated exchanges and federated queues.
[0052] 1.4 FEDERATED EXCHANGE
[0053] Figures 4A and 4B show provide example federated exchanges.
[0054] In Figure 4A, broker 306A configures a federated exchange (i.e. FXA) 308A and connects it to another federated exchange (i.e. FXB) 308B on broker 306B. Publisher 302A (pubA) connects to FXA308A and publishes messages to it. FXA308A then routes messages to a queue (QA) 310A from which a consumer 304A (i.e. consumerA) can consume messages.
[0055] Federated exchange allows messages to be replicated via an exchange on one broker (i.e.
[0056] Upstream: where messages were first published) to an exchange on another broker (i.e. Downstream: where messages are transmitted). The basic topology of linking two federated exchanges between two brokers is shown in Figure 4A. The 'max-hops' indicates the number of times messages can be replicated over a federated exchange. The 'max-hops=l' means that messages are replicated once from one broker to another broker. In addition, consumer 304A and consumer 304B are able to receive messages published by either publisher 302A or publisher 302B.
[0057] There are other types of topologies to connect federated exchanges among brokers. For example, a tree topology can be used to connect a federated exchange in the upstream broker to a tree of federated exchanges in the downstream brokers, as shown in Figure 4B. Messages published to the upstream broker can be consumed by any consumers connected to any downstream brokers in the tree.
[0058] Federated exchanges, therefore, allow the same message to be processed by multiple brokers in parallel, with the message being consumed by any of the consumers connected to any of the brokers processing the message.
[0059] 1.5 FEDERATED QUEUES
[0060] Different from federated exchange replicating messages, a federated queue (see Figure 5) is used to move messages from one upstream broker 306C to the downstream broker 306D. One important feature of federated queues is to allow messages to be consumed remotely when an upstream broker 306C does not have an appropriate message consumer. That is, if no consumer of the upstream broker 306C consumes the message from its message queue 310C, the message is then passed to the message queue 310D of the downstream message broker 310D.
[0061] In federated queues, the message is processed by the brokers in series, with the message being passed from one queue to the next if the message has not been consumed.
[0062] 1.6 ACKNOWLEDGEMENT
[0063] Messaging protocols cannot guarantee that messages are successfully delivered to a consumer. In some cases, for message safety, it may be desirable to have a mechanism to acknowledge receipt of messages for both publishers and consumers. In RabbitMQ, the delivery acknowledgement from consumers to RabbitMQ brokers is known as "consumer acknowledgement", and the delivery acknowledgement from brokers to publishers is referred to as "publisher confirms".
[0064] 1.7 TLS SUPPORT IN RABBITMQ
[0065] TLS (Transport Layer Security) is a cryptographic protocol used to secure the communication in a computer network, such as email or instant messaging. It is also used to enable peers to authenticate each other. It is accomplished with the mechanism of Public Key Infrastructure (PKI). TLS can secure the integrity and privacy of the messages when they are distributed from publishers to brokers, or across brokers. RabbitMQ provides the configuration guidelines to enable TLS in a RabbitMQ node. When a node enables the TLS connection, the distributed messages are encrypted automatically and only receiver can decrypt the exchanged information.
[0066] 2. FEDERATED MESSAGE BROKER
[0067] The published messages may not be delivered to consumers due to some subtle failures such as a network connection fail or network performance degradation. It is not easy for publishers 302 to check that their message is consumed if they did not set up the feature of publisher confirms before sending the message. Even if this publisher acknowledgement is set, it is difficult for the publishers 302 check that the message has not been tampered with. In addition, existing solutions may not provide the sufficient incentives for brokers 306 to guarantee successfully processing of messages and delivery of confirmation.
[0068] A federated message brokering system is provided herein which combines the federated plugins of RabbitMQ with the tamper-proof capabilities of a blockchain network. The federated message brokering system won't change the fundamental architecture of existing messaging solutions, instead, it leverages their architecture and existing types of exchanges.
[0069] There are several primary components in the federated message brokering system as follows: • Publishers: client applications connect to a broker that configures a federated exchange to publish messages.
[0070] • Consumers: applications connect to a federated broker to consume messages from subscribed queues. A consumer will be given an identifier by the connected broker.
[0071] • A service fee transaction: generated by the publisher to allocate the service fee that will be paid to the broker.
[0072] • A proof transaction (in the federated exchange scheme): generated by the broker to prove processing of message and claim the service fee.
[0073] The system is used not only to distribute messages, but also to allocate service fees to brokers. Publishers generate the service fee transaction to determine the service fee. Brokers can obtain service fees directly via the service fee transaction when messages are consumed. This makes payment for services between publishers and brokers more transparent, and incentivises brokers to process messages more efficiently for compensation. In addition, this system allows message publishers to get an immutable proof for a published message. When messages are consumed by consumers, the broker that successfully routes messages to the appropriate consumer can create a proof transaction. Such a proof transaction is published to the blockchain to prove the message consumption. Thus, the publisher can use the proof transaction to identify the brokers that process messages but have no direct connection with it.
[0074] It is assumed that all brokers in the system enable the TLS protocol to encrypt the connection traffic and authenticate the connecting clients (publishers and consumers). The TLS protocol ensures that the communication between the brokers and clients or between the brokers is secure.
[0075] Based on the different characteristics of federated exchanges and federated queues, the system has two different schemes to distribute messages and service fee transactions:
[0076] Federated exchange scheme, and
[0077] Federated queue scheme. Both schemes of the federated brokering system are helpful for the publisher, which does not need to connect all brokers of the system but can incentive them to consume messages.
[0078] The publisher can obtain the immutable proof of message consumption.
[0079] In the systems set out below, a broker connected to a publisher which publishes the message may be referred to as a publisher message broker and a broker connected to a consumer that consumes the message may be referred to as a consumer message broker.
[0080] 2.1 FEDERATED EXCHANGE SCHEME
[0081] An example system for implementing a federated exchange scheme is provided in Figure 6. The system comprises a first publisher 602, a first consumer 604, and a plurality of brokers 606. The first publisher 602, which publishes the message, is in communication with a publisher message broker 606i of the system. The publisher broker 606i receives the message from the first publisher 602, replicates the message, and provides the message to a plurality of other brokers 606 of the system. Each broker processes their copy of the message in their respective message queues, such that the consumers connected to each broker are able to consume the message if the message is addressed to them.
[0082] In the example of Figure 6, the message is addressed to the first consumer 604, in communication with a consumer message broker 6O62. The consumer message broker 6O62 receives a copy of the message and processes the message in its message queue. The first consumer 604 consumes the message from the message queue of the consumer message broker 6O62.
[0083] The consumer message broker and the publisher message broker may also be referred to herein as the consumer broker and the publisher broker respectively.
[0084] In addition to the processing of messages as is known in the art, the federated exchange system is configured to duplicate and pass proof blockchain transactions between the brokers 606 which can be used to prove consumption of the message by a consumer. There are two main requirements for brokers 606 to participate in the federated exchange scheme:
[0085] • Each broker 606 needs to configure a federated exchange and connect it to at least one federated exchange on another broker 606.
[0086] • Each broker 606 is able to connect to the blockchain network 150 to submit transactions, e.g., a message transaction that is partially signed by a publisher 602 and used to record the processed message on the blockchain 150 to prove the existence of consumed / undelivered messages. More importantly, the broker 606 gets paid through spending such a transaction.
[0087] The structure of the federated exchange system is shown in Figure 6.
[0088] • Pi : publisher i
[0089] • Cj : consumer j
[0090] • Bk-. broker k with a federated exchange
[0091] Eight brokers (Biti = 1,2, ... ,8) are shown as participating in the federated system example of Figure 6. The label provided for each broker 606 in Figure 6 is used to index the broker 606 and does not impart any further meaning.
[0092] Each broker 606 is required to configure a federated exchange and connect it to the federated exchanges on other brokers 606. For example, B^s federated exchange will connect to the federated exchanges on B2, B3and B4. For simplicity the federated exchanges are not shown in Figure 6. Each consumer Q can connect to the corresponding brokers 606. In Figure 6, only the first consumer C6604 connected to consumer broker B66O62 is shown. In fact, multiple consumers can be connected to the same broker 606.
[0093] The federated exchange scheme uses a pair of blockchain transactions, referred to herein as a message blockchain transactions and a proof blockchain transaction, to provide proof of message consumption by a consumer. The message transaction, also referred to herein as a service fee transaction, is generated by the publisher 602 and is used to pay brokers 606 for delivering the message. Brokers 606 can collect fees in two ways: Merkle root computation and publisher confirm (acknowledgement).
[0094] In the Merkle root computation method, the first publisher 602 generates a message transaction, as shown below. There are two outputs in the message transaction. For simplicity, the transaction fees are not included in the transaction shown above. These fees can be included without disruption to the logic.
[0095] The first output is used to pay to the publisher broker B-j 606i for its service, i.e. for receiving the message from the first publisher 602, duplicating the message, and providing the message to other brokers 606 in the federated exchange system. This output contains the hash of the message to allow other brokers 606 to verify the integrity of the message received from B±. The second output is a P2MS output that allows any broker 606 in the system to claim a service fee when the message is consumed by a consumer with which it is in communication. By using a P2MS output, the publisher 602 does not need to know in advance with which broker 606 the consumer 604 is in communication. The P2MS output includes a Merkle root computation script and a Merkle root (MRC).
[0096] MRCis generated by brokers 606 using consumers' public keys.
[0097] When a consumer connects to a broker 606 of the federated exchange system, the consumer provides their public key to the broker 606 to which it has connected. The broker 606 then provides the public key with a timestamp indicating the time at which the consumer connected thereto to the other broker 606 in the system. Alternatively, the consumer may connect to the broker 606 before the broker 606 joins the federated exchange system, in which case the broker 606 will share the timestamp information and the connected consumers' public keys when it joins the federated brokering system.
[0098] Each broker 606 then recalculates MRC, where each leaf node of the Merkle tree is a hash of one of the public keys of the consumers. The order of the hashes of consumers' public keys can be determined by the timestamp of the consumer's connection to the broker 606.
[0099] When a consumer leaves the system, its associated leaf node is removed from the Merkle tree and the Merkle root recalculated such that it is not dependent on the public key of said consumer.
[0100] MRCis the same for publishers and is obtained from the brokers 606 they are connected to. For example, P±gets MRCfrom B1.
[0101] Any consumer joining or leaving the system will be reported to the system by the corresponding broker 606. Then MRCwill be updated by all brokers and resent to the publishers. The following describes the steps for proving consumption of a message by a consumer, and how a broker 606 can claim the service fee, through the pair of blockchain transactions. The method is described with reference to Figure 6.
[0102] 1. P±publishes a message M. This message can be a request for data storage or data access for example.
[0103] 2. P±creates a message transaction Tx, shown above.
[0104] 3. No consumer on B±can consume the message. B±submits Tx to the blockchain.
[0105] 4. B±replicates M, Tx and distributes them to other brokers.
[0106] 5. Suppose C6is the first consumer of M and sends B6a consumer acknowledgement (including a signature Sigc&). The consumer acknowledgement is signed using Sigc&. B6then verifies the signature Sigc&used to sign the consumer acknowledgement. If the signature is valid, B6generates a proof transaction (shown below) that uses Sigc&to spend the funds in Tx. To unlock the second output of Tx, the broker B6requires two signatures SigB&and Sigc&and the Merkle proof.
[0107] 6. B6submits the proof transaction to the blockchain. The proof transaction comprises a single input and output. The input references the P2MS output of the message transaction, and the unlocking script comprises a public key and signature of the consumer message broker 6O62, used to unlock the P2MS locking script, the public key and signature of the fist consumer 604, and the Merkle proof corresponding to the Merkle tree comprising the consumer public keys and the node of the first consumer 604.
[0108] By executing the unlocking script of the proof transaction together with the locking script of the message transaction, a candidate Merkle root is computed, based on the first consumer's public key and the Merkle proof provided in the unlocking script, and compared to the target Merkle root provided in the message transaction locking script. If the candidate and target Merkle proofs match, Sigc&is proven to belong to a consumer of the federated exchange system, and the output of the message transaction is unlocked. Thus, the consumer broker 6O62 is paid for its service.
[0109] Sigc&provided in the unlocking script of the proof transaction may be referred to herein as a message consumption value as it is provided as proof of message consumption.
[0110] By providing Sigc&and the corresponding Merkle proof in the unlocking script, the consumer is verified as a consumer of the federated exchange system. The public key and signature of the first consumer 604 can be used to verify that the first consumer 604 consumed the message.
[0111] All brokers 606 can submit a proof transaction to claim the fees. This may occur if the message is sent to a topic, for example, as described in section 1.2. However, only the publisher message broker 606 to obtain the earliest consumer signature Sigcgets paid, since that broker 606 is the irst to submit their proof transaction to the blockchain. Any transactiToxnpr00fpublished later will be considered as a double spend transaction. Txpr00fhas UNIT_MAX (OxFFFFFFFF) sequence number, so the first transaction to be seen by a miner is chosen to be verified and published on the blockchain. That means Txpr00fis first submitted by B6, miners will see it and verify and publish to the blockchain. Any other brokers that submiTtxpr00flater than B6will not be able to get paid.
[0112] One advantage of this method is speed. A broker 606 can automatically generate the proof transaction when the message is consumed by one of its consumers, and submit the message and proof transactions to the nodes of the blockchain without any delay in sending confirmation to the publisher 602 or publisher message broker 606i. Also, the consumer message broker 6O62 does not need to trust the publisher broker 6O61. A malicious publisher broker 6O61 could receive the signature and public key of the consumer 604 from the consumer broker 6O62, and submit the proof transaction comprising a public key and signature of a different broker 606, such that the consumer broker 6O61 would not receive the payment. The method set out above prevents this.
[0113] However, sending double spend transactions to the blockchain network can severely damage the network. To avoid this issue, the following modifications to the method set out above can be made:
[0114] 1. B±only replicates the message M and distributes it to other brokers. Brdoes not replicate the message blockchain transaction.
[0115] 2. When one of the brokers 606, e.g., B6, first reports to B±that the message has been consumed by way of a message consumption indication, Brsubmits Tx to the network and at the same time sends Tx to B6. For brokers reporting later than B6, B±won't send Tx to them.
[0116] 3. B6generates the proof transactioTnxpr00fand then submits it to the network.
[0117] If B6is a malicious broker, it did not consume the message or was not the first to consume it, then B±would not receive the payment Xj or would receive the payment late. In this case, next time B6reports message consumption, B±may not trust it and will not send it a Tx. Therefore, a malicious broker 606 can be identified.
[0118] The message consumption indication may, for example, comprise a publisher acknowledgement, described in more detail below. Figure 7 illustrates the alternative methods set out above. Continuous lines represent the steps implemented in both methods, the dashed lines show the steps implemented in the first method set out above, and the dotted lines show the steps of the second method.
[0119] The first method set out above, in which the publisher broker 606i duplicates both the message and the message transaction for providing to the brokers 606 of the federated exchange system, comprises steps 701, 702, 703, 704, 705, 706, 707, 708 709, and 710 of Figure 7.
[0120] The second method, in which the message transaction is only sent to the broker 6O62 which provides proof of message consumption to the publisher broker 6O61, comprises steps 701, 703, 705, 707, 708, 711, 712, 713, 714, and 715.
[0121] Using the Merkle root computation method, malicious brokers cannot claim fees without processing the messages.
[0122] However, the Merkle proof verification script in the message transaction is large, and therefore is both expensive and requires a large amount of computational resources to execute. Also, the Merkle proof calculations which the brokers 606 are required to perform are complex and therefore may result in inefficient message processing.
[0123] As an alternative, a publisher confirm method may be used. In this method, a publisher confirm is provided in the locking script of the message transactions. Using this method, there is a trade-off to be made between security and cost.
[0124] In the publisher confirm method, a message transaction Txnon^Merkleis used (see below). The message transaction:
[0125] • is generated by the publisher 602, but submitted by a broker 606 (T Xnon--Merkle}
[0126] • does not use the Merkle proof in the locking script • uses a P2MS script in the second output
[0127] • uses a sighash flag SIGHASH_SINGLE to lock funds that is paid to Bj
[0128] • will add a publisher acknowledgement H(ACKB6→P1) in the third output The publisher confirm method reduces the script size and computation cost relative to the Merkle proof computation method. A sighash flag SIGHASH_SINGLE is used to sign the output with the same index. This allows B6to add the hash of publisher acknowledgement ACKB6→PIas a third output into the Txnon-Merkle. B6generates Txpr00fand sends Txnon-Merkieand Txpr00ftogether to the blockchain.
[0129] The transaction Txnon-Merkieis not submitted to the blockchain network, but instead acts as a template for the brokers 606 to which they can add the publisher acknowledgement once acquired. The publisher acknowledgement may be referred to herein as a message consumption value since it indicates that the message has been consumed by the consumer
[0130] 604.
[0131] Figure 8 shows the steps of the publisher confirm method.
[0132] At step 801, the publisher 602 publishes the message and provides the incomplete message transaction Txnon-Merkieto the publisher broker 606i. The publisher broker 606i duplicates the message and the incomplete message transaction, steps 802 and 803, and provides these to the other brokers 606 in the federated message brokering system to which the publisher broker 606i is connected, steps 804 and 805.
[0133] The consumer broker 6O62 receives the message and processes the message in its message queue. The first consumer 604, connected to the consumer broker 6O62, consumer the message at step 806 and provides a confirmation of consumption to the consumer broker 6O62 at step 807.
[0134] The consumer broker 6O62 provides their publisher acknowledgement to the publisher broker 6O61 at step 808, which is subsequently provided to the publisher 602 as proof of message consumption.
[0135] The consumer broker 6O62 updates the message transaction at step 809 by adding the publisher acknowledgement in the locking script of the incomplete message transaction. The consumer broker 6O62 also generates the proof transaction at step 810. The consumer broker 6O62 submits both the message transaction and the proof transaction to the blockchain, steps 811 and 812.
[0136] It will be appreciated that the method set out in Figure 8 may be modified. For example, the incomplete message transaction may not be duplicated and sent with the message to the brokers 606. Instead, the incomplete message transaction may be sent only to the consumer broker 6O62 in response to the publisher broker 6O61 receiving the publisher acknowledgement at step 808. Alternatively, the publisher broker 606i may update the incomplete message transaction itself in response to receiving the publisher acknowledgement, and provide the completed message transaction to the blockchain.
[0137] The publisher confirm method reduces the script size, as the large Merkle proof computation script is not needed, and computation cost. It is also easy to integrate with the existing acknowledgment feature message brokering systems.
[0138] However, the publisher confirm method does not prevent malicious brokers from claiming fees without processing the message, since a malicious broker could provide the publisher acknowledgement without a consumer having consumed the message. Therefore, a certain level of trust is required between the brokers 606.
[0139] However, the Txnon-Merkteallows the publisher to identify malicious brokers to prevent recurrence. For example, if B6adds a false publisher acknowledgment or does not add any publisher acknowledgement, the publisher Prcan identify him when B6spends the second output of T xnon-Merkteusing PKB&in the T xpr00f. P±then sends notifications of B6's cheating to other brokers. Other brokers may disconnect their federated exchanges to B6. In this case, B6will no longer receive messages from the federated brokering system. In other words, B6is disconnected from the system.
[0140] In summary, the federated exchange scheme can incentivise brokers to route messages to more consumers and process messages faster. In addition, the brokers in the system can set up different levels of federated exchanges, which charge different service fees, to route messages to queues with more connected consumers.
[0141] 2.1.1 BID PAYMENT MODE
[0142] The service fee Tx is distributed to brokers 606 to allow them to claim the fees as described above. The payment value x2in Tx can be the same for all brokers 606, or it can be different for different brokers 606 with the publisher's consent. In some cases, Prwants a broker 606 to prioritize M and put it at the head of a queue immediately. Once M is prioritized in the queue, it can be quickly consumed. Different brokers 606 may charge different service fees for this priority. Thus, the publisher 602 can receive different bids from the brokers 606.
[0143] A bid payment mode may be used to allow brokers 606 and publishers 602 to negotiable the service fee (x2) for the message priority.
[0144] Assumption: Brokers 606 with appropriate consumers 604 can offer message priority at different fees.
[0145] Incentive: Messages can be quickly consumed with lower price, once it is prioritized in the queue.
[0146] Negotiation Method: Only the method of payment channel is discussed herein. It will be appreciated that other negotiation methods may be used.
[0147] A payment channel is a communication channel where participants can directly exchange and update a non-finalised transaction. It can be opened directly with the participating peers, without needing a third party. It allows many participants in a channel. It is typically closed with an on-chain payment, submitting a finalised transaction.
[0148] In the bid mode, Prdistributes the service fee Tx with the smallest sequence number. A broker 606 can negotiable the value of x2with a publisher 602 through some ways, such as a payment channel. The payment channel allows the publisher 602 and the broker 606 to directly exchange and update Tx. When a broker 606 receives Tx and wants to charge a higher value x2', it can open a payment channel with the publisher and modify x2in the Tx.
[0149] The bid payment mode can be implemented in following steps.
[0150] 1. P±publishes M that is set to have a priority level. It also creates a message transaction such as Tx or Txnon-Merkiewhere the sequence number is set to a lowest value (e.g. 1) and the value of the second output is 0. M and the message transaction will be distributed to all brokers 606. 2. Brokers 606 with appropriate consumers 604 that can consume M can communicate with P±through a payment channel to modify x2. It is worth noting that each x2should be higher than the cost of message priority.
[0151] 3. Pj allocates the increasing sequence number to decreasing value of x2.
[0152] 4. Suppose B2would like to prioritise M in the queue with x2', this means B2is more likely to receive the acknowledgement and acknowledgement- related signature from the consumer 604 earlier than other brokers. B2submits Tx with x2and the proof transaction together to claim the service fees.
[0153] In the Federated Exchange Scheme set out above, brokers 606 are competitors. This enables the published messages to be consumed more efficiently. In addition, publishers can pay a small service fee, but make messages available to more consumers (applications).
[0154] 2.2 FEDEREATED QUEUE SCHEME
[0155] An example system for implementing a federated queue scheme is provided in Figure 9. The system comprises three publisher 902, four consumers 904, and a plurality of brokers 906. The brokers 906 of Figure 9 are shown as divided into two categories - upstream brokers and downstream broker.
[0156] A first publisher 902i, which publishes the message, is in communication with a publisher broker 906i of the system. The publisher broker 906i receives the message from the first publisher 902i, and processes the message through its message queue.
[0157] Since no consumer of the publisher broker 906i consumes the message, the message is passed to a consumer broker 9062, which processes the message in its message queue.
[0158] If the message is consumed by a first consumer 9041 connected to the consumer broker 9062, the message is not passed to any other broker 906. However, if the message is not consumed by a consumer connected to the consumer broker 9062, the message ais passed to the next broker 906s for processing. All brokers 906 in the federated queue scheme configure the same logical federated queue instead of a federated exchange. They are also required to be able to connect to the blockchain network 150 for publishing a transaction. Any broker 906 that satisfies with the two main requirements can participate in the federated queue scheme. In the federated queue scheme, messages are moved from one queue to another queue instead of being replicated. It means that a message can only be consumed once.
[0159] The federated queue scheme can be used when the upstream brokers cannot consume the messages and need to assign them to the connected federated queues. At the same time, the service fees can be paid directly to the broker 906 that consumes messages. Multiple message transactions can be moved to different federated brokers with corresponding messages. The way the federated brokers 906 connect to each other is flexible.
[0160] The following example describes how the service fee (or message) transaction is distributed along with the published messages with reference to Figure 9.
[0161] The upstream brokers receive messages (MJ and related message transaction
[0162] Txi from the publishers (P1;P2, P3) and allocate them to the connected downstream broker B4. The messages will be moved to the federated queue such as FQ4.
[0163] The upstream brokers add one input and one output to Txtto secure their service fees before transferring Txtto another broker.
[0164] The incomplete message transaction Txtoutput by the upstream brokers is shown below.
[0165] The first input-output pair is provided by the publisher 902. The locking script comprises a hash of the message and locks the UTXO to the publisher. The first input-output pair is signed by the publisher such that only the first input and first output are signed, i.e. using SINGLE\ANYONECANPAY signature flag.
[0166] The second input-output pair is provided by the broker 906 connected to the publisher 902.
[0167] The locking script locks the UTXO to the broker 906. The second input-output pair is signed by the broker such that only the first input and first output are signed, i.e. using
[0168] SINGLE\ANYONECANPAY signature flag. Taking Tx-t corresponding to M4as the example, the updated Tx4(denoted as Tx / ) is shown below. The first output returns the change to P1. This allows PTto fix the value of the service fees. The second output is to pay Bltwhich is added by B4to lock in its service fee. The third output is to pay B4, which is added by B4and contains the consumer signature associated with the consumer acknowledgement. It is worth noting that P4or B4uses the sighash flag SIGHASH_SINGLE | ANYONECANPAY to sign its own input and the output with the same index.
[0169] Each entity provides an outpoint referencing a UTXO locked to the respective entity. This allows the entity to lock the output by way of the SINGLE\ANYONECANPAY signature flag.
[0170] The message transaction, once completed by the broker to which the consumer is connected, shows the whole journey of the message from the publisher 902 to the consumer 904. The distributed Txtallows brokers and publishers to check the payment value. This makes the payment of service fees transparent. The distribution process of and Txtis described in detail below. 1. P4send and Tx4, M2and Tx2to the broker B1. If no appropriate consumers on B4can consume these two messages, B4transfers them to the connected federated queue FQ4. The same goes for other messages published by P2and P3. All messages are moved to FQ4.
[0171] 2. Two consumers Q and C2connected to FQ4on B4can consume M4and M2. When B4receives consumer acknowledgements from C4and C2, B4adds the consumer's signature SigCiand SigCzto the respective Tx4and TX2and publishes the updated transactions to the blockchain. Sigc. generated by the consumer Q is used to sign the consumer acknowledgement. Note that the sum of xltxBi, xB4is less than the value of UTXOP1.
[0172] 3. If no consumers on FQ4can consume M3, M4, M5and M6, B4will move them to its connected federated queue FQ5. At the same time, B4adds inputs and outputs (similar to those added by B4) to Tx3, Tx4, Tx5and Tx6respectively and passes the updated transactions to B5.
[0173] 4. A consumer C3on B5can consume M3. When B5receives an acknowledgement from C3, it adds its public key and C3's signature associated with the acknowledgement to Tx3to receive service fee.
[0174] 5. The rest of messages can be consumed by consumers on B6. And the corresponding message transactions are submitted by B6.
[0175] If messages moved from the upstream brokers to FQ5cannot be consumed, they can be moved to B4or B6, depending on configuration on B5. The corresponding transactions will be updated and transmitted between two brokers.
[0176] Sigc. may be referred to a message consumption value as it indicates that the message has been consumed.
[0177] Figure 10 provides the steps implemented by a broker 906 of the federated queue system. At step S1002, the broker 906 receives the message and the message transaction. These may be received from the publisher 902 if the broker 906 is connected thereto. Otherwise, these are received from a previous broker 906 in the system.
[0178] At step S1004, the broker 906 processes the message in its message queue. If a consumer 904 connected to the broker 906 is eligible to consume the message, it will do so. However, there may be no eligible consumer 904 connected to the broker 906.
[0179] At step S1006, the broker determines if the message has been consumed.
[0180] If the message has not been consumed, the broker updates the message transaction at step S1008 by adding its input-output pair for receiving payment. An example input-output pair is shown at the second index of Tx^ above.
[0181] The broker 906 then passes the message and the updated message transaction to the next broker 906 in the federated queue system, step S1010.
[0182] If, instead, a consumer 904 connected to the broker 906 has consumer the message, the broker 906 verifies the consumer acknowledgement received from the consumer 904 at step S1012. Verifying the consumer acknowledgement is described above in section 2.1.
[0183] Provided the consumer acknowledgement is found to be valid, the broker 906 completes the message transaction by providing their input-output pair in the message transaction, step S1014. The output comprises the consumer's signature as proof of message consumption. The broker 906 signs the whole message transaction.
[0184] Finally, at step S1016, the broker 906 provides the complete message transaction to the nodes of the blockchain for storing in the blockchain.
[0185] In the federated queue scheme, the brokers are not competitors. Instead, they participate in the system to help each other consume more messages or route messages to the appropriate consumers and get paid for collaborating. It will be appreciated that the method of Figure 10 may be implemented in the federated exchange system. Referring the Figure 6, the method of Figure 10 may be implemented by broker B3, which receives copy of the message from broker Bl, and if none of its consumers consumer the message, it duplicates the message and passes it to brokers B6 and B7. In this example, B3 may not implement step S1008 of updating the message transaction.
[0186] 2.3 ALTERNATIVES
[0187] The methods set out above are provided by way of example only. Variations of the methods are possible, some of which have been provided.
[0188] It will be appreciated that other values than those set out above may be provided in the transactions as the message consumption value. For example, the publisher acknowledge may be provided in the final output of the complete message transaction in the federated exchange method. Similarly, the consumer's signature could be provided as the message consumption value in the proof transaction of the publisher confirm method described above.
[0189] It will be appreciated that the methods set out above are not limited to use with RabbitMQ message brokering systems. Instead, RabbitMQ is provided as an example message brokering system with which the methods provided herein are compatible. It will be apparent to the person skilled in the art that the methods provided herein may be used with other message brokering systems exhibiting the same or similar features.
[0190] Other possible variations will be apparent to the person skilled in the art.
[0191] 3. EXAMPLE SYSTEM OVERVIEW
[0192] A blockchain refers to a form of distributed data structure, wherein a duplicate copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (referred to below as a "blockchain network") and widely publicised. The blockchain comprises a chain of blocks of data, wherein each block comprises one or more transactions. Each transaction, other than so-called "coinbase transactions", points back to a preceding transaction in a sequence which may span one or more blocks going back to one or more coinbase transactions. Coinbase transactions are discussed further below.
[0193] Transactions that are submitted to the blockchain network are included in new blocks. New blocks are created by a process often referred to as "mining", which involves each of a plurality of the nodes competing to perform "proof-of-work", i.e. solving a cryptographic puzzle based on a representation of a defined set of ordered and validated pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain may be pruned at some nodes, and the publication of blocks can be achieved through the publication of mere block headers.
[0194] The transactions in the blockchain may be used for one or more of the following purposes: to convey a digital asset (i.e. a number of digital tokens), to order a set of entries in a virtualised ledger or registry, to receive and process timestamp entries, and / or to timeorder index pointers. A blockchain can also be exploited in order to layer additional functionality on top of the blockchain. For example, blockchain protocols may allow for storage of additional user data or indexes to data in a transaction. There is no pre-specified limit to the maximum data capacity that can be stored within a single transaction, and therefore increasingly more complex data can be incorporated. For instance this may be used to store an electronic document in the blockchain, or audio or video data.
[0195] In an "output-based" model (sometimes referred to as a UTXO-based model), the data structure of a given transaction comprises one or more inputs and one or more outputs. Any spendable output comprises an element specifying an amount of the digital asset that is derivable from the proceeding sequence of transactions. The spendable output is sometimes referred to as a UTXO ("unspent transaction output"). The output may further comprise a locking script specifying a condition for the future redemption of the output. A locking script is a predicate defining the conditions necessary to validate and transfer digital tokens or assets. Each input of a transaction (other than a coinbase transaction) comprises a pointer (i.e. a reference) to such an output in a preceding transaction, and may further comprise an unlocking script for unlocking the locking script of the pointed-to output. So consider a pair of transactions, call them a first and a second transaction (or "target" transaction). The first transaction comprises at least one output specifying an amount of the digital asset, and comprising a locking script defining one or more conditions of unlocking the output. The second, target transaction comprises at least one input, comprising a pointer to the output of the first transaction, and an unlocking script for unlocking the output of the first transaction.
[0196] In such a model, when the second, target transaction is sent to the blockchain network to be propagated and recorded in the blockchain, one of the criteria for validity applied at each node will be that the unlocking script meets all of the one or more conditions defined in the locking script of the first transaction. Another will be that the output of the first transaction has not already been redeemed by another, earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate it (as a valid transaction, but possibly to register an invalid transaction) nor include it in a new block to be recorded in the blockchain.
[0197] An alternative type of transaction model is an account-based model. In this case each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance. The current state of all accounts is stored by the nodes separate to the blockchain and is updated constantly.
[0198] Figure 1 shows an example system 100 for implementing a blockchain 150. The system 100 may comprise a packet-switched network 101, typically a wide-area internetwork such as the Internet. The packet-switched network 101 comprises a plurality of blockchain nodes 104 (often referred to as "miners") that may be arranged to form a peer-to-peer (P2P) network 106 within the packet-switched network 101. Whilst not illustrated, the blockchain nodes 104 may be arranged as a near-complete graph. Each blockchain node 104 is therefore highly connected to other blockchain nodes 104.
[0199] Each blockchain node 104 comprises computer equipment of a peer, with different ones of the nodes 104 belonging to different peers. Each blockchain node 104 comprises processing apparatus comprising one or more processors, e.g. one or more central processing units (CPUs), accelerator processors, application specific processors and / or field programmable gate arrays (FPGAs), and other equipment such as application specific integrated circuits (ASICs). Each node also comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media. The memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as a hard disk; an electronic medium such as a solid-state drive (SSD), flash memory or EEPROM; and / or an optical medium such as an optical disk drive.
[0200] The blockchain 150 comprises a chain of blocks of data 151, wherein a respective copy of the blockchain 150 is maintained at each of a plurality of blockchain nodes 104 in the distributed or blockchain network 106. As mentioned above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in full. Instead, the blockchain 150 may be pruned of data so long as each blockchain node 150 stores the block header (discussed below) of each block 151. Each block 151 in the chain comprises one or more transactions 152, wherein a transaction in this context refers to a kind of data structure. The nature of the data structure will depend on the type of transaction protocol used as part of a transaction model or scheme. A given blockchain will use one particular transaction protocol throughout.
[0201] A blockchain node 104 may be configured to forward transactions 152 to other blockchain nodes 104, and thereby cause transactions 152 to be propagated throughout the network 106. A blockchain node 104 may be configured to create blocks 151 and to store a respective copy of the same blockchain 150 in their respective memory. A blockchain node 104 may also maintain an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into blocks 151. The ordered pool 154 is often referred to as a "mempool". This term herein is not intended to limit to any particular blockchain, protocol or model. It refers to the ordered set of transactions which a node 104 has accepted as valid and for which the node 104 is obliged not to accept any other transactions attempting to spend the same output.
[0202] In a given present transaction 152j, the (or each) input comprises a pointer referencing the output of a preceding transaction 1521 in the sequence of transactions, specifying that this output is to be redeemed or "spent" in the present transaction 152j. Spending or redeeming does not necessarily imply transfer of a financial asset, though that is certainly one common application. More generally spending could be described as consuming the output, or assigning it to one or more outputs in another, onward transaction. In general, the preceding transaction could be any transaction in the ordered set 154 or any block 151. The preceding transaction 152i need not necessarily exist at the time the present transaction 152j is created or even sent to the network 106, though the preceding transaction 152i will need to exist and be validated in order for the present transaction to be valid. Hence "preceding" herein refers to a predecessor in a logical sequence linked by pointers, not necessarily the time of creation or sending in a temporal sequence, and hence it does not necessarily exclude that the transactions 152i, 152j be created or sent out-of-order (see discussion below on orphan transactions). The preceding transaction 152i could equally be called the antecedent or predecessor transaction.
[0203] Due to the resources involved in transaction validation and publication, typically at least each of the blockchain nodes 104 takes the form of a server comprising one or more physical server units, or even whole a data centre. However in principle any given blockchain node 104 could take the form of a user terminal or a group of user terminals networked together.
[0204] The memory of each blockchain node 104 stores software configured to run on the processing apparatus of the blockchain node 104 in order to perform its respective role or roles and handle transactions 152 in accordance with the blockchain node protocol. It will be understood that any action attributed herein to a blockchain node 104 may be performed by the software run on the processing apparatus of the respective computer equipment. The node software may be implemented in one or more applications at the application layer, or a lower layer such as the operating system layer or a protocol layer, or any combination of these.
[0205] Any given blockchain node may be configured to perform one or more of the following operations: validating transactions, storing transactions, propagating transactions to other peers, performing consensus (e.g. proof-of-work) / mining operations. In some examples, each type of operation is performed by a different node 104. That is, nodes may specialise in particular operation. For example, a nodes 104 may focus on transaction validation and propagation, or on block mining. In some examples, a blockchain node 104 may perform more than one of these operations in parallel. Any reference to a blockchain node 104 may refer to an entity that is configured to perform at least one of these operations.
[0206] Also connected to the network 101 is the computer equipment 102 of each of a plurality of parties 103 in the role of consuming users. These users may interact with the blockchain network 106 but do not participate in validating transactions or constructing blocks. Some of these users or agents 103 may act as senders and recipients in transactions. Other users may interact with the blockchain 150 without necessarily acting as senders or recipients. For instance, some parties may act as storage entities that store a copy of the blockchain 150 (e.g. having obtained a copy of the blockchain from a blockchain node 104).
[0207] Some or all of the parties 103 may be connected as part of a different network, e.g. a network overlaid on top of the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be said to be part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 as they do not perform the roles required of the blockchain nodes. Instead, each party 103 may interact with the blockchain network 106 and thereby utilize the blockchain 150 by connecting to (i.e. communicating with) a blockchain node 106. Two parties 103 and their respective equipment 102 are shown for illustrative purposes: a first party 103a and his / her respective computer equipment 102a, and a second party 103b and his / her respective computer equipment 102b. It will be understood that many more such parties 103 and their respective computer equipment 102 may be present and participating in the system 100, but for convenience they are not illustrated. Each party 103 may be an individual or an organization. Purely by way of illustration the first party 103a is referred to herein as Alice and the second party 103b is referred to as Bob, but it will be appreciated that this is not limiting and any reference herein to Alice or Bob may be replaced with "first party" and "second "party" respectively.
[0208] The computer equipment 102 of each party 103 comprises respective processing apparatus comprising one or more processors, e.g. one or more CPUs, GPUs, other accelerator processors, application specific processors, and / or FPGAs. The computer equipment 102 of each party 103 further comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media. This memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as hard disk; an electronic medium such as an SSD, flash memory or EEPROM; and / or an optical medium such as an optical disc drive. The memory on the computer equipment 102 of each party 103 stores software comprising a respective instance of at least one client application 105 arranged to run on the processing apparatus. It will be understood that any action attributed herein to a given party 103 may be performed using the software run on the processing apparatus of the respective computer equipment 102. The computer equipment 102 of each party 103 comprises at least one user terminal, e.g. a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smartwatch. The computer equipment 102 of a given party 103 may also comprise one or more other networked resources, such as cloud computing resources accessed via the user terminal.
[0209] The client application 105 may be initially provided to the computer equipment 102 of any given party 103 on suitable computer-readable storage medium or media, e.g. downloaded from a server, or provided on a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or a removable optical drive, etc.
[0210] The client application 105 comprises at least a "wallet" function. This has two main functionalities. One of these is to enable the respective party 103 to create, authorise (for example sign) and send transactions 152 to one or more bitcoin nodes 104 to then be propagated throughout the network of blockchain nodes 104 and thereby included in the blockchain 150. The other is to report back to the respective party the amount of the digital asset that he or she currently owns. In an output-based system, this second functionality comprises collating the amounts defined in the outputs of the various 152 transactions scattered throughout the blockchain 150 that belong to the party in question.
[0211] Note: whilst the various client functionality may be described as being integrated into a given client application 105, this is not necessarily limiting and instead any client functionality described herein may instead be implemented in a suite of two or more distinct applications, e.g. interfacing via an API, or one being a plug-in to the other. More generally the client functionality could be implemented at the application layer or a lower layer such as the operating system, or any combination of these. The following will be described in terms of a client application 105 but it will be appreciated that this is not limiting.
[0212] The instance of the client application or software 105 on each computer equipment 102 is operatively coupled to at least one of the blockchain nodes 104 of the network 106. This enables the wallet function of the client 105 to send transactions 152 to the network 106. The client 105 is also able to contact blockchain nodes 104 in order to query the blockchain 150 for any transactions of which the respective party 103 is the recipient (or indeed inspect other parties' transactions in the blockchain 150, since in embodiments the blockchain 150 is a public facility which provides trust in transactions in part through its public visibility). The wallet function on each computer equipment 102 is configured to formulate and send transactions 152 according to a transaction protocol. As set out above, each blockchain node 104 runs software configured to validate transactions 152 according to the blockchain node protocol, and to forward transactions 152 in order to propagate them throughout the blockchain network 106. The transaction protocol and the node protocol correspond to one another, and a given transaction protocol goes with a given node protocol, together implementing a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. The same node protocol is used by all the nodes 104 in the network 106.
[0213] An alternative type of transaction protocol operated by some blockchain networks may be referred to as an "account-based" protocol, as part of an account-based transaction model. In the account-based case, each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance. The current state of all accounts is stored, by the nodes of that network, separate to the blockchain and is updated constantly. In such a system, transactions are ordered using a running transaction tally of the account (also called the "position" or "nonce"). This value is signed by the sender as part of their cryptographic signature and is hashed as part of the transaction reference calculation. In addition, an optional data field may also be signed the transaction. This data field may point back to a previous transaction, for example if the previous transaction ID is included in the data field.
[0214] Some account-based transaction models share several similarities with the output-based transaction model described herein. For example, as mentioned above, the data field of an account-based transaction may point back to a previous transaction, which is equivalent to the input of an output-based transaction which references an outpoint a previous transaction. Thus both models enable linking between transactions. As another example, an account-based transaction contains a "recipient" field (in which a receiving address of an account is specified) and a "value" field (in which an amount of digital asset may be specified). Together the recipient and value fields are equivalent to the output of an outputbased transaction which may be used to assign an amount of digital asset to a blockchain address. Similarly, an account-based transaction has a "signature" field which includes a signature for the transaction. The signature is generated using the sender's private key and confirms the sender has authorized this transaction. This is equivalent to an input / unlocking script of an output-based transaction which, typically, includes a signature for the transaction. When both types of transaction are submitted to their respective blockchain networks, the signatures are checked to determine whether the transaction is valid and can be recorded on the blockchain. On an account-based blockchain, a "smart contact" refers to a transaction that contains a script configured to perform one or more actions (e.g. send or "release" a digital asset to a recipient address) in response to one or more inputs (provided by a transaction) meeting one or more conditions defined by the smart contact's script. The smart contract exists as a transaction on the blockchain, and can be called (or triggered) by subsequent transactions. Thus, in some examples, a smart contract may be considered equivalent to a locking script of an output-based transaction, which can be triggered by a subsequent transaction, and checks whether one or more conditions defined by the locking script are met by the input of the subsequent transaction.
[0215] 4. UTXO-BASED MODEL Figure 2 illustrates an example transaction protocol. This is an example of a UTXO-based protocol. A transaction 152 (abbreviated "Tx") is the fundamental data structure of the blockchain 150 (each block 151 comprising one or more transactions 152). The following will be described by reference to an output-based or "UTXO" based protocol. However, this is not limiting to all possible embodiments. Note that while the example UTXO-based protocol is described with reference to bitcoin, it may equally be implemented on other example blockchain networks.
[0216] In a UTXO-based model, each transaction ("Tx") 152 comprises a data structure comprising one or more inputs 202, and one or more outputs 203. Each output 203 may comprise an unspent transaction output (UTXO), which can be used as the source for the input 202 of another new transaction (if the UTXO has not already been redeemed). The UTXO includes a value specifying an amount of a digital asset. This represents a set number of tokens on the distributed ledger. The UTXO may also contain the transaction ID of the transaction from which it came, amongst other information. The transaction data structure may also comprise a header 201, which may comprise an indicator of the size of the input field(s) 202 and output field(s) 203. The header 201 may also include an ID of the transaction. In embodiments the transaction ID is the hash of the transaction data (excluding the transaction ID itself) and stored in the header 201 of the raw transaction 152 submitted to the nodes 104.
[0217] Say Alice 103a wishes to create a transaction 152j transferring an amount of the digital asset in question to Bob 103b. In Figure 2 Alice's new transaction 152j is labelled “ TxT . It takes an amount of the digital asset that is locked to Alice in the output 203 of a preceding transaction 152i in the sequence, and transfers at least some of this to Bob. The preceding transaction 152i is labelled “ Txo" in Figure 2. TY^and Txi are just arbitrary labels. They do not necessarily mean that Txo is the first transaction in the blockchain 151, nor that Txi is the immediate next transaction in the pool 154. Txi could point back to any preceding (i.e. antecedent) transaction that still has an unspent output 203 locked to Alice.
[0218] The terms "preceding" and "subsequent" as used herein in the context of the sequence of transactions refer to the order of the transactions in the sequence as defined by the transaction pointers specified in the transactions (which transaction points back to which other transaction, and so forth). They could equally be replaced with "predecessor" and "successor", or "antecedent" and "descendant", "parent" and "child", or such like. It does not necessarily imply an order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. Nevertheless, a subsequent transaction (the descendent transaction or "child") which points to a preceding transaction (the antecedent transaction or "parent") will not be validated until and unless the parent transaction is validated. A child that arrives at a blockchain node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain time to wait for the parent, depending on the node protocol and / or node behaviour.
[0219] One of the one or more outputs 203 of the preceding transaction Txo comprises a particular UTXO, labelled here UTXOo. Each UTXO comprises a value specifying an amount of the digital asset represented by the UTXO, and a locking script which defines a condition which must be met by an unlocking script in the input 202 of a subsequent transaction in order for the subsequent transaction to be validated, and therefore for the UTXO to be successfully redeemed.
[0220] The locking script (aka scriptPubKey) is a piece of code written in the domain specific language recognized by the node protocol. A particular example of such a language is called "Script" (capital S) which is used by the blockchain network. The locking script specifies what information is required to spend a transaction output 203, for example the requirement of Alice's signature. Locking scripts appear in the outputs of transactions. The unlocking script (aka scriptSig) is a piece of code written the domain specific language that provides the information required to satisfy the locking script criteria. For example, it may contain Bob's signature. Unlocking scripts appear in the input 202 of transactions.
[0221] So in the example illustrated, UTXOo'm the output 203 of Txo comprises a locking script [Checksig PA] which requires a signature Sig PA of Alice in order for UTXOo to be redeemed (strictly, in order for a subsequent transaction attempting to redeem UTXOo to be valid). [Checksig PA] contains a representation (i.e. a hash) of the public key PA from a publicprivate key pair of Alice. The input 202 of Txi comprises a pointer pointing back to Txi (e.g. by means of its transaction ID, TxIDo, which in embodiments is the hash of the whole transaction Txo}. The input 202 of Txi comprises an index identifying UTXOo within Txo, to identify it amongst any other possible outputs of Txo. The input 202 of Txi further comprises an unlocking script <Sig PA> which comprises a cryptographic signature of Alice, created by Alice applying her private key from the key pair to a predefined portion of data (sometimes called the "message" in cryptography). The data (or "message") that needs to be signed by Alice to provide a valid signature may be defined by the locking script, or by the node protocol, or by a combination of these.
[0222] When the new transaction Txi arrives at a blockchain node 104, the node applies the node protocol. This comprises running the locking script and unlocking script together to check whether the unlocking script meets the condition defined in the locking script (where this condition may comprise one or more criteria).
[0223] Note that the script code is often represented schematically (i.e. not using the exact language). For example, one may use operation codes (opcodes) to represent a particular function. "OP _..." refers to a particular opcode of the Script language. As an example, OP_RETURN is an opcode of the Script language that when preceded by OP_FALSE at the beginning of a locking script creates an unspendable output of a transaction that can store data within the transaction, and thereby record the data immutably in the blockchain 150. E.g. the data could comprise a document which it is desired to store in the blockchain.
[0224] Typically an input of a transaction contains a digital signature corresponding to a public key PA. In embodiments this is based on the ECDSA using the elliptic curve secp256kl. A digital signature signs a particular piece of data. In some embodiments, for a given transaction the signature will sign part of the transaction input, and some or all of the transaction outputs. The particular parts of the outputs it signs depends on the SIGHASH flag. The SIGHASH flag is usually a 4-byte code included at the end of a signature to select which outputs are signed (and thus fixed at the time of signing).
[0225] The locking script is sometimes called "scriptPubKey" referring to the fact that it typically comprises the public key of the party to whom the respective transaction is locked. The unlocking script is sometimes called "scriptSig" referring to the fact that it typically supplies the corresponding signature. However, more generally it is not essential in all applications of a blockchain 150 that the condition for a UTXO to be redeemed comprises authenticating a signature. More generally the scripting language could be used to define any one or more conditions. Hence the more general terms "locking script" and "unlocking script" may be preferred.
[0226] 5. FURTHER REMARKS
[0227] Other variants or use cases of the disclosed techniques may become apparent to the person skilled in the art once given the disclosure herein. The scope of the disclosure is not limited by the described embodiments but only by the accompanying claims.
[0228] For instance, some embodiments above have been described in terms of a bitcoin network 106, bitcoin blockchain 150 and bitcoin nodes 104. However it will be appreciated that the bitcoin blockchain is one particular example of a blockchain 150 and the above description may apply generally to any blockchain. That is, the present invention is in by no way limited to the bitcoin blockchain. More generally, any reference above to bitcoin network 106, bitcoin blockchain 150 and bitcoin nodes 104 may be replaced with reference to a blockchain network 106, blockchain 150 and blockchain node 104 respectively. The blockchain, blockchain network and / or blockchain nodes may share some or all of the described properties of the bitcoin blockchain 150, bitcoin network 106 and bitcoin nodes 104 as described above.
[0229] In preferred embodiments of the invention, the blockchain network 106 is the bitcoin network and bitcoin nodes 104 perform at least all of the described functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that only perform one or some but not all of these functions. That is, a network entity may perform the function of propagating and / or storing blocks without creating and publishing blocks (recall that these entities are not considered nodes of the preferred bitcoin network 106). In other embodiments of the invention, the blockchain network 106 may not be the bitcoin network. In these embodiments, it is not excluded that a node may perform at least one or some but not all of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150. For instance, on those other blockchain networks a "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but not store and / or propagate those blocks 151 to other nodes.
[0230] Even more generally, any reference to the term "bitcoin node" 104 above may be replaced with the term "network entity" or "network element", wherein such an entity / element is configured to perform some or all of the roles of creating, publishing, propagating and storing blocks. The functions of such a network entity / element may be implemented in hardware in the same way described above with reference to a blockchain node 104.
[0231] Some embodiments have been described in terms of the blockchain network implementing a proof-of-work consensus mechanism to secure the underlying blockchain. However proof- of-work is just one type of consensus mechanism and in general embodiments may use any type of suitable consensus mechanism such as, for example, proof-of-stake, delegated proof-of-stake, proof-of-capacity, or proof-of-elapsed time. As a particular example, proof- of-stake uses a randomized process to determine which blockchain node 104 is given the opportunity to produce the next block 151. The chosen node is often referred to as a validator. Blockchain nodes can lock up their tokens for a certain time in order to have the chance of becoming a validator. Generally, the node who locks the biggest stake for the longest period of time has the best chance of becoming the next validator.
[0232] It will be appreciated that the above embodiments have been described by way of example only. More generally there may be provided a method, apparatus or program in accordance with any one or more of the following Statements.
[0233] Statement 1. A computer-implemented method for proving processing of a message by a first consumer of a message brokering system, the message brokering system comprising a plurality of message brokers, the first consumer, and a first publisher, wherein the first publisher is in communication with at least one message broker of the plurality of message brokers, wherein the first consumer is in communication with a consumer message broker of the plurality of message brokers, wherein the message is published by the first publisher, wherein a message blockchain transaction is generated by the first publisher, the method comprising: obtaining a consumer signature generated using a private key of the first consumer in response to the first consumer processing the message; providing, in a first unlocking script of a proof blockchain transaction, the consumer signature, a public key of the first consumer, a broker signature generated using a private key of the consumer message broker, and a public key of the consumer message broker, wherein the first unlocking script is configured to unlock a first locking script of the message blockchain transaction; and making the proof blockchain transaction available to one or more nodes of a blockchain.
[0234] Statement 2. The method of statement 1, wherein the message brokering system comprises a plurality of consumers, wherein the plurality of consumers comprises the first consumer, wherein the plurality of consumers are represented by a Merkle tree, wherein each leaf node of the Merkle tree corresponds to a respective one of the plurality of consumers and is derived from a public key of the respective one of the plurality of consumers, wherein the method further comprises: providing, in the first unlocking script of the proof blockchain transaction, a Merkle proof corresponding to the first consumer.
[0235] Statement 3. The method of statementl or statement 2, wherein the method further comprises: obtaining, from the first consumer, a consumer acknowledgment signed using the consumer signature, wherein the consumer acknowledgement confirms that the first consumer has processed the message; and verifying that the consumer acknowledgement is signed using the consumer signature; wherein the consumer signature and public key of the first consumer are provided in the first unlocking script in response to verifying that the consumer acknowledgement is signed using the consumer signature.
[0236] Statement 4. The method of any preceding statement, wherein the method is performed by the consumer message broker. Statement 5. The method of statement 4, wherein the method further comprises: receiving the message blockchain transaction from a publisher message broker, wherein the publisher message broker is in communication with the first publisher; and making the message blockchain transaction available to one or more nodes of a blockchain at a time no later than a time at which the proof blockchain transaction is available to one or more nodes of a blockchain.
[0237] Statement 6. The method of statement 4, wherein the method further comprises: providing a message consumption indication to a publisher message broker, wherein the publisher message broker is in communication with the first publisher; and in response to providing the message consumption indication, receiving from the publisher message broker, the message blockchain transaction or an identifier of the message blockchain transaction.
[0238] Statement 7. The method of statement 6 when dependent on statement 3, wherein the message consumption indication is provided to the publisher message broker in response to verifying that the consumer acknowledgement is signed using the consumer signature.
[0239] Statement 8. A computer-implemented method for generating a message blockchain transaction associated with a message, wherein the message is processed by a first consumer of a message brokering system, the message brokering system comprising a plurality of message brokers, a plurality of consumers, and a first publisher, wherein the first publisher is in communication with at least one message broker of the plurality of message brokers, wherein the first consumer is in communication with a consumer message broker of the plurality of message brokers, wherein the first publisher publishes the message and generates a message blockchain transaction, wherein the plurality of consumers comprises the first consumer, wherein the plurality of consumers are represented by a Merkle tree, wherein each leaf node of the Merkle tree corresponds to a respective one of the plurality of consumers and is derived from a public key of the respective one of the plurality of consumers, the method comprising: generating a first locking script of a message transaction, the first locking script comprising a Merkle root computation script and a target Merkle root corresponding to the Merkle tree, wherein the first locking script is configured, when executed together with a first unlocking script of a proof blockchain transaction, to: compute a candidate Merkle root using a Merkle proof and a consumer public key corresponding to the first consumer provided in the first unlocking script; and verify the candidate Merkle root based on the target Merkle root.
[0240] Statement 9. The method of statement 8, wherein the first locking script further comprises a 1-of-k pay-to-multisignature script.
[0241] Statement 10. The method of statement 8 or statement 9, wherein the method further comprises: generating a second locking script of the message transaction, the second locking script comprising the message, wherein the second locking script is configured, when executed, to output the message to memory.
[0242] Statement 11. The method of statement 10, wherein the message of the second locking script is hashed.
[0243] Statement 12. The method of any of statements 8 to 11, wherein the method is implemented by the first publisher.
[0244] Statement 13. The method of any of statements 8 to 12, wherein the method further comprises: duplicating, by a publisher message broker, wherein the publisher message broker is in communication with the first publisher, the message blockchain transaction and providing a copy of the message blockchain transaction to at least a portion of the plurality of message brokers.
[0245] Statement 14. The method of statements 8 to 12, wherein the method further comprises: receiving, at a publisher message broker, wherein the publisher message broker is in communication with the first publisher, a message consumption indication from a consumer message broker in connection with the first consumer; in response to receiving the message consumption indication: making the message blockchain transaction available to one or more nodes of a blockchain; and providing, to the consumer message broker, the message blockchain transaction or an identifier of the message blockchain transaction. Statement 15. The method of statement 2 or statement 8 or any statement dependent therefrom, wherein the plurality of message brokers comprises a third message broker, wherein the method further comprises: receiving, from the third message broker, a Merkle tree update message comprising a second consumer public key corresponding to a second consumer in communication with the third broker and a connection timestamp indicating a time at which the second consumer connected to the third broker; adding a new leaf node to the Merkle tree, the new leaf node corresponding to the second consumer and being based on the second consumer public key; and computing a first updated target Merkle root.
[0246] Statement 16. The method of statement 15, wherein the plurality of message brokers comprises a fourth message broker connected to a third consumer, wherein the third consumer disconnects from the fourth message broker, wherein the method further comprises: receiving, from the fourth message broker, a second Merkle tree update message comprising a third consumer public key corresponding to the third consumer; removing a leaf node of the Merkle tree corresponding to the third consumer; and computing a second updated target Merkle root.
[0247] Statement 17. The method of any preceding statement, wherein the message brokering system is a federated exchange brokering system.
[0248] Statement 18. The method of any of statements 8 to 17, wherein the method further comprises, at the first publisher: setting a sequence number of the message blockchain transaction to a first value; providing, with the first locking script, a first payment value; providing the message blockchain transaction to a publisher message broker in communication with the first publisher, wherein the plurality of message brokers comprises the publisher message broker; receiving, from one of the message brokers of the plurality of message brokers, a proposed payment value, wherein the proposed payment value is lower than the first payment value; generating a second message blockchain transaction, wherein the second message blockchain transaction comprises: a sequence number with a second value, the second value being larger than the first value; and the first locking script comprising the Merkle root computation script and the target Merkle root corresponding to the Merkle tree, wherein the first locking script is provided with a second payment value equal to the proposed payment value; and providing the second blockchain transaction to the third message broker.
[0249] Statement 19. The method of statement 18, wherein the method further comprises, at the first publisher, providing a message priority level associated with the message.
[0250] Statement 20. Computer equipment comprising: memory comprising one or more memory units; and processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of statements 1 to 19 Statement 21. A computer program embodied on computer-readable storage and configured so as, when run on one or more processors, to perform the method of any of statements 1 to 19.
Claims
CLAIMS1. A computer-implemented method for proving processing of a message by a first consumer of a message brokering system, the message brokering system comprising a plurality of message brokers, the first consumer, and a first publisher, wherein the first publisher is in communication with at least one message broker of the plurality of message brokers, wherein the first consumer is in communication with a consumer message broker of the plurality of message brokers, wherein the message is published by the first publisher, wherein a message blockchain transaction is generated by the first publisher, the method comprising: obtaining a consumer signature generated using a private key of the first consumer in response to the first consumer processing the message; providing, in a first unlocking script of a proof blockchain transaction, the consumer signature, a public key of the first consumer, a broker signature generated using a private key of the consumer message broker, and a public key of the consumer message broker, wherein the first unlocking script is configured to unlock a first locking script of the message blockchain transaction; and making the proof blockchain transaction available to one or more nodes of a blockchain.
2. The method of claim 1, wherein the message brokering system comprises a plurality of consumers, wherein the plurality of consumers comprises the first consumer, wherein the plurality of consumers are represented by a Merkle tree, wherein each leaf node of the Merkle tree corresponds to a respective one of the plurality of consumers and is derived from a public key of the respective one of the plurality of consumers, wherein the method further comprises: providing, in the first unlocking script of the proof blockchain transaction, a Merkle proof corresponding to the first consumer.
3. The method of claim 1 or claim 2, wherein the method further comprises:obtaining, from the first consumer, a consumer acknowledgment signed using the consumer signature, wherein the consumer acknowledgement confirms that the first consumer has processed the message; and verifying that the consumer acknowledgement is signed using the consumer signature; wherein the consumer signature and public key of the first consumer are provided in the first unlocking script in response to verifying that the consumer acknowledgement is signed using the consumer signature.
4. The method of any preceding claim, wherein the method is performed by the consumer message broker.
5. The method of claim 4, wherein the method further comprises: receiving the message blockchain transaction from a publisher message broker, wherein the publisher message broker is in communication with the first publisher; and making the message blockchain transaction available to one or more nodes of a blockchain at a time no later than a time at which the proof blockchain transaction is available to one or more nodes of a blockchain.
6. The method of claim 4, wherein the method further comprises: providing a message consumption indication to a publisher message broker, wherein the publisher message broker is in communication with the first publisher; and in response to providing the message consumption indication, receiving from the publisher message broker, the message blockchain transaction or an identifier of the message blockchain transaction.
7. The method of claim 6 when dependent on claim 3, wherein the message consumption indication is provided to the publisher message broker in response to verifying that the consumer acknowledgement is signed using the consumer signature.
8. A computer-implemented method for generating a message blockchain transaction associated with a message, wherein the message is processed by a first consumer of amessage brokering system, the message brokering system comprising a plurality of message brokers, a plurality of consumers, and a first publisher, wherein the first publisher is in communication with at least one message broker of the plurality of message brokers, wherein the first consumer is in communication with a consumer message broker of the plurality of message brokers, wherein the first publisher publishes the message and generates a message blockchain transaction, wherein the plurality of consumers comprises the first consumer, wherein the plurality of consumers are represented by a Merkle tree, wherein each leaf node of the Merkle tree corresponds to a respective one of the plurality of consumers and is derived from a public key of the respective one of the plurality of consumers, the method comprising: generating a first locking script of a message transaction, the first locking script comprising a Merkle root computation script and a target Merkle root corresponding to the Merkle tree, wherein the first locking script is configured, when executed together with a first unlocking script of a proof blockchain transaction, to: compute a candidate Merkle root using a Merkle proof and a consumer public key corresponding to the first consumer provided in the first unlocking script; and verify the candidate Merkle root based on the target Merkle root.
9. The method of claim 8, wherein the first locking script further comprises a 1-of-k pay-to-multisignature script.
10. The method of claim 8 or claim 9, wherein the method further comprises: generating a second locking script of the message transaction, the second locking script comprising the message, wherein the second locking script is configured, when executed, to output the message to memory.
11. The method of claim 10, wherein the message of the second locking script is hashed.
12. The method of any of claims 8 to 11, wherein the method is implemented by the first publisher.
13. The method of any of claims 8 to 12, wherein the method further comprises: duplicating, by a publisher message broker, wherein the publisher message broker is in communication with the first publisher, the message blockchain transaction and providing a copy of the message blockchain transaction to at least a portion of the plurality of message brokers.
14. The method of claims 8 to 12, wherein the method further comprises: receiving, at a publisher message broker, wherein the publisher message broker is in communication with the first publisher, a message consumption indication from a consumer message broker in connection with the first consumer; in response to receiving the message consumption indication: making the message blockchain transaction available to one or more nodes of a blockchain; and providing, to the consumer message broker, the message blockchain transaction or an identifier of the message blockchain transaction.
15. The method of claim 2 or claim 8 or any claim dependent therefrom, wherein the plurality of message brokers comprises a third message broker, wherein the method further comprises: receiving, from the third message broker, a Merkle tree update message comprising a second consumer public key corresponding to a second consumer in communication with the third broker and a connection timestamp indicating a time at which the second consumer connected to the third broker; adding a new leaf node to the Merkle tree, the new leaf node corresponding to the second consumer and being based on the second consumer public key; and computing a first updated target Merkle root.
16. The method of claim 15, wherein the plurality of message brokers comprises a fourth message broker connected to a third consumer, wherein the third consumer disconnects from the fourth message broker, wherein the method further comprises: receiving, from the fourth message broker, a second Merkle tree update message comprising a third consumer public key corresponding to the third consumer;removing a leaf node of the Merkle tree corresponding to the third consumer; and computing a second updated target Merkle root.
17. The method of any preceding claim, wherein the message brokering system is a federated exchange brokering system.
18. The method of any of claims 8 to 17, wherein the method further comprises, at the first publisher: setting a sequence number of the message blockchain transaction to a first value; providing, with the first locking script, a first payment value; providing the message blockchain transaction to a publisher message broker in communication with the first publisher, wherein the plurality of message brokers comprises the publisher message broker; receiving, from one of the message brokers of the plurality of message brokers, a proposed payment value, wherein the proposed payment value is lower than the first payment value; generating a second message blockchain transaction, wherein the second message blockchain transaction comprises: a sequence number with a second value, the second value being larger than the first value; and the first locking script comprising the Merkle root computation script and the target Merkle root corresponding to the Merkle tree, wherein the first locking script is provided with a second payment value equal to the proposed payment value; and providing the second blockchain transaction to the third message broker.
19. The method of claim 18, wherein the method further comprises, at the first publisher, providing a message priority level associated with the message.
20. Computer equipment comprising: memory comprising one or more memory units; andprocessing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of claims 1 to 1921. A computer program embodied on computer-readable storage and configured so as, when run on one or more processors, to perform the method of any of claims 1 to 19.
Citation Information
Patent Citations
Messaging balancing and control on blockchain
US20190116142A1
System for Distributed Messages Via Smart Contracts
US20210058353A1
