Event Stream Synchronization
The API-based platform allows clients to interact with blockchain services using HTTP protocols, addressing complexity issues and enabling secure, efficient data management and event stream synchronization.
Patent Information
- Application Number
- JP2022549733
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-12-21
- Filing Date
- 2021-02-15
- Publication Date
- 2025-08-28
- Estimated Expiration
- 2041-02-15
AI Technical Summary
Existing blockchain technologies require clients to implement complex software and security measures to access and interact with blockchain-related applications, making them computationally burdensome and user-unfriendly.
A platform processor provides an application programming interface (API) that allows clients to interact with blockchain services using HTTP protocols, eliminating the need for clients to implement blockchain functionality directly, enabling secure and efficient data writing, reading, and event stream management.
Enables clients to seamlessly access and manage blockchain data and events with low computational burden, providing a secure, tamper-proof, and auditable record of transactions and events without requiring advanced blockchain knowledge or implementation.
Smart Images

Figure 0007730825000010 
Figure 0007730825000011 
Figure 0007730825000012
Abstract
Description
[Technical Field]
[0001] The present disclosure relates generally to methods and systems for implementing a platform for one or more services related to a distributed ledger, i.e., blockchain, for one or more clients. In particular, the present disclosure relates to providing access to multiple functions and applications related to blockchain, such as, but not limited to, implementing event streams or machine-readable contracts, for one or more clients. [Background technology]
[0002] In this document, we use the term “blockchain” to include all forms of electronic, computer-based distributed ledgers. These include consensus-based blockchain and transaction chain technologies, permissioned and permissionless ledgers, shared ledgers, public and private blockchains, and variations thereof. The most widely known application of blockchain technology is the Bitcoin ledger, but other blockchain implementations have been proposed and developed. While Bitcoin may be referenced herein for convenience and illustrative purposes, it should be noted that this disclosure is not limited to use with the Bitcoin blockchain, and alternative blockchain implementations and protocols related to any type of digital asset or representation of a digital asset fall within the scope of this disclosure. The terms “client,” “entity,” “node,” “user,” “sender,” “receiver,” “payer,” and “payee” may refer to computing or processor-based resources herein. The term “Bitcoin” is used herein to include any version or variation derived from or based on the Bitcoin protocol. The term “digital asset” may refer to any transferable asset, such as a cryptocurrency, a token representing at least a portion of property, a smart contract, a license, i.e., a software license, or a DRM contract for media content. It is understood that the term "digital asset" is used throughout this document to describe a commodity that may be associated with value that can be transferred or provided as payment in a transaction from one entity to another.
[0003] A blockchain is a computer-based, decentralized, peer-to-peer electronic ledger implemented as a distributed system made up of blocks, each of which is made up of transactions. Each transaction is a data structure that encodes the transfer of control of a digital asset between participants in the blockchain system and contains at least one input and at least one output. Each block contains a hash of the previous block so that blocks are chained together to create a permanent, immutable record of all transactions written to the blockchain since the blockchain's inception. Transactions contain small programs, known as scripts, embedded in their inputs and outputs that specify how and to whom the transaction's outputs can be accessed. In the Bitcoin platform, these scripts are written using a stack-based scripting language.
[0004] In order for a transaction to be written to the blockchain, it must be "validated." Network nodes (miners) perform work to ensure each transaction is valid; invalid transactions are rejected from the network. A software client installed on a node performs this validation work on an unspent transaction (UTXO) by executing its lock and unlock scripts. If the execution of the lock and unlock scripts evaluates to true, the transaction is valid and the transaction is then written to the blockchain. Thus, for a transaction to be written to the blockchain, it must i) be verified by the first node that receives the transaction; if the transaction is verified, the node relays it to other nodes in the network; ii) be added to a new block constructed by miners; and iii) be mined, or added, to the public ledger of past transactions.
[0005] It will be appreciated that the nature of the work performed by miners depends on the type of consensus mechanism used to maintain the blockchain. While proof of work (PoW) is associated with the original Bitcoin protocol, other mechanisms, such as proof of stake (PoS), delegated proof of stake (DPoS), proof of capacity (PoC), proof of elapsed time (PoET), and proof of authority (PoA), are also used. Different consensus mechanisms differ in how mining is distributed among nodes, and the probability of successfully mining a block depends, for example, on the miner's hashing power (PoW), the amount of cryptocurrency held by the miner (PoS), the amount of cryptocurrency staked in delegated mining (DPoS), the miner's ability to memorize a predetermined solution to a cryptographic puzzle (PoS), a waiting time randomly assigned to the miner (PoET), etc. Typically, miners are provided with an incentive or reward for mining blocks. A Bitcoin block, for example, rewards miners with newly minted cryptocurrency (Bitcoins) and fees associated with transactions in the block (transaction fees). In the case of the Bitcoin blockchain, the amount of cryptocurrency mined decreases over time, and incentives ultimately consist solely of transaction fees. It will be appreciated, therefore, that processing transaction fees is part of the underlying mechanism for committing data to a public blockchain, such as the Bitcoin blockchain.
[0006] As previously mentioned, each transaction in a given block encodes the transfer of control of a digital asset between participants in the blockchain system. Digital assets do not necessarily correspond to cryptocurrency. For example, digital assets may relate to digital representations of documents, images, physical objects, etc. Payment of cryptocurrency and / or transaction fees to miners may simply act as an incentive for maintaining the validity of the blockchain by performing necessary work. The cryptocurrency associated with the blockchain may act as security for miners, and the blockchain itself may be primarily a ledger for transactions related to digital assets other than cryptocurrency. In some cases, transfers of cryptocurrency between participants may be handled by entities different and / or independent from the entities that use the blockchain to maintain the ledger of transactions.
[0007] Once stored on the blockchain as a UTXO, a user can transfer control of the associated resource to another address associated with an input in another transaction. This transfer is typically, though not inherently, accomplished using a digital wallet. This digital wallet can be a device, physical media, a program, an application (app) on a computing device such as a desktop, laptop, or mobile terminal, or a remotely hosted service associated with a domain on a network such as the Internet. Digital wallets can be used to store public and private keys, track ownership of resources such as tokens and assets associated with a user, receive or consume digital assets, and transfer tokens, which may be related to digital assets such as cryptocurrency, licenses, property, or other types of resources.
[0008] While blockchain technology is most widely known for its use in implementing cryptocurrencies, digital entrepreneurs are exploring the use of both the cryptographic security system on which Bitcoin is based and the data that can be stored on the blockchain to implement new systems. It would be highly advantageous if blockchain could be used for automated tasks and processes that are not limited to the cryptocurrency realm. Such solutions would be more general in application while still being able to take advantage of the benefits of blockchain (e.g., permanent, tamper-proof recording of events, distributed processing, etc.).
[0009] One area of current research is the use of blockchains for the implementation of "smart contracts." These are computer programs designed to automate the execution of machine-readable agreements or terms of agreements. Unlike traditional contracts, which are written in natural language, smart contracts are machine-executable programs with rules; these rules can process inputs to generate results and then cause actions to be taken in response to those results. Another area of blockchain-related interest is the use of "tokens" (or "colored coins") to represent and transfer real-world entities via blockchains. Potentially sensitive or secret items can be represented by tokens that have no discernible meaning or value. Tokens therefore function as identifiers that allow real-world items to be referenced from the blockchain.
[0010] The above example or scenario, while utilizing the benefits of blockchain to provide a permanent, tamper-proof record of events, requires the client, client entity, computing device, or terminal associated with the client to include or implement software and / or hardware or processors / modules, such as a digital wallet for implementing functionality for managing digital assets, managing cryptographic keys for the Elliptic Curve Digital Signature Algorithm (ECDSA) used by the BSV (Bitcoin Satoshi's Vision) blockchain. In addition, there is a need for the client device to implement blockchain transaction mechanisms and be able to access BSV libraries. Thus, the client not only needs to include processing for implementing such functionality, but also needs to ensure that appropriate security measures are in place for such processes before it can utilize the blockchain network to send, receive, and view data and / or digital assets associated with smart contracts or tokens representing real-world asset transactions. [Prior art documents] [Patent documents]
[0011] [Patent Document 1] U.S. Patent Application No. 16 / 384696 [Patent Document 2] UK Patent Application No. 1907180.2 Summary of the Invention [Problem to be solved by the invention]
[0012] It is therefore desirable to implement secure, low-complexity, user-friendly, efficient, and robust techniques that enable any client, whether computationally advanced or not, to instantly access and interact with useful blockchain-related applications in a simple, fast, accurate, reliable, and secure manner that is computationally and functionally low burden. More specifically, it is desirable to utilize the benefits of distributed ledger (blockchain) technology and its increased security, transparency, and reliability of records to provide a common platform or interface for multiple blockchain-related services or applications that enables any client computing device to ensure that any data, event, or digital asset associated with the client can be easily mined or written to the blockchain instantly and securely, thereby providing a permanent, tamper-proof, and auditable record thereof that can be created, written, updated, read, or viewed as needed. [Means for solving the problem]
[0013] Such an improved solution has now been devised. The present disclosure addresses the above technical concerns by proposing one or more techniques whereby data or information related to a client may be easily, securely, and instantly written to and retrieved from a blockchain by methods, devices, and systems that provide an application programming interface (API) for one or more services related to the blockchain without the need for such clients to implement processes or functionality for using the blockchain, while still being able to utilize all of the benefits associated with the blockchain.
[0014] In a first aspect, the present disclosure proposes a method, device, and system for implementing a platform that provides multiple blockchain-related services using a platform processor associated with an application programming interface (API) that can receive client requirements in a Hypertext Transfer Protocol (HTTP) transmission protocol format for the services. In addition to appropriate validation of the client's identity and / or request, a request, destination address, or endpoint for the requested blockchain service is determined, and at least one blockchain transaction is generated based on the destination address to obtain an output script. Results based on the output script are then sent to the given client in an HTTP transmission protocol format.
[0015] In a second aspect, the present disclosure proposes a method, device, and system for implementing a data writing service for a transaction related to a blockchain for a client based on an HTTP request from the client, and relating to an event stream ES implemented using a blockchain, where the event stream may be used to represent or track a finite state machine (FSM). For example, the FSM may be a smart contract. Event Stream ES in Blockchain n The current state of is determined and a new or next event E is generated for the event stream E. n+1 is identified in the received request, and the inputs related to the transaction outputs from the previous transaction TX on the event stream ES and the new event E n+1 When submitted to the blockchain, the current state of the event stream in the blockchain is updated with the new event E. n+1 Based on ESn+1 is updated to be so. The current state ES n+1 The result, which is a result related to, is provided in the HTTP transmission protocol format.
[0016] In a third aspect, the present disclosure provides, creates, updates, and / or terminates an event stream implemented using a blockchain, and proposes a method, device, and system for creating an anti-tampering log or record of events related to the event chain. An event E related to the event stream ES n is identified in the received request and represents the current length of the event stream ES. E n When n = 0, a blockchain transaction including an unconsumed output that is a dust output is created so that E is the first event that creates the event stream ES. n When 0 < n ≦ N and N is the final or maximum value for n, and E is an event that modifies the event stream ES, the first input that consumes the dust output related to the previous transaction related to the event stream, the unconsumed transaction output that is the dust output related to the current transaction, and the unconsumed transaction output associated with the event data representing the current event E n A blockchain transaction including is created. nIf n=N, such that n is an event that terminates the event stream ES, a blockchain transaction is created that includes a first input that consumes dust output associated with a previous transaction for the event stream and an unconsumed transaction output associated with a digital asset that exceeds the defined dust output limit. Once the created transaction is accepted and / or submitted to the blockchain, results associated with the transaction are provided in HTTP transmission protocol format. In some embodiments, one or more transactions in the event stream are accepted or are valid transactions for a given event stream but are not immediately submitted to the blockchain. For example, transactions in the event stream are submitted to a block after a given number or transactions or time has passed, i.e., after 25 or so transactions in the event stream have occurred. Transactions may be held in a mempool until a number or time has passed. In other embodiments, transactions in the event stream can be immediately submitted to the blockchain.
[0017] In a fourth aspect, the present disclosure proposes methods, devices, and systems for synchronizing multiple event streams associated with blockchains using atomic blockchain transactions.
[0018] Throughout this specification, the word "comprises" or variations such as "include," "comprises," or "comprising" will be understood to imply the inclusion of a stated element, integer, step, or group of elements, integers, or steps, but not the exclusion of any other element, integer, step, or group of elements, integers, or steps.
[0019] Aspects and embodiments of the present disclosure will now be described, by way of example only, with reference to the accompanying drawings, in which: [Brief explanation of the drawings]
[0020] [Figure 1] FIG. 1 is a schematic diagram illustrating an overview of a platform for multiple blockchain-related services according to a first embodiment. [Figure 2a] 1 is a flowchart illustrating a method for providing a platform of multiple blockchain-related services according to a first aspect, implemented by one or more processors associated with the platform. [Figure 2b] 1 is a flowchart illustrating a method for accessing a platform of multiple blockchain-related services according to a first aspect, implemented by one or more processors associated with a client. [Figure 3] FIG. 1 is a schematic diagram illustrating components of a platform for multiple blockchain-related services according to a first embodiment. [Figure 4] 10 is a flowchart illustrating a method for implementing a data writing service for transactions related to a blockchain according to a second aspect, implemented by one or more processors associated with a platform service. [Figure 5] 10 is a flowchart illustrating a method for creating an event stream associated with a blockchain according to a third aspect, implemented by one or more processors associated with a platform service. [Figure 6] 10 is a flowchart illustrating a method for updating an event stream associated with a blockchain according to a third aspect, implemented by one or more processors associated with a platform service. [Figure 7] 10 is a flowchart illustrating a method for terminating an event stream associated with a blockchain according to a third aspect, implemented by one or more processors associated with a platform service. [Figure 8]10 is a flowchart illustrating a method for accessing a data writing service for a transaction related to a blockchain according to the second or third aspect, implemented by one or more processors associated with a client. [Figure 9] 10 is a flowchart illustrating a method according to an embodiment for synchronizing multiple event streams according to a fourth aspect, implemented by one or more processors associated with a platform service. [Figure 9a] 10 is a flowchart illustrating another embodiment for synchronizing multiple event streams according to a fourth aspect, implemented by one or more processors associated with a platform service. [Figure 10] 10 is a flowchart illustrating a method for accessing a data writing service for synchronizing event streams associated with blockchains according to a fourth aspect, implemented by one or more processors associated with a client. [Figure 11] FIG. 10 is a basic schematic diagram of an atomic blockchain transaction for two event streams according to a fourth embodiment. [Figure 12] Schematic diagram of the use of atomic blockchain transactions to synchronize three event streams and then further process each event stream separately. [Figure 13] FIG. 1 is a schematic diagram illustrating a computing environment in which various aspects and embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION OF THE INVENTION
[0021] Although the appended claims relate to a fourth aspect of the present disclosure, which is described in detail below, detailed discussion of the first, second, and third aspects is provided herein to provide the reader with a full and complete understanding of the claimed aspects and related embodiments of the present disclosure.
[0022] According to a first aspect, the present disclosure provides a computer-implemented method for providing a platform of multiple blockchain-related services, the platform being provided to a plurality of clients, the method being implemented by a platform processor associated with an application programming interface (API).
[0023] Advantageously, the platform processor API is a web-based interactive interface, i.e., in some embodiments, it may be implemented as a web service for one or more clients so that communication may occur over the Internet using standard Internet communication protocols for web-based services. For example, in some embodiments, this allows HTTP messages or requests at the application level or layer between the client and the server (in this case, the platform service), such as HTTP, HTTPS, etc., to be sent and received based on a transport layer protocol, such as TCP / IP. Reference herein to the HTTP transport protocol or HTTP API also encompasses all standard Internet communication protocols, such as TCP / IP, UDP, HTTPS, etc.
[0024] In some embodiments, the platform processor is implemented as an HTTP API endpoint. In some embodiments, the platform processor is implemented as a Representational State Transfer (REST) endpoint. Advantageously, the API may be implemented as a REST endpoint, thereby allowing clients to communicate using standard internet or web-based protocols such as HTTP or HTTPS.
[0025] The method of the first aspect includes receiving a request from a given client of a plurality of clients, the request from the given client relating to a given service of a plurality of services based on a HyperText Transfer Protocol (HTTP) transmission protocol format. Then, based on an identification of the client and / or a determination that the request is valid, the method includes obtaining a destination address associated with the given service. In some embodiments, the destination address may be an IP address or a network address endpoint. For example, it may be a universal resource identifier (URI) of an endpoint and may include a universal resource location (URL) of a web server from which the requested service may be accessed by a payment processor or one or more other entities (including the client) for the requested service.
[0026] In some embodiments, the destination address may be the same endpoint as the platform API endpoint. This may be the case when the platform provides such requested service as a main or core service. In other embodiments, when there are multiple different types of services provided by the platform, each implemented by a different processor or web server, the destination address may be different from the platform API, which may act as a host server for other processors and web servers associated with the platform. In this case, the platform processor comprises or is associated with multiple processors, each configured to implement a given service of the multiple services in the blockchain, and each associated with a particular destination address or endpoint unique to the respective processor.
[0027] The method of the first aspect further includes processing a request for a given service based on at least one blockchain transaction corresponding to the obtained destination address to obtain an output script. In some embodiments, the output script is associated with data related to the requested service, or a result of the requested service is included in a UTXO, including such data or digital assets related to the transaction. In the first aspect, this result associated with the output script is then transmitted to the given (requesting) client in HTTP or a similar transmission protocol format.
[0028] Advantageously, the method of the first aspect of the present disclosure implements a platform provided as an API for one or more clients, thereby enabling one or more processors associated with the clients to sign up for or use web services provided by the platform processor to write or access data to the blockchain. The one or more processors associated with the platform can implement one or more of the provided services using a standards-based interface design, such as, but not limited to, REST (Representational State Transfer), an architectural style for developing web services and web-based interactions. A resource, in the context of a REST API, can be defined as an object having a type, associated data, relationships to other resources, and a set of methods to operate on it. Thus, the platform or service implemented by the platform processor of the first aspect is advantageously provided as an API implementation to access (the state of) a blockchain or distributed ledger, such as the Bitcoin SV (BSV) blockchain, and trigger operations or functions that can modify that state and expose it as a REST API via an application interface. In other words, one or more servers or processors associated with the platform can be considered REST endpoints for one or more clients that choose to use such services. Thus, advantageously, clients can communicate with platform services via HTTP or similar internet commands, and more advantageously, no knowledge of BSV, Bitcoin, blockchain, ECDSA, or other cryptographic key management libraries, or transaction building software such as digital wallet software, is required to be implemented by clients for any of the services provided.A client using one or more processing resources or user terminals can simply register to use the platform via some known authentication technique, such as password-protected authentication or a standard public key infrastructure (PKI) to verify the client's identity. The client should then simply be able to communicate with the platform services via basic HTTP or the like.
[0029] In some embodiments, some examples of blockchain-related services that may be provided via the platform include: A data service for writing / submitting data to the blockchain to change the state of the blockchain, A data service to read / get data that reflects the current state of the blockchain, Services relating to simplified payment verification for blockchain-related transactions; Services related to the management of one or more event streams and / or machine-readable contracts related to a blockchain; Services relating to the management of a digital wallet framework for multiple clients is.
[0030] In embodiments where there are multiple processors or web services associated with the platform processor of the first aspect, the method of the first aspect further includes providing an application programming interface (API) converter for receiving a request from a client in HTTP transport protocol format, converting the received request to a remote procedure call (RPC), and sending the RPC request to a given processor of the multiple processors configured to implement the service identified in the received request. In the reverse flow path, this embodiment includes receiving an associated response from the given processor in RPC format and converting each response to be sent to the client using HTTP or a similar transport protocol.
[0031] This is advantageous because it allows clients to communicate blockchain-related requests via simple HTTP, using a web-based platform API and providing seamless interoperability with any of the nodes or services that implement the services described above but do not communicate using the Internet Protocol communication standard for web services. The API converter implemented in this embodiment is not limited to converting from HTTP to RPC and vice versa, or for that matter, from other web service protocols to alternative communication protocols supported by the platform processor implementing one or more of the above services, the network for a given cryptocurrency, or other possible digital asset. In the reverse flow path, the method of the first aspect also includes receiving responses related to corresponding blockchain transactions from each processor in RPC format and correspondingly converting each response using HTTP for transmission to the client. Thus, advantageous implementation of the proposed interface by the platform processor enables seamless communication for submitting transactions to the blockchain when the client (payer) and the miner use different wireless data communication protocols and mechanisms.
[0032] In some embodiments of the first aspect, the request received from the client is an HTTP GET, HTTP POST, HTTP PUT, or HTTP PATCH request that includes or is associated with a client identifier unique to the given client and a service identifier for the requested given service of the multiple services provided by the platform, as described above. In some embodiments, the result sent to the client is an HTTP POST request based on the client identifier.
[0033] In some embodiments, mechanisms already exist in which memorable, more user-friendly aliases are used instead of complex public addresses for one or more client entities to simplify client addressing for blockchain transactions. Such solutions are proposed in U.S. Patent Application No. 16 / 384696 and UK Patent Application No. 1907180.2, both in the name of nChain Holdings Limited. These documents present an alias-based payment service and associated protocol, called the bsvalias payment service, in which aliases are used to specify destination addresses instead of the client entity's public addresses. Aliases in such systems are typically associated with the domain name of the sending / receiving client entity and may be a URI or email address. Thus, as long as the sender or entity is aware of or has been provided with the alias, this is sufficient for the bsvalias payment system or alias-based addressing mechanism. Messages can be sent to a client's alias using instructions provided in a machine-readable resource, such as a JavaScript Object Notation (JSON) document, stored at a better-known URI or location for bsvalias or other payment services. In some embodiments of the present disclosure, one or more of the multiple clients may have an alias as described above to identify the respective client.
[0034] In a related embodiment, the method of the first aspect includes validating the client based on a client identifier and a record associated with the platform processor, the record corresponding to the client identifier. For example, such a record may be created, stored, or associated with the platform processor upon client sign-up or registration. Then, based on successful validation of the client, determining whether a received request from the client is valid based on the service identifier and attributes or settings included in the respective record. In some embodiments, the attributes or settings may indicate whether a given client is authorized to access all or part of the requested service. For example, one or more levels of permission associated with the client identifier may be provided in the attributes or settings. For example, a given client may be authorized to request a service that reads data on a blockchain related to a particular event, but may not be authorized to modify, delete, or terminate such event, whereas another client may have permission for all actions related to one or more services.
[0035] In some embodiments, verifying the identity of a given client may be based on a digital signature associated with the client. A cryptographic key pair comprising a private key and a public solution (or public address) associated with each client may be used to verify that a request made to a service truly originates from the given client, i.e., that data signed by a private key can only be recovered or verified using the corresponding public solution. When verification is based on a digital signature, standard public key infrastructure (PKI) techniques may be used and implemented.
[0036] In some embodiments of the first aspect, a computer-implemented method for accessing a platform of multiple services, implemented by one or more processors of a given client of the multiple clients, includes obtaining or identifying an application programming interface (API) endpoint associated with one or more processors associated with the platform; and transmitting a request related to a given service of the multiple services, the request including or associated with a client identifier for the given client and a service identifier for the requested given service. As described above, the request is transmitted using Hypertext Transfer Protocol (HTTP) or a similar transport protocol format. The method also includes a result related to an output script of a blockchain transaction associated with the request, the result being provided to the client in HTTP transport protocol format.
[0037] In a second aspect, the present disclosure provides a computer-implemented method for implementing a data writing service, the method being implemented by a platform associated with an application programming interface (API) to allow a client to access the service for writing data to a blockchain. The method of the second aspect includes receiving a request from a client, the request relating to an event stream ES implemented using a blockchain, the request from the client being based on a Hypertext Transfer Protocol (HTTP) transmission protocol format. In some embodiments, the event stream may be tracked or represented as a finite state machine (FSM), such as a deterministic finite automaton (DFA), a well-known computing term that describes a system that uses transition functions or trigger events to transition from one stage to the next, has a finite number of states, and can be in only one state at a given time. In some embodiments, such an event stream is useful for representing control measures or techniques for technological processes. In some embodiments, the event stream may represent or track inputs, states, and / or events associated with a machine-readable contract or smart contract on a blockchain, advantageously recording an immutable record of the contract's past and current states. In some embodiments, the received request from the client includes a trigger event to enable a state transition to occur in a smart contract associated with the event stream.
[0038] The method of the second aspect is to generate an event stream ES i=nThe method includes determining a current state of the event stream ES, where i is an integer from 0 to N, and each integer i represents a given state of the event stream ES, whereby i=0 represents the created event stream ES, i=n represents the event stream ES in its current state in the blockchain, and i=N represents the final state of the event stream ES. In some embodiments, determining the current state may be an index of the current state based on the most recent results associated with the event stream, the results being stored on the blockchain or in one or more separate off-chain storage resources for the event stream. This may be based on an identifier of a previous or prior blockchain transaction associated with the event stream. If there is no previous state identified for the event stream, this results in a determination that the current state is n=0, i.e., a new event stream should be created. In some embodiments, the current state may also be obtained or read from the blockchain. This may be performed by a data reader as described above, which may be a service among multiple services provided by the platform processor.
[0039] In the method of the second aspect, a new event E is generated for the event stream ES based on the received request. n+1 The step of processing the blockchain transaction TX n+1 creating a blockchain transaction TX n+1 is the previous transaction TX n Transaction Output (TXO) from n ) and unspent outputs (UTXOs) n+1 ) is a new event E n In some embodiments, when n=0, there is no input that consumes the previous output. However, there may be other inputs that represent digital assets associated with the event stream ES. The method then n+1and submitting the result to the blockchain.
[0040] Once submitted, the current state of the event stream is updated based on the submitted blockchain transaction, i.e., the state is updated based on the ES i=n =ES n+1 As in, the newly created event E n+1 Based on ES i=n+1 In some embodiments, the updated state is the unspent output of the latest transaction in the event stream, the UTXO n+1 The method then includes sending a result based on the updated current state of the event stream ESn+1, the result being provided based on an HTTP transfer protocol format.
[0041] A second aspect of the present disclosure discusses an implementation of a data writing service implemented by a platform processor, which enables the ability to write data related to real-world processes, such as controlling the state of a smart contract. The platform processor of the second aspect is related to that discussed in the first aspect, and the second aspect discusses one of multiple blockchain services, namely, a service for writing data to a blockchain to change the current state of the blockchain. Because requests and responses are received using an API for the platform, the second aspect provides all of the advantages associated with the first aspect. Additionally, the data writing service advantageously enables one or more clients to transact the state of a blockchain-implemented smart contract simply by extracting triggers or events from effects. Thus, an immutable record of the various stages of a smart contract can be provided by the data writing service of the second aspect.
[0042] A third aspect of the present disclosure relates to the data writing service of the second aspect, as discussed above with respect to services provided in connection with event streams. In this aspect, or techniques for establishing a tamper-proof record or log or certificate verifying the sequential occurrence of events associated with an event stream. Accordingly, in a third aspect, the method of the present disclosure proposes methods, devices, and systems for providing, creating, updating, and terminating event streams that are implemented using blockchain and automatically create a tamper-proof log or record of events associated with an event chain.
[0043] In a third aspect, the present disclosure provides a computer-implemented method for implementing a data writing service for transactions related to a blockchain, the method being implemented by a platform processor associated with an application programming interface (API) to enable a client to access the service to write data to the blockchain. The method of the third aspect includes receiving a request from the client, the request being related to an event stream ES on the blockchain, the request from the client being based on a Hypertext Transfer Protocol (HTTP) transmission protocol format.
[0044] Then, in the received request from the client, an event E n For an event stream ES, n represents the current length of the event stream ES. E nIf n = 0 such that it is the first event to create the event stream ES, for the event stream ES, a first blockchain transaction is created that includes a first unconsumed output that is a dust output. A blockchain transaction dust, or simply "dust", in the context of a blockchain transaction according to the present disclosure is understood to be a consumable transaction for a digital asset or cryptocurrency having an output of a low or very small value, i.e., the value may be much less than the fee for mining the output in the blockchain. This dust output may be the minimum value of a consumable cryptocurrency or digital asset output. In some embodiments, the funds of the digital asset or cryptocurrency associated with such a dust transaction, i.e., one that processes the transfer of the minimum value of the digital asset in its output, may be provided or managed by the platform processor. In other words, the dust output referred to in the present disclosure for a blockchain transaction is associated with a digital asset having a value below the value limit for the transaction, i.e., perhaps the value of the dust output is lower than the mining fee that may be required to consume such a transaction.
[0045] E n If 0 < n < N such that it is the event to modify the event stream ES and N is the final or maximum value for n, a first input that consumes the dust output associated with the previous transaction for the same event stream, a first unconsumed transaction output that is the dust output for the current transaction, and the current event E n represented by the final unconsumed transaction output associated with the event data, a current blockchain transaction is created. In some embodiments, the event data is included within a data carrier element. This may be a non-consumable OP-RETURN output of the transaction. In some embodiments, the event E in the final unconsumed transaction output for the current blockchain transactionn The event data for includes a hash of the event data, which advantageously keeps the event data contents of the event stream ES private. In some embodiments, it may also include a salt, which is a unique value that may be randomly generated by a platform processor for each transaction associated with the event stream. In some embodiments, the hash of the event data is applied by a platform processor, thereby advantageously allowing a platform service or processor to keep such event data private. In other embodiments, the hash of the event data is applied by a client device before being included in a request received by the platform processor. This advantageously allows a client to keep the events or data related to the events in a request private without sharing it with the platform. In other embodiments, the event data for the event E in the final unconsumed transaction output may also be included. n Event data relating to includes raw event data that is published on the blockchain once written or submitted to the blockchain.
[0046] E nIf n=N, a blockchain transaction is created that includes a first input that consumes a dust output associated with a previous transaction in the event stream, and a first unconsumed transaction output associated with a digital asset that exceeds a defined dust output limit, i.e., exceeds a defined or minimum value of the digital asset or cryptocurrency, such that n=N is an event that terminates the event stream ES. Advantageously, the absence of dust outputs signifies the end of the event stream, since it represents that there is nothing to track in the event stream, i.e., no more events in the sequence. The provision that the first output exceeds the dust limit signals the end of the chain. Furthermore, the final blockchain transaction does not have any event data outputs, i.e., there is no data carrier element, which advantageously signals that this is a data event that terminates the event stream, rather than an event stream that modifies it.
[0047] In any of the three cases for n discussed above, the transaction is submitted to the blockchain and the results associated with the transaction are provided based on the HTTP transfer protocol format. In some embodiments, the events associated with the request, i.e., E0, E n , or E N Each of the events can be a single event associated with the respective request, or two or more events. For example, a request can have E0, E n , or E NEach transaction may contain two or more sub-event data sets. In some embodiments, the results are based on the transaction's event data output or the events associated with the respective transaction. In some embodiments, any returned results or event data may be held in the transaction's non-consumable OP_RETURN output, which is a scripting opcode that can be used to write arbitrary data to the blockchain and also mark the transaction output as invalid. As another example, OP_RETURN is a scripting language opcode for creating a transaction's non-consumable output that can store data and / or metadata within the transaction, thereby immutably recording the metadata in the blockchain. The metadata may include logs or time entries or documents desired to be stored in the blockchain. The event data or results may, in some embodiments, be considered a payload included in the respective transaction's non-consumable output. Such output may be made non-consumable, for example, by an opcode that terminates the output's locking script, such as OP_RETURN described above. However, in other embodiments, the payload or event data may be included in other ways.
[0048] The use of dust outputs in transactions is advantageous and important for maintaining an immutable, continuous record of all transactions that occurred for an event stream. This is because, although all blockchain transactions are time-stamped and order is maintained in the blockchain by posting the transactions to the blockchain, this does not guarantee the preservation of their order. This is because transactions may be mined into blocks at different times. Thus, in a blockchain, only the order of blocks in the chain follows chronological order, not individual transactions. On the other hand, to track, record, and audit the exact order of events for an event stream, which may be a smart contract, the use of dust outputs, which must be consumed by the first input of the next transaction in the sequence, advantageously ensures that the order of transactions is tracked chronologically and a tamper-proof record is created. This is because, once mined into a block, dust payments from the previous transaction to the next transaction in the sequence, consistent with Bitcoin protocol rules, cannot reorder the sequence of embedded data carrier elements (which are the final output in each transaction) and ensure that no insertions or deletions can occur that would change the sequence without immediately revealing that the event stream has been compromised. In some embodiments, Bitcoin's inherent double-spend prevention ensures that the movement of cryptocurrency (e.g., dust) between different addresses, and therefore the associated events, remain in chronological order, thus improving the security of smart contracts on the blockchain, as well as the logging, copying, or duplication of the sequence of event occurrences.
[0049] In some embodiments, a hierarchical deterministic key chain K is determined to be used for requests related to the event stream ES. Such a key chain is unique to a given event stream. Then, K=K n=0From a seed or parent, or master key pair K, a cryptographic private / public key pair may be derived for each associated event, such that n is an integer between 0 and N, each integer n representing the current length or current number of events associated with the event stream ES, and N is the maximum or final value of n. This advantageously ensures that the keys derived for a particular event stream are related to a common master or seed key and may be derived to process each respective event. In this way, advantageously, a lock script associated with the dust output may use the derived key K for the current event. n and the first input is protected using the previous key pair K n-1 This ensures that outputs can only be consumed using the corresponding key pair unique to each previous transaction.
[0050] In some embodiments, the results associated with the event stream ES include: Event E n The transaction identifier that was submitted to the blockchain Merkle inclusion proof of a transaction into a header in the blockchain A copy of the block header containing the transaction The certificate includes a certificate verifying at least one of the following:
[0051] In some embodiments, each of the created transactions may further include other inputs related to digital assets, as discussed above with respect to the third aspect. This may be provided based on an operational float managed by the platform processor. In some embodiments, this may be associated with digital assets, or cryptocurrency resources or funds maintained or managed by the payment processor to cover mining fees for the transaction and one or more other operations for the blockchain, etc. The transaction may also have one or more change outputs related to the digital assets. As described above, the final transaction has all change outputs.
[0052] In some embodiments, the event stream ES may be identified based on a transaction identifier associated with a submitted blockchain transaction. In some embodiments, the event stream ES may also be identified based on a transaction identifier associated with the most recently submitted blockchain transaction.
[0053] In some embodiments, the method includes storing a copy or log of outcome-based records for each event in the event stream ES in an off-chain storage resource. This storage resource may be associated with the platform processor or in a different device, database, or service that can be requested or retrieved from it when requested by a client. Advantageously, the storage of the log associated with the outcome of the event stream is stored separately to avoid the need to download the entire blockchain and sift through the data for any query related to the event stream. The blockchain implementing the event stream itself can be checked in situations during audits or data validation. A backup or another copy can then be used for quick queries.
[0054] In a fourth aspect, the present disclosure provides a computer-implemented method for synchronizing multiple event streams associated with a blockchain, the method being implemented by a platform processor associated with an application programming interface (API). The method of the fourth aspect relates to a method for appending or modifying a single event stream, as described above in the third aspect. However, the fourth aspect relates to a technique for synchronizing multiple separate, independently progressing events based on a single or common event using a single blockchain transaction, called an atomic or rendezvous transaction, across multiple event streams. This API for a platform service for implementing the fourth aspect may be the same API as mentioned above with respect to the third aspect, or may be a separate, specific API associated with the platform processor for synchronizing event streams.
[0055] The method of the fourth aspect includes receiving a request from a client, the request relating to a plurality of M event streams on a blockchain. In some embodiments, the request from the client is based on a HyperText Transfer Protocol (HTTP) transmission protocol format. The request from the client is based on a plurality of existing event streams ES associated with the blockchain. n=1 to M where n is an integer from 1 to M, and M≧2. The method includes updating a plurality of M event streams ES n=1 to M Each event stream ES n The current event E to be added to n Also includes the step of obtaining.
[0056] As noted above, a client may be a processor, a computing resource, a software application or program, or another entity that has access to the event stream or is authorized to access resources tracked by the event stream. In some embodiments, for a synchronization request according to the fourth aspect, multiple M participating event streams ES n=1 to M A smart contract acting as an agent or coordinator on behalf of a client may also be considered a client making a synchronization request.
[0057] Client requests are sent to multiple event streams n=1 to M The M event streams may be received at the API as a JSON object containing an identifier for each of the M event streams, i.e., the M event streams are included in a JSON object representing the request. In most cases, the identifiers are received from the client as part of the request. In some cases, the API may obtain multiple M event stream identifiers from an account or record associated with the client.
[0058] In some embodiments, the request from the client is to n , which is the target index for each event stream ES that should be used for the synchronization request. n , i.e., the target index is the index of the current event E n represents the next available position in a given event stream where an event should be added.
[0059] In some embodiments, the target index is n The sequence number of the event stream to be used for synchronous requests corresponds to the sequence number of the nIdentifies a point in the event stream. In most cases, the target index is received from the client as part of the request. In some cases, the API n From or Event Stream ES n The respective indexes may be obtained automatically or directly from the external log associated with the database.
[0060] In some embodiments, similar to the third aspect, the event stream ES n A hierarchical deterministic key chain is determined for each event stream ES. n=1 to M , which are specific to a given event stream.
[0061] In some embodiments, a validation check, as also described above for the third aspect, is performed on each event stream ES based on its respective key chain K or public key. n In some embodiments, the method is performed on a plurality of event streams ES n=1 to M Each event stream ES n The next available index value for each event stream ES specified in the request. n In some embodiments, the plurality of M event streams ES may also include a verification step of checking whether the target index for the plurality of M event streams ES is the same as the target index for the plurality of M event streams ES. n=1 to M It is possible that a subset of event streams in have the specified target index value and other event streams do not, in which case for the subset only the target index is checked and for the other event streams any next available index is used without fail.
[0062] For example, consider two accounts X and Y, in which funds are subtracted from one account X and added to the other, Y, i.e., transferred from X to Y. This embodiment can be used to implement a logical clock to synchronize both accounts so that it may be possible to verify the state of each of the accounts involved in the transfer. For account X being subtracted, when a subtraction event from X is added to the event streams associated with both X and Y, a next available transaction index for X is provided or recorded. This next available transaction index for X, in order for it to be true or valid, should not change until the transfer to Y is complete; i.e., the next event in the event stream associated with account X should be the addition of funds to account Y, and this next available index, if provided, should match the specified target index for X in the request from the client to be successful. If a target index is provided, it can then be verified based on the next available index value to be used for the transaction in the event stream for X after the subtraction event. On the other hand, for account Y, i.e., the account being added, the transaction index for Y after the subtraction event is recorded in the event stream for Y is free to increase without restriction. For example, there may be other funds paid to account Y after a subtraction event from X, thereby resulting in a further transaction in the event stream for Y immediately after the subtraction event. This may be allowed and may remain unchecked, as it does not affect the transfer or balance required for the transfer from X to Y. Therefore, the index value for the transaction in the event stream related to Y may not need to be validated and therefore may not be provided for this purpose.
[0063] Then, to synchronize multiple event streams, each event stream ES n Current Events nThe requirements related to adding multiple event streams are n=1 to M If one or more validation checks are successful for each event stream ES, the method proceeds. Otherwise, the method includes creating an error notification and sending it to the client. Then, for each event stream ES, n Regarding the method, each event stream n Previous blockchain transaction related to TX n-1 The method includes identifying:
[0064] The method then includes synchronizing the plurality of M event streams ES n=1 to M Each event stream ES n The current event E to be added to n Atomic blockchain transaction TX n The method includes creating a
[0065] In some embodiments, a current event E for synchronizing multiple M event streams n The event data associated with the current event E is the same for each of the multiple M event streams. For example, this may be the case when funds or digital assets using the same exchange rate or the same currency are added to or removed from all event streams. In other embodiments, the current event E n The event data associated with the current event E may differ for one or more of the multiple M event streams. For example, one or more of the M event streams may have applied a different exchange rate to the remaining event streams, or n You may be using different types of tokens or digital assets or cryptocurrencies. In some cases, the current event E n There may be no event data associated with the event E. nmay only be associated with metadata, which may be associated with time or data or any other parameter that can be used to verify that a given event, with the same or different data or no data at all, was added or executed at a given time for multiple M event streams. Thus, a synchronization event E n M may be a logical timer to ensure that either the same event or indeed different events are attached via atomic blockchain transactions, providing synchronization of multiple M event streams at a given point in time.
[0066] Atomic Blockchain Transaction TX n is also called a rendezvous transaction, Each nth input is a separate event stream ES n Previous transaction TX n-1 and n=M inputs consuming dust outputs associated with Each event stream ES for each of n inputs n Atomic transaction TX associated with n Each unspent transaction output (UTXO) is the nth dust output with respect to n_dust )and, The unspent transaction output (UTXO) associated with the event data representing the current event En n_data )and Includes:
[0067] The use and advantages of dust inputs and outputs have already been described in the third aspect. In all event streams discussed in this disclosure, dust inputs / outputs, i.e., tracking transactions in a chain of dust, are used to prevent reordering of entries in the log after an insertion / deletion. As in the third aspect, event E nis the data carrier payload for an atomic transaction that contains the non-consumable OP-RETURN output of the transaction. In some cases, event data E n In addition, there may be separate or additional outputs for each input to contain or store data related to the state of the respective stream. Each of the inputs / outputs may also be protected with a respective key for the event stream, as described above.
[0068] However, the atomic transaction of the fourth aspect allows many event chains, each related to a different event stream, to pass through a single blockchain transaction. However, the atomic transaction of the fourth aspect allows multiple event streams ES to be used to ensure traceability for each event stream within the atomic transaction. n=1 to M A given event stream ES n Each n-th dust input / output pair for is associated with its corresponding index value in an atomic blockchain transaction.
[0069] Advantageously, multiple event streams ES n=1 to M Whatever the state or progress of each of the four, the fourth aspect is a common event E n or common event E nThe present invention provides a mechanism by which a data payload associated with an event stream can be attached to each of multiple event streams within a single blockchain transaction. This is advantageous for applications where it is useful to be able to apply a given event or update across multiple resources or entities and then verify that the data was consistent across each of these multiple resources. This is possible in embodiments where participating event streams are associated with or owned by a given client or account. In some cases, one or more of the multiple event streams may be owned by different entities. For example, a client may be associated with a smart contract used to initiate synchronization, and the rules of that contract dictate that all inputs must be the same. In this case, even if all streams are not owned or accessible by the client, the validating entity may infer that all other streams contain the same events or data as the stream being checked. One example is ensuring that debit and / or credit entries related to assets for multiple bank accounts reflect the same information at the same point in time and can be verified using the same transaction for all associated accounts. Another example is when a global change should be applied to all clients or accounts associated with a smart contract, where multiple parties agree to use a new exchange rate, with each account maintained by a separate event stream for a given party.
[0070] In some embodiments, where it is desirable or useful to track state associated with one or more event streams of a plurality M of such streams being synchronized, the method includes mapping inputs of atomic blockchain transactions to respective outputs associated with a given event stream based on a given pattern, which may be regular or arbitrary. In such embodiments, the input is an input associated with consuming dust from a previous transaction of the nth event stream, also referred to as a dust input. The referenced output may be a dust output or another output associated with a data carrier or OP_RETURN for the given transaction associated with the respective (nth) event stream. Event Stream ES n The use of patterns to link the inputs and outputs of related transactions to the respective event streams n This helps to track the status of
[0071] An example of a regular pattern is if x is the number of streams ES n If x is the index associated with the nth input, then the pattern provides for mapping the nth input's event at index x to the stored output at index 2x. Then, for each event stream ES involved in the synchronization, n The state of can be obtained based on the output stored at index 2x+1. Similar to blockchain transactions, the input index x ranges from 0 to M-1 for atomic blockchain transactions.
[0072] Advantageously, by using a regular pattern of linking inputs / outputs of atomic transactions, an auditor or verification entity can easily determine the exact nature of a given event stream ES when the index of its input is available. nThe input index will know where to place the output and state of the given event stream. This input index may be provided by the platform processor or may be obtained by scanning all inputs to a given event stream.
[0073] Any other pattern may also be possible, provided that the input index and / or the corresponding transaction identifier TxID associated with the blockchain are provided to the client and / or validating entity.
[0074] In some embodiments, each event stream ES associated with a request from a client n is the current event E n is an event stream ES with multiple M n=1 to M or an error message is generated for one or more of the event streams in said plurality of event streams. This advantageously ensures that when a synchronization occurs, it is the known, expected previous state of each event stream that is being updated, and that no changes have been made since the synchronization request was sent from the client.
[0075] In some embodiments, multiple event streams associated with a request from a client may be checked for compliance with a time window that may be optionally specified in the request, and if the time when the request is processed is outside the time window, an error message may be generated.
[0076] Then, in some embodiments, the method includes: n Multiple M event streams n=1 to M, retrieving the next available index value for each of the event streams ES in response to appending the next available index value to each of the event streams ES. This is then provided as a response array of the retrieved next index values for the multiple event streams. This advantageously provides confirmation that the multiple M event streams have been updated and synchronized. It also provides new or current index values for each of these streams so that future requests can be made for each individual stream event after the atomic blockchain transaction. In some embodiments, if the synchronization request fails, the returned index value is advantageous, and an unexpected index may be used to indicate the need for resynchronization with other data in the respective event stream. In some embodiments, such resynchronization may be required before the failed request can be retried by the client.
[0077] In some cases, the response array may be stored separately or externally so that it may be accessed by other authorized entities.
[0078] In some embodiments, the dust input index for each of the n=M inputs of an atomic blockchain transaction is the dust input index for the respective event stream ES associated with the nth input. n This means that the dust input index is recorded in multiple ESs, such as the dust output index and / or the event data index. n=1 to M Advantageously, this can be used to derive other indexes for a given event stream among . In some embodiments, all indexes of atomic blockchain transactions are recorded in the respective event stream ESn associated with the nth input.
[0079] When appended to an event stream, the method creates multiple synchronized event streams n=1 to MThe result may also be an acknowledgement of the event stream or an atomic blockchain transaction TX to the blockchain. n will be further returned to the submission of.
[0080] In some embodiments of the third and fourth aspects, a computer-implemented method is provided for accessing a service for writing data associated with an event stream, the service being implemented by one or more processors of a given client of a plurality of clients. The method includes obtaining or identifying an application programming interface (API) endpoint associated with one or more processors of the platform, sending a request associated with the data writing service, and then receiving one or more event E associated with the event stream. n For the fourth aspect, the request includes sending a request for an event E of a plurality M of event streams in the blockchain. n , where M≧2. As noted above, the request is transmitted using the HyperText Transfer Protocol (HTTP) transmission protocol format. The method includes: n In some embodiments, the method further includes transmitting results related to the requested event E, wherein the results are received based on an HTTP transfer protocol format. In some embodiments, the method further includes transmitting results related to the requested event E such that the request includes hashed event data for the event E instead of raw data. n applying a hash function to the event data associated with
[0081] In a fourth aspect, where the request is to synchronize M event streams to add a common event En, the method includes providing an identifier for each of the plurality of M event streams in the request. Optionally, if available, the identifier for the event E in each event stream.n Also included is a target index value for one or more of the multiple M event streams that is used to append
[0082] Aspects of the present disclosure also include a computing device comprising a processor and a memory, the memory including executable instructions that, upon execution by the processor, cause the device to perform a computer-implemented method as discussed above, the computing device being associated with a client.
[0083] Aspects of the present disclosure also include a computing device comprising a processor and a memory, the memory including executable instructions that, upon execution by the processor, cause the device to perform a computer-implemented method as discussed above, the computing device being associated with a client.
[0084] Aspects of the present disclosure also include a computer system comprising at least one platform processor communicatively coupled to at least one client via a wireless communications network, the at least one platform processor associated with an application programming interface (API) endpoint for processing HTTP requests from the at least one client, the at least one platform processor implemented in accordance with the above-described computing device, and the at least one client implemented in accordance with the above-described client computing device.
[0085] Aspects of the present disclosure also include a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor of a computer, cause the computer to perform the method of any of the above aspects and embodiments.
[0086] Some specific embodiments will now be described, by way of example only, with reference to the accompanying drawings, in which like reference numerals refer to like features and in which:
[0087] First aspect - Platform API for multiple blockchain-related services The platform processor for providing the multiple services described above for the first aspect may be a Platform as a Service (PaaS) and Software as a Service (SaaS) offering that advantageously enables rapid delivery of useful real-world business and technical applications, such as management of software-controlled technical systems or smart contracts using a blockchain network such as the BSV blockchain. An overview of the platform service can be seen in FIG. 1, which shows a high-level overview of the system. The platform service has a platform processor 100 that provides an API 108 through which the services can be accessed by one or more clients.
[0088] The platform services 100 shown in this figure are comprised of three service families, which aim to enable users or organizations to easily and securely take advantage of the benefits provided by the unique properties of blockchain without actually implementing any blockchain-based software, knowledge, or libraries on the client side. These services are: a data service 102 aimed at simplifying the use of the chain as a product data ledger; Computation services 104 that aim to provide a generalized computational framework underpinned by digital assets such as Bitcoin SV; and Commerce service offering enterprise-grade capabilities for transacting using digital assets such as Bitcoin SV106 is.
[0089] As described above, the API is implemented as a web service, so that requests can be received from clients at the API via or using the HTTPS protocol. The requested service is then implemented by one or more service modules or processing resources 102-106 using underlying software 110, such as underlying software 110 associated with a blockchain, to implement resources, libraries, and / or key management wallet implementations for creating, processing, and submitting transactions related to the blockchain. Once processed, the transaction can be submitted to the blockchain network 112 (instead of the client implementing any such functionality or transaction library). At most, the client may or can implement a digital wallet or the like associated with cryptocurrency or some other digital asset, although this is not required, as the platform service 100 may also be able to provide and manage digital assets for the client.
[0090] Figure 2a relates to a first aspect of the disclosure and illustrates a computer-implemented method for providing a platform for multiple blockchain-related services, such as platform 100 shown in Figure 1. The method of Figure 2a is implemented by a platform processor associated with an application programming interface (API).
[0091] Step 202a depicts receiving a request from a given client of a plurality of clients. In some embodiments, a client may be one or more computing devices, resources, or processors associated with the client, the client having signed up or registered to access multiple services offered by the platform processor. As noted above, a platform processor may be one or more processors, each providing different types of functionality or services implemented using a blockchain, such as the Bitcoin SV blockchain (e.g., the processor for data, computation, and commerce services seen in FIG. 1). Thus, there may be only one processor for a single service. Because the platform processor is associated with an API endpoint, such as a URI, for the platform, the request from the given client may be based on a standard Internet protocol, such as the Hypertext Transfer Protocol (HTTP) transmission protocol format. In some embodiments, the request may include an identifier for the client as well as an identifier for the requested service.
[0092] In step 204a, the client's identity is checked to verify whether the client is a valid client registered to use the platform processor and the functionality provided thereby. In some embodiments, this may be based on known authentication methods, such as password-protected login authentication. In this case, a record may be created for a given client based on the client identifier or alias and password included in the request. Verification may be based on the password received at the API matching the password in the record. In other embodiments, standard PKI techniques based on cryptographic private / public key pairs may also be used to verify the digital signature present in the request received from the client in step 202a. In this case, the client's identity may be verified by checking whether a request signed with the private key can be successfully recovered or verified using the public key.
[0093] If the client's identity cannot be verified, or if the verification fails, then in step 206a the request is not processed further.
[0094] If the client is successfully verified, the validity of the request for service in step 202a is checked in step 208a to ensure that the given client is indeed authorized to use the requested service. Permissions or attributes for this purpose may be present in the record for the client to indicate one or more types of access levels or services that can or cannot be provided to the respective client.
[0095] If the request is found to be unauthorized or invalid for the requesting client, then in step 210a the request is not processed further.
[0096] It should be understood that the above-described client and / or service validation embodiments, while useful, are not required for the operation of the first aspect. In some cases, only the validation in steps 204a or 208a may be performed. In some cases, no validation is performed. In this case, any client, registered or not, may use the service or platform with appropriate payment for such access.
[0097] In step 212a, a destination address is obtained, which may be an endpoint URI for a server or processor responsible for implementing the service requested in step 202a. In some embodiments where there are multiple platform processors, the host server or platform API may convert the received request into a remote procedure call (RPC) format to be sent to a destination address associated with the processor configured to implement the identified service.
[0098] In step 214a, the requested service is processed by the respective platform processor responsible for it. The blockchain transaction is obtained, read, or generated by the platform processor based on the destination address / endpoint of the responsible processor, and an output script for the transaction is obtained. While FIG. 2a refers to generating a blockchain transaction in this step, it will be understood that the first aspect of the present disclosure is not so limited. If the request in step 202a is to read or obtain data from the blockchain, the transaction may not be generated; it may simply be read or obtained from the blockchain. There may be multiple blockchain transactions or multiple output scripts for one or more of the generated blockchain transactions.
[0099] In step 216a, the output script may include a data output as a result (e.g., there may be a data carrier UTXO), or a result may be obtained based on the transaction identifier or the remaining outputs of the transaction. There may also be a non-consumable OP-RETURN output associated with the transaction from which a result may be obtained.
[0100] In step 218a, results associated with the output script are provided to the given client in HTTP or similar transaction protocol format. In some embodiments, if the responsible processor for the service is located remotely relative to the host platform API, the platform processor receives the response associated with the blockchain transaction from the responsible processor in RPC format. An API converter then converts this into a message that can be sent based on HTTP format before sending it to the client. As noted above, if the client uses an alias addressing service such as bsvalias, the results are sent in an HTTP message addressed to the client's alias in a format dictated by the bsvalias machine-readable resource.
[0101] Figure 2b relates to a first aspect of the disclosure and illustrates a computer-implemented method for accessing a blockchain-related multiple services platform, such as platform 100 shown in Figure 1. The method of Figure 2b is implemented by one or more processors associated with a client.
[0102] In step 202b, an application programming interface (API) endpoint associated with the platform is identified. As mentioned above, this may be an API associated with the host platform processor, and there may be one or more additional processors responsible for executing the service, each with its own service endpoint or destination address.
[0103] In step 204b, the client prepares a request for a service, such as data writing service 102 in Figure 1. In some embodiments, the client includes a client alias or identifier and / or a service identifier in the request so that it can be routed to the correct service endpoint. This is useful for platform processor checks on the validity of the requesting client and the client's authorization to use the requested service.
[0104] In step 206b, since the platform processor is implemented as an HTTP or REST API, the request prepared in step 204b is sent using Hypertext Transfer Protocol (HTTP) or a similar transmission protocol format.
[0105] In step 208b, a result associated with the output script of the blockchain transaction associated with the request is provided from the platform processor, and the result is provided to the client in an HTTP transaction protocol format.
[0106] Advantageously, in the method of the first aspect, requests for the blockchain-based service are sent and received by the client in HTTP transaction protocol format, thereby allowing the client to utilize all of the benefits and services inherent in blockchain without having to implement any transaction functions or blockchain libraries. This is because the services are provided through a platform API, which can be an HTTP or REST API endpoint. For example, the REST API design standard allows for processing and communicating HTTP requests over the Internet using the following HTTP commands, which are all functions required by the client, i.e., to send and receive messages over the Internet. The platform processor implements the commands remotely or separately for the client.
[0107] [Table 1]
[0108] FIG. 3 provides a more detailed schematic diagram of multiple services related to a blockchain, which may be implemented by a platform 300 associated with an API through which any one or more of the provided services may be accessed. As seen in this diagram, data service 302 may include a data writer 302a and a data reader service 302b. An event stream implementation using data writer service 302a is described in detail in FIGS. 4 through 8 to enable clients to write data to the blockchain in a simple, secure, and optimized manner. Data reader service 302b allows clients to submit queries, which return data to be stored in the blockchain. This may be using filtered streams, where clients may predefine the type of data they want to read from the blockchain ad hoc or periodically, i.e., within a specific time frame, or related to a set of related or unrelated events or documents processed in blockchain 310. A data archiving function allows access to logs of previous transactions related to a specified event or contract.
[0109] Computation services 306 of platform 300 include applications 306a and frameworks 306b related to smart contracts, which in some embodiments may be represented as state machines within blockchain 310. Computation services 306 interact with data services 302 as data must be input for such computations and results provided to clients.
[0110] The commerce service 304 is responsible for providing enterprise-class functionality via the enterprise wallet 304a for transacting over the blockchain 310 based on best-in-class security practices and technology. For example, in some embodiments, the enterprise wallet may implement functionality to enable blockchain transaction processing when two or more people, users, or accounts may need to sign off on a transaction that meets defined criteria, i.e., a transaction involving a large value of cryptocurrency that exceeds a certain predefined limit. The enterprise wallet may also include functionality to implement threshold numbers and / or types of signatures to transfer large amounts of digital assets, such as cryptocurrency or tokens representing another resource. Transfers of these assets may be represented on the blockchain after processing based on criteria applied by such an enterprise wallet implementation.
[0111] SPV services 308 (simplified payment verification) are applications that require information from the blockchain but do not run miner nodes and therefore do not include a direct link to the blockchain. Such SPV services 308 allow light clients to verify that transactions are contained within the blockchain without downloading the entire blockchain 310.
[0112] Second aspect - Platform that provides data writing services related to blockchain Figure 4, relating to a second aspect of the disclosure, illustrates a computer-implemented method for providing a data writing service for transactions related to a blockchain, such as data writer 302a shown in Figure 3 of the first aspect. The method of Figure 3 is implemented by a platform processor associated with an application programming interface (API) for the service.
[0113] Step 402 depicts receiving a request from a client, the request associated with an event stream ES implemented using a blockchain. As with the first aspect, the request from the client is in Hypertext Transfer Protocol (HTTP) transmission protocol format. In some embodiments, the event stream is associated with a state machine and represents a machine-readable contract or smart contract implemented as a finite state machine within the blockchain. A finite state machine (FSM) is a well-known mathematical model of computation. An FSM is an abstract machine that can be in exactly one of a finite number of states at any given time. An FSM can change from one state to another in response to some external inputs, and the change from one state to another is called a transition. An FSM may be defined by its states, its initial state, and a list of conditions for each transition. In the Bitcoin SV blockchain, the UTXO set can be thought of as a state machine, where the consumption state of a given output is a function of previous inputs to the transaction (machine). Thus, by replaying all transactions, the current consumption state of any output and the current contents of the UTXO set can be deterministically established using the blockchain. Thus, in the embodiment of Figure 4, the request can be viewed as a request to change the current state of the smart contract, implemented as an event stream ES in the blockchain.
[0114] Step 404 includes a data writer or platform processor for implementing a data writing service to write the event stream ES i=n Let us consider that i is an integer between 0 and N, and each integer i represents a given state of an event stream ES having a finite number of states, whereby i=0 represents the created event stream ES, i=n represents the event stream ES in its current state in the blockchain, and i=N represents the final state of the event stream ES. Thus, the current state of the event stream ES is En.
[0115] Step 406 determines the next or new event E for the event stream ES based on the received request in step 402. n+1 In this embodiment, the new event may be data or a function that triggers a change of state such that the event stream transitions to the next state.
[0116] Step 408 includes generating a blockchain transaction TX by one or more processors associated with the platform processor that implements the data writer. n+1 Next event E n+1 The steps to create a blockchain transaction TX are shown below. n+1 At least, Previous transaction TX n Transaction Output (TXO) from n ) and this input is the TXO from the previous transaction. n An input that consumes an output, New Event E n+1 Represents the unspent outputs (UTXOs) associated with the event data. n+1 ), which in some embodiments is a data output, i.e., represents the data carrier element of the transaction, and There may be additional inputs, such as a funds input to cover network mining fees if necessary, and other outputs, such as a change output for the transaction.
[0117] Step 410 depicts submitting transaction TXn+1 created in step 408 to a blockchain, where the transaction may be submitted to a blockchain such as Bitcoin SV for inclusion in a subsequent block by a miner node or BSV node software associated with the platform processor.
[0118] Step 412 is ES i=n =ES n+1The newly created event E n+1 The current state of the event stream ES based on i=n+1 This indicates that the latest transaction TX submitted to the blockchain on ES is updated to n+1 In some embodiments, the new state corresponds to the last transaction output UTXO n+1 The event information is identified and updated based on the event data output in
[0119] Step 414 is a step of updating the current state ES n+1 The result is provided to the client in HTTP transfer protocol format.
[0120] Third aspect - A platform that provides data writing services for recording event streams related to the blockchain Figures 5, 6, and 7 discuss applications related to implementing event streams, such as those discussed in connection with Figure 4 of the second aspect. The third aspect relates to techniques for establishing an immutable, continuous log or record of an event stream ES up to its current state on a blockchain. In some embodiments, the log may be provided or stored off-chain in addition to being stored on the blockchain. Because the state of an event stream is based on inputs and outputs associated with transactions, the techniques described below for the third aspect present a way to establish an immutable, chronological log of all transactions associated with an event stream on a blockchain. The event stream may represent continuous inputs applied to a smart contract implemented using an FSM, DFA, or the like.
[0121]
[0033] Figure 5, relating to a second aspect of the present disclosure, illustrates a computer-implemented method for providing data writing services for transactions related to a blockchain, such as data writer 302a shown in Figure 3 of the first aspect. The method of Figure 5 is implemented by a platform processor in association with an application programming interface (API). The method relates to creating a new event stream.
[0122] Step 502 shows receiving a request from a client, the request being to create a new event stream ES using the blockchain. As in the first and second aspects, the request from the client is in a Hypertext Transfer Protocol (HTTP) transmission protocol format.
[0123] Step 504 depicts determining a hierarchical deterministic (HD) key chain K to be used with the new event stream ES to be created. In some embodiments, this may be implemented by an HD wallet implementation associated with the platform processor to generate a hierarchical tree-like structure of keys starting from a seed, parent, or master key based on the well-known BIP21 protocol. The HD key creation and transfer protocol greatly simplifies key generation, enables the creation of child accounts that can operate independently, and gives the parent account the ability to monitor or control its children even if the child account is compromised. The HD protocol uses a single root seed to create a hierarchy of child, grandchild, and other descendant keys, each with a distinct deterministically generated integer value. Each child key also obtains a deterministically generated seed, called a chaincode, from its parent. In this way, any compromise of one chaincode does not necessarily compromise the integer sequence for the entire hierarchy. In addition to the above advantages, in this embodiment, this key generation is performed by the platform processor, thus removing the resources and functionality of this key generation from the client. Therefore, the HD wallet does not need to be implemented by the client. In step 504, the key chain K is generated as follows: K = K n=0 to N where n is an integer between 0 and N, each integer n representing the current length or current number of events associated with the event stream ES, and N representing the maximum or final value of n.
[0124] Step 506 depicts identifying or obtaining data related to the first event E0, which is for a new event stream ES to be created in the blockchain based on the event data in the request received in step 502.
[0125] Step 508 depicts creating a first blockchain transaction TX0 for the new event stream ES, where n=0, by one or more processors associated with the platform processor implementing the data writer.
[0126] Step 510 determines whether the output of the blockchain transaction TX0 created in step 508 is a dust output, and whether the output of the blockchain transaction TX0 is a dust output. 0_dust ), where the dust output is associated with a lock script protected with the first derived key pair K0 in the series of keys derived from the HD Key Chain K in step 504. The dust output is associated with a (digital asset) value that is below a defined threshold value for the transaction or has a defined minimum value, i.e., lower than the mining fee required to consume such transaction. There may also be other inputs related to digital assets related to operational float or digital assets or cryptocurrency assets maintained with or associated with the payment processor. It is also possible to have other outputs in a transaction that are digital asset modified outputs.
[0127] Thus, in some embodiments, the creation template for a blockchain transaction to create an event stream according to this embodiment requires that the first input must be greater than dust. This advantageously indicates that there are no previous entities in the event stream and that this is the first entity. The creation template also specifies that there is no data carrier or data output (and therefore no OP_RETURN) because the first output of the template is dust and there is no event data associated with the creation state other than the creation of the new event stream ES. In some embodiments, an OP_RETURN is included for the creation frame, but it does not carry any event data. It may carry metadata describing the parameters of the newly created stream. Examples of example metadata may include details such as public or notarized properties, time of writing to the blockchain, time the event is first accepted, time the event is no longer accepted, geographic region where backing or associated data is stored, maximum size of allowable data, sequence number, etc.
[0128] Step 512 depicts submitting transaction TX0 to a blockchain, where the transaction may be submitted to a blockchain such as Bitcoin SV for inclusion in a subsequent block by a miner node or BSV node software associated with the platform processor. In some embodiments, once mined, the transaction identifier TX0 may be used to uniquely identify the newly created event stream ES.
[0129] Step 514 shows sending the results related to the event stream ES created in TX0 to the client, where the results are provided in HTTP transmission protocol format. The results related to the event stream may be copied or stored separately from the blockchain.
[0130] In some embodiments, the creation of the event stream may be decoupled from submission to the blockchain for on-chain settlement, in which case an event stream id unique to each event stream may also be used and provided in the results to the client instead.
[0131] Figure 6, relating to a third aspect of the present disclosure, illustrates a computer-implemented method for providing data writing services for transactions related to a blockchain, such as data writer 302a shown in Figure 3 of the first aspect. The method of Figure 6 is implemented by a platform processor associated with an application programming interface (API). The diagram relates to a request to append a new event to an existing event stream ES on the blockchain.
[0132] Step 602 shows receiving a request from a client, where the request is to modify an existing stream ES identified in the request and implemented in the blockchain. The request from the client is in HyperText Transfer Protocol (HTTP) transmission protocol format, as in the first and second aspects. As discussed in connection with step 504 of FIG. 5, the event stream ES on the blockchain is stored in a manner such that K=K n=0 to N where n is an integer from 0 to N, each integer n being the current length or current number of events associated with the event stream ES, and N representing the maximum or final value of n. In some embodiments, an authentication and authorization check is performed, which may be a test for the presence of an API access token, or a session check or a password / digital signature test, or any other suitable method for validating the client or the service request made.
[0133] In step 604, the current length n of the event stream ES is determined.
[0134] Step 606 is for event En identifies or obtains data related thereto, which is an event to be currently appended or added to the event stream ES on the blockchain based on the event data in the request received in step 602.
[0135] In step 608, a previous blockchain transaction TX n-1 associated with the event stream ES is identified. Once identified, the identified previous transaction TX n-1 associated key pair K n-1 is determined. As described above, this is based on the same seed key pair K set in step 602.
[0136] In step 610, a key pair K n for the current event E n is derived from the seed key pair K.
[0137] Step 612 indicates that one or more processors associated with a platform processor implementing a data writer create a current blockchain transaction TX n for the new event stream ES, where 0 < n < N. The blockchain transaction TX n created for the current event E n to be appended to the event stream ES is a first input that consumes the dust output associated with the previous transaction TX n-1 where the consumption is permitted using the obtained key pair K for the previous transaction obtained in step 608, the first input, and n-1 a first unspent transaction output (UTXO n n_dust ) that is a dust output for the current transaction TX n_dust where the dust output is the key pair K derived from step 610 na first unspent transaction output associated with the lock script protected using Current Events n The event data represents the final unspent transaction output (UTXO) associated with the event data. n_data )and Includes:
[0138] As noted above, a dust output is associated with a (digital asset) value that is below a defined limit or has a defined minimum value for the transaction. There may also be other inputs related to the digital asset based on the operational float. This float may be controlled by the platform processor. There may also be other outputs within a transaction that are digital asset change outputs.
[0139] Thus, in some embodiments, the update template for a blockchain transaction to update an event stream according to this embodiment is one in which the first input must be dust and the first output must be dust. This is to advantageously indicate the presence of a previous entry in the event stream. This also indicates that the event in En in question (the current or current event data) comes after the previous transaction or state. Thus, the transaction advantageously follows the dust chain and comes before the next state. The update template includes a data carrier, i.e., a data output carrying the event data or result related to the current event or state. This may be a non-consumable OP_RETURN output.
[0140] The use of dust outputs in transactions is advantageous in maintaining an immutable, continuous record of all transactions that occur to the event stream ES in the blockchain. This is because, by posting a transaction to the blockchain, all blockchain transactions are time-stamped and order is maintained in the blockchain, but this does not guarantee preservation of their order, as transactions may be mined into blocks at different times. The use of a dust output from a previous transaction being consumed as the first input of a current transaction ensures a clear, continuous, and tamper-proof record of the event stream in chronological order, if the consumption is based on the respective unique keys associated with each transaction's lock / unlock scripts.
[0141] Step 614 is to n to a blockchain, where the transaction may be submitted to a blockchain such as Bitcoin SV for inclusion in a subsequent block by a miner node or BSV node software associated with the platform processor. In some embodiments, once mined, the transaction identifier may be used to uniquely identify the event stream ES.
[0142] Step 616 is TX n , which indicates sending results related to the event stream ES created in to the client, the results being provided in HTTP transmission protocol format. The results may be copied or stored separately from the blockchain. In some embodiments, this may be based on the event data in the final unconsumed transaction output (UTXOn_data). In some embodiments, the event E in (UTXOn_data) nThe event data for event E includes a hash of the event data, thereby ensuring that it is kept private by the platform processor. The hash may be applied by the platform processor or by the client, i.e., in some implementations, n may be applied prior to generating the event data associated with the request received at the platform processor in step 602. When applied by a client, the event data in the request is private even before it reaches the platform processor. In other implementations, the event data may be provided as publicly available raw data from the blockchain.
[0143] Figure 7, related to a third aspect of the present disclosure, illustrates a computer-implemented method for providing data writing services for transactions related to a blockchain, such as data writer 302a shown in Figure 3 of the first aspect. The method of Figure 7 is implemented by a platform processor associated with an application programming interface (API). The request in Figure 7 is to terminate an existing event stream on the blockchain.
[0144] Step 702 shows receiving a request from a client, the request relating to the termination of an existing event stream ES implemented using a blockchain. The request from the client is in the HyperText Transfer Protocol (HTTP) transmission protocol format, as in the first and second aspects. As discussed in connection with step 504 of FIG. 5, the event stream ES on the blockchain is n=0 to Nwhere n is an integer between 0 and N, each integer n representing the current length or current number of events associated with the event stream ES, and N representing the maximum or final value of n. In some embodiments, an authentication and authorization check is performed, which may be a test for the presence of an API access token, or a session check or a password / digital signature test, or any other suitable method for validating the client or the request made.
[0145] In step 704, the current length N of the event stream ES is determined.
[0146] Step 706 depicts identifying or obtaining data related to the final event EN, which is for the event that is currently to be added or appended to the event stream ES on the blockchain based on the event data in the request received in step 702.
[0147] In step 708, a previous blockchain transaction TX associated with the event stream ES is N-1 Once identified, the identified previous transaction TX N-1 The key pair K associated with N-1 is determined. As above, this is based on the same seed key pair K that was established in step 702.
[0148] In step 710, the current event E N The key pair K for N is derived from the seed key pair K.
[0149] Step 712 includes, by one or more processors associated with the platform processor implementing the data writer, generating a current blockchain transaction TX for the new event stream ES. Nwhere n=N. The blockchain transaction TX created for the current event EN to terminate the event stream ES. N teeth, Previous transaction TX N-1 a first input that consumes a dust output associated with the key pair K obtained for the previous transaction obtained in step 708; N-1 a first input, which is allowed using The first unspent transaction output (UTXO) associated with a digital asset that exceeds the defined dust output limit. N )and Includes:
[0150] For a final event, all transaction outputs return change. There is no dust output, as there is no requirement or need to track the next stage of a terminated event stream. Therefore, when n=N, no dust output is provided by the platform processor. In other words, the output may be considered a change output (digital asset payment) associated with the event stream ES. This advantageously marks or indicates the final end state of the event stream being tracked. In some embodiments, because the event or contract is in a terminated state, there is no event data or data carrier element for the output, i.e., there is no OP_RETURN associated with the event data. Therefore, separate dust and data carrier outputs are not generated to terminate the event stream ES; the first output, along with the absence of an event data output that also indicates termination, exceeds the dust limit, signaling the end of the event stream on the blockchain. In embodiments where metadata is present in the OP_RETURN instead of event data, this metadata may be useful to the validating entity. There may be other inputs or change outputs associated with digital assets from the operational float. In some embodiments, the value of the dust-related digital asset set out in connection with FIGS. 5 and 6 may simply be added to one or more other outputs.
[0151] Thus, in some embodiments, a close template for a blockchain transaction to terminate an event stream according to this embodiment is one in which the first input must be dust, like the first input of the update template in Figure 6. The first output must not be dust, which advantageously acts as an end-of-ledger marker and further distinguishes the close template from the update template. As with the create template in Figure 5, there may be no data carrier for the event data, but OP_RETURN may include metadata in the close template.
[0152] Step 714 is to N to the blockchain, where the transaction may be submitted to Bitcoin, such as the Bitcoin SV network, for inclusion in a subsequent block by a miner node or BSV node software associated with the platform processor.
[0153] Step 716 is TX N , and the results are provided in HTTP transmission protocol format.
[0154] Figure 8 relates to a third aspect of the disclosure and illustrates a computer-implemented method for accessing a platform or data writing service for writing data to an event stream associated with a block, such as platform 100 shown in Figure 1 or platform 300 in Figure 3. The method of Figure 8 is implemented by one or more processors associated with a client.
[0155] An application programming interface (API) endpoint associated with the platform is identified in step 802. As previously mentioned, this may be an API associated with the host platform processor, and there may be one or more additional processors responsible for implementing the service, each having a service endpoint or destination address.
[0156] In step 804, a client prepares a request to a service, such as data write service 302 in Figure 3. The request is associated with one or more events related to the event stream ES in the blockchain. The client in some embodiments includes a client alias or identifier and / or a service identifier in the request so that the request can be routed to the correct service endpoint and so that the platform processor can check the validity of the requesting client and the client's authorization to use the requested service.
[0157] In step 806, the platform processor is implemented as an HTTP or REST API, so the request prepared in step 804 is sent using Hypertext Transfer Protocol (HTTP) or a similar transmission protocol format.
[0158] In step 808, the event E in the request n A result associated with the output script of the blockchain transaction associated with the platform processor is received. The result is provided to the client in an HTTP transmission protocol format. In some embodiments, the result may be stored within the platform processor or in a log separate from the blockchain associated with the platform processor.
[0159] Advantageously, the implementation of the event stream and its continuous log associated with the blockchain, as implemented by the method of the third aspect of the present disclosure, provides guarantees regarding the immutability of events and the immutability of event ordering. Change the content of the event; Rearranging the order of events, Inserting events at the beginning or middle of a stream; Delete events from anywhere in the stream Attempts to tamper with the event stream are prevented or revealed in either case.
[0160] In other words, the method according to the third aspect comprises determining the following attributes associated with the event stream: that individual entries in the event stream have not been modified since they were written, No entries have been inserted between previous consecutive entries, The entry has not been deleted, Entries are not sorted Make it provable.
[0161] These properties and advantages have many practical applications, from audit / compliance logs, to state machine replication, to more efficient, tamper-resistant, and accurate ways to read and write data to the blockchain for all clients.
[0162] An example of an event stream where capturing an event log is useful is an application that tracks and records events in games such as Noughts O and Crosses X, which use blockchain.
[0163] For example, suppose a game with n=4 (five states from 0 to 4) is in the following states:
[0164] [Table 2]
[0165] As the game progresses, a log based on blockchain transactions may be recorded according to the method of the third aspect as follows:
[0166] [Table 3]
[0167] Consider that there are attempts to tamper with or modify the copy of the log maintained for this sequence, such as inserting a different entry for the outcome when n=4, so that the log does not reflect the actual state of the game, as shown below.
[0168] [Table 4]
[0169] This would be immediately identified from a check or audit of an automatically generated continuous log of the event stream on the blockchain as an input for a transaction consuming dust output for transactions where n=3 does not verify. It will be appreciated that if such games involve financial transactions (e.g., paying to play), there may be a desire from players to check the authenticity of those game logs and whether they adhere to the odds or difficulty advertised by a given game provider. By storing individual game entries (or hashes thereof) for a given game in the event stream as described above, players can be assured that in-game events can be checked and verified independently of any internal systems maintained by the game provider.
[0170] It will be further understood that each event in a given event stream need not correspond to an individual event occurring within a game session. An event stream may be defined for any log of events where an accurate, sequential, and tamper-proof log of said events is desirable. Examples of events in a given event stream may include, for example, the inputs and / or outputs of a given smart contract executed locally or remotely (preferably off-chain), messages sent between two or more participants of a given offline messaging conference, weather, physical measurements performed by sensors or IoT devices to measure the location of vehicles, goods, people, etc., drug / medicine tracking, including manufacturer, transportation, dispenser location, prescribed dosage, recipient information, etc., amounts credited and / or debited to an account (regardless of whether the account is credited with cryptocurrency or fiat currency), changes in exchange rates, execution of a trade, a request to purchase goods or shares, etc. Ultimately, the context in which an event stream is generated and used is at the discretion of the parties using the platform processor to generate such event streams.
[0171] Fourth Aspect – A platform that provides data writing services to synchronize multiple blockchain-related event streams FIG. 9 illustrates a technique for updating multiple event streams. Event streams are discussed above in connection with the second and third aspects, particularly FIG. 6, which refer to methods for appending data to or modifying a single event stream. In addition to establishing an immutable, continuous log of an event stream up to its current state on the blockchain, the fourth aspect of the present disclosure allows multiple separate event streams to be synchronized, each of which can progress separately as shown in FIGS. 5 through 7. As with the second and third aspects, an event stream once synchronized according to the fourth aspect can be provided or stored off-chain in addition to being stored on the blockchain. Because the state of each of multiple event streams is based on inputs and outputs associated with blockchain transactions, including a single or atomic transaction that synchronizes the streams by appending a synchronization event to all provides an immutable chronological log of all transactions, with the point of synchronization traceable back to the single atomic transaction. As noted above, the event data associated with events for synchronizing multiple event streams can be the same for each of the multiple event streams, or can be different for at least one or more of the multiple event streams, or in some cases, no event data may exist. 9 to a current event or a synchronized event is understood to cover all these possibilities. For ease of explanation only, and not meant to be limiting, some embodiments of the fourth aspect are described with respect to a single event, or possibly the same event data.
[0172] FIG. 9 relates to a fourth aspect of the present disclosure and illustrates a computer-implemented method for providing a data writing service for synchronizing multiple event streams. This method may be implemented by a platform processor that provides a function or service similar to the data writer 302a shown in FIG. 3 of the first aspect. The method of FIG. 9 is implemented by the platform processor in association with an application programming interface (API). In most cases, this API is a different endpoint than the API shown in FIG. 6, which teaches how to update a single event stream. However, if the same endpoint has the ability to service multiple event streams simultaneously, the API may potentially be the same endpoint as the API in FIG. 6. FIG. 9 relates to a request from a client to add a new event to multiple M event streams on a blockchain to synchronize all M streams.
[0173] Step 902 depicts receiving a request from a client, the request including a request for a number M of existing event streams ES associated with the blockchain. n=1 to M where n is an integer from 1 to M, where M≧2. In some embodiments, the request from the client is in the HyperText Transfer Protocol (HTTP) transmission protocol format, as in the previous embodiment.
[0174] As discussed in relation to the third aspect, in some embodiments, a plurality M of event streams ES n=1 to M Each event stream ES n Also, K=K 0 to i For a given event stream ES, n , where in this embodiment, i is the unique key chain for a given event stream ES nrepresents the current index or length or current number of events associated with the event stream. Other authentication and validation checks regarding the client's authority to attach to a given event stream may also be performed based on asymmetric key pairs or digital signatures, such as tests for the presence of an API access token, or session checks or password / digital signature tests, or event stream ES n Or it could be any other suitable way of validating the service request made.
[0175] Client requests are sent to multiple event streams n=1 to M , i.e., the M event stream identifiers are included in the JSON object representing the request. In some embodiments, the request from the client also includes one or more identified event streams ES n , where the target index is the next available index, or in other words represents the actual or current length of the event stream to be used for the synchronization request +1.
[0176] Step 904 retrieves the current event E from the request in step 902. n This indicates that the request identifies or retrieves data related to the M event streams ES identified in the request. This is data used to synchronize multiple M event streams. n is an event En to be added or loaded to each of
[0177] In some embodiments, as described above, an event E is added to each stream as part of the synchronization process. nIt is possible that event data associated with one or more of the multiple streams may differ from that of one or more other streams. For example, metadata associated with each event stream may differ when compared to other participating event streams. The metadata may be associated with synchronized logical clocks, the use of different currencies or exchange rates specific to a given event stream, the addition of random values or salts to each stream, the characteristics of hash and / or salt functions, etc.
[0178] Step 906 illustrates an embodiment in which one or more validation steps are performed before synchronization of multiple streams can occur. When a request is received at the API in step 902 to synchronize two or more streams, multiple ES n=1 to M Each stream of ES n is verified by checking that the signature provided is valid for the signed input to the stream against the public key supplied when the event stream was created, in which case the data is passed to the synchronization event E n For example, the signature may be based on a public key provided for a given event stream at the time of its creation (see Figure 5).
[0179] A synchronization request is made to multiple M event streams ES n=1 to M If any one fails, the synchronization request will not proceed and an error message may be generated, as shown in step 912.
[0180] In some embodiments, this step may include retrieving data E specified for one or more of the event streams identified by the client in step 902, if available. n It also includes verifying whether the target index for ES matches the last index of the event stream, which is the next available index for appending data to the respective event stream. This is done for multiple M event streams ES n=1 to MIf one fails, synchronization does not proceed and an error message is generated in step 912. Thus, this step checks for concurrency and verifies that there are no potentially overlapping requests related to a given event stream where the actual index may have changed.
[0181] Below is an example error message when the target index does not match the actual last or next available index in event stream id1, but does match for event stream id0 as identified in the JSON request object: [ { "id": " <esid0>", "ref": "<client reference>", "result": "unchanged", "index": <esid0.last_index> }, { "id": " <esid1>", "result": "badIndex", "index":<esid1.last_index> } ]
[0182] Following successful validation in step 906, in step 908, the plurality of M event streams ES n=1 to M Each event stream ES n For each event stream ES, the previous blockchain transaction TX associated with n-1 As described above in step 902, a seed key pair K or key chain is identified for each event stream ES n or each event stream ES n In this case, the identified previous transaction TX n-1 The key pair K associated with i-1 Based on this, the event stream ES n The key pair K for the current event to be added to n is derived from the seed key pair K.
[0183] Step 910 generates a plurality of event streams ES n= 1 to M To synchronize the event streams of n The current event E to be added to each of n Atomic blockchain transaction TX n This transaction splits the event stream of M into a given event E n An atomic blockchain transaction is a single transaction that updates multiple streams to synchronize with the event E. An atomic blockchain transaction is sometimes called a rendezvous transaction. Such a transaction is an extension of the event stream in FIG. 6 that allows for a single append operation, since the same event can be atomically appended to multiple streams; that is, all event streams that are parties to the rendezvous or atomic transaction are either extended or synchronized with a given E, or none. n may all be associated with the same event data, or the events E n may be associated with different event data for one or more of the multiple M event streams.
[0184] Atomic or rendezvous transactions are transactions that span event streams, and differ from the transactions in step 612 of FIG. 6 in that each transaction spans a given event stream ES among multiple M event streams. n It involves building multiple dust chains as the first input to
[0185] Therefore, atomic blockchain transaction TX n teeth, n=M inputs, each of which is a respective event stream ES n , and each n-th input is associated with a respective event stream ES n Previous transaction TX n-1 The dust output associated with the input and For each of the n inputs, a respective event stream ES n Atomic block transaction TX associated with n Each unspent transaction output (UTXO) is the nth dust output with respect to n_dust )and, Event data representing the current event En, i.e., the unspent transaction output (UTXO) associated with the data carrier. n_data )and Includes:
[0186] Similar to the above aspect, there may be additional inputs, such as a funds input to cover network mining fees if necessary, and there may also be other outputs, such as a mutating output or a data carrier output, such as an OP_RETURN, associated with each event stream for an atomic transaction.
[0187] Event Stream ES n is associated with the key chain K, then similar to step 602, each nth dust input consumption is calculated based on the obtained key pair K for the previous transaction obtained in step 908. i-1 Atomic blockchain transactions are confirmed using TX. n The nth dust output for the key pair K derived from step 908 n is associated with the protected lock script using
[0188] In all event streams discussed in this disclosure, tracking transactions in dust inputs / outputs, i.e., chains of dust, is used to prevent reordering of entries in the log, prevent post-mortem insertions / deletions, forks, i.e., alternative timelines, etc., leveraging the safety, immutability, and double-spend prevention of blockchain networks. This chain of dust formed by the nth input / output pair on a set of data carriers is used to represent each single event stream ES. n collectively protect
[0189] Similar to standard event stream dust chain transactions, rendezvous or atomic transactions involve a dust chain, platform funds and change (for transaction fees), and a data carrier for each event stream. However, atomic transactions allow many dust chains, each associated with a different event stream, to pass through a single blockchain transaction.
[0190] Therefore, all Dust Chain pairs share platform funds and changes. The data payload or event data E used for synchronization in the above-described embodiment n becomes the output of an atomic transaction whose semantics is to append its data payload to all streams whose dust chains are contained within the first n=M input / output pairs, effectively providing an atomic commit of data across multiple event streams.
[0191] In some embodiments, such as those described above in FIG. 9, the input index and output index have a one-to-one mapping, with a single data element having a final output index. As described above, it is possible to individually verify whether multiple event streams participating in an atomic blockchain transaction were correctly synchronized / updated. An auditor or verification entity or program may individually verify whether each event stream ES is synchronized / updated to check that particular event stream. n In some embodiments, the index may be provided via a platform processor as part of metadata that may be available to the client or validating entity, or the index may be obtained on-chain through observation of the transaction inputs, i.e., by scanning the inputs for matches with the output of the previous event in the respective event stream.
[0192] Consider an example of validating a synchronized event stream using the method of FIG. 9, using a double-entry bookkeeping policy where it is desired to verify that all balance changes in an account match an equal and opposite balance change in another account, assuming that a validating entity acting on behalf of the client owns or has access to the event stream being examined. This example is not limited to just one debit and one credit account, but can be applied to any number of accounts, as long as all balance changes for the issuer and asset sum to zero. In a first example, consider an exchange scenario involving the use of six accounts: two accounts operated by Alice, two accounts operated by a broker or exchange entity, and two accounts operated by Chris. Suppose Alice and Chris agree to exchange 1X for 2Y, where 1X = 0.5Y. Alice transfers 1X to the Broker and receives 2Y from the Broker. Chris transfers 2Y to the Broker and receives 1X from the Broker. Alice-1X & Broker+1X Alice+2Y & Broker-2Y Chris-2Y & Broker+2Y Chris+1X & Broker-1X Thus, the sum of all changes in X is zero, and the sum of all changes in Y is zero.
[0193] In a second example, assume Alice and Chris share the same issuer for both the X and Y assets, and they can swap with each other without a broker. AliceX-1 -> ChrisX+1; the sum of X is zero ChrisY-2 -> AliceY+2; the sum of the Y's is zero These four balance changes can be combined together in a single rendezvous transaction. If they were split into four separate transactions, any one transaction could fail, resulting in an imbalance (i.e., asset creation or loss) in either X or Y. If they were split into two rendezvous transactions, one would fail, and either Alice or Chris would not receive their X or Y.
[0194] In a third example, consider two event streams A and B, where, for a given currency, A represents an account using an exchange rate or agreed-upon offset X, and B represents an account using an exchange rate or agreed-upon offset Y, where 1X=0.5Y. Consider that the two accounts should be synchronized when A transfers 2 units at offset X to B. This transfer is triggered by a per-stream synchronization event E n , but the event data associated with each may be different. For A, the event data may represent a decrease of 2 units in offset X. For B, the event data may represent an increase of 1 unit in offset Y, which corresponds to an addition of 2 units in offset X transferred from A.
[0195] In some cases, the transfer may be split into two separate atomic transactions: one for a 2X subtraction event from A that is recorded in both event streams, and another for a 1Y unit addition event to B that is also recorded in both event streams.
[0196] Verification is performed on a given event stream ES until an atomic blockchain or rendezvous transaction is encountered. n events in the stream being checked. From this point, the validating entity may also check other accounts associated with the client and perform a zero-sum calculation. In a first example, the client may be the issuer account, i.e., Alice. Any errors may then be flagged at this stage, and if there are no errors, the validating entity simply moves on to verifying the next event in the stream being checked.
[0197] Below is an example of an atomic transaction input / output that attaches to three streams:
[0198] [Table 5]
[0199] An example of an atomic transaction associated with two event streams T1 and T2 can be seen in Figure 11. In this figure, we can see that the dust inputs / outputs of each T1 and T2 are the first two entries in atomic transaction TX12 at index 0 and index 1, respectively. TX12 tracks the dust chains associated with both event streams T1 and T2.
[0200] Multiple Event Streams ES n =1 to M Following an atomic transaction that synchronizes the API endpoints in some embodiments, multiple ES n=1to M Each event stream in ES n Returns a response array of the next available index values associated with each event stream, which can be provided to the client requesting synchronization. The response can be provided for the purposes of independent validation for each event stream, or the client can request the next event from each event stream ES n An index may be provided to know which index value to use for one or more event streams. If the index is unknown for one or more event streams, for example, if the event stream is empty, a NULL value may be included for the event stream.
[0201] As data is appended and thus synchronized across all of the multiple M event streams, each event stream ES n may proceed independently as separate streams following the atomic transaction, as discussed in the third aspect.
[0202] Examples of atomic or rendezvous transactions are shown below in Tables 1, 2, and 3 using API endpoints / rendezvous.
[0203] [Table 6]
[0204] [Table 7A]
[0205] [Table 7B]
[0206] [Table 8]
[0207] An example of an operational flow according to the fourth aspect based on Tables 1 to 3 is shown below. / Rendezvous performs the following actions: 1. Validate JSON parameters for well-formedness or return an error message. 2. Repeat the authentication or signing. 3. Use id to get the public key for each stream or return unknown. 4. Use the alg and public key to verify the sig over the command, or return badSig. Each sig spans the entire command, not just the elements related to a particular stream. 5. Each id in the certificate must match exactly one id in the command. If there is not an exact one-to-one match of signature and command, return badSig. 6. For each stream, .1.Check validFrom > now() and validUntil < now() or return timeBefore or timeAfter. .2.appendIf == last_index then lock the stream, else return badIndex. .2.1.If appendIf is not present, no lock is required for that particular stream. 3. Append data to the stream, set tag metadata, and establish a new last_index. 7. Collect last_index for each stream and build a response array. [ { "id": " <esid0>", "ref": "<client reference>", "result": "ok", "index": <esid0.last_index> }, { "id": " <esid1>", "ref": "<client reference> ", "result": "ok", "index":<esid1.last_index> } ] 8. Unlock any locked streams. 9.Return the response array.
[0208] Following the operation, multiple event streams ES n=1 to M are provided to the blockchain to be settled on-chain in a single multi-input / multi-output rendezvous or atomic transaction. During on-chain settlement, the API in step 902 collects each of the M event streams to be settled on-chain and groups them into a single blockchain rendezvous transaction.
[0209] Figure 9a shows that in addition to the benefits associated with atomic or rendezvous transactions discussed above, the event data E n In addition to the above, an embodiment of a fourth aspect is shown in which it may also be necessary to track state associated with multiple event streams involved in synchronization. Thus, in this embodiment, an atomic blockchain transaction may be performed on each of the multiple event streams involved, ES n associated with an additional output that tracks the state of
[0210] It can be understood that steps 902 through 908 of FIG. 9 occur before FIG. 9a.
[0211] In step 902a, an atomic blockchain transaction is created to generate multiple event streams ES n=1 to M Each event stream involved in ES n For,a,,,a dust input,i.e.,an input that consumes the dust of the,previous blockchain transaction, is provided.
[0212] In step 904a, each stream ES in the atomic blockchain transaction n An index x associated with the dust input for is identified. This index x is identified for each participating event stream. As noted above, each event stream contains event data E n or its own OP_RETURN output for metadata. Thus, a one-to-one mapping of dust inputs and dust outputs, as described in step 910 of Figure 9, may or may not record and / or track state associated with each participating event stream of the plurality M. Thus, the index x in this step is used in a regular or arbitrary manner or pattern to map dust inputs to respective outputs of transactions associated with a given event stream. The indexes for an atomic blockchain transaction with M event streams range from 0 to M-1.
[0213] In step 906a, to synchronize the M participating event streams using atomic blockchain transactions, the inputs and outputs follow a regular pattern where a dust input at index x is mapped or linked to a stored output at index 2x.
[0214] Then, in step 908a, each event stream ES n The state of is provided at the output stored at index 2x+1.
[0215] Such a mapping of outputs to 2x and states to 2x+1 is done by the first event stream ES with index x=0 of the rendezvous or atomic transaction. n=1 It would be advantageous if each event stream could be tracked based on a simple offset of the input index x, which would be the same as a standard event stream blockchain transaction and could be tracked accordingly, and additional streams could be tracked based on a simple offset of the input index x. Thus, an auditor or validating entity can identify where the output of each event stream is if they know the index x of that input. This index could be provided to the validating entity by the platform processor, or the index x could be obtained by scanning all inputs of the event stream.
[0216] Instead of the above mapping patterns, in some embodiments, it may be possible to arbitrarily map outputs (Dust and OP_RETURN) using any pattern for a given input, if the platform processor or API records the selected pattern and makes it available to clients and / or auditors. In addition, OP_RETURN may contain the state of the event stream, which may be used to map the output of a particular event stream ES. n The OP_RETURN may also contain an initiating transaction identifier TxID that allows an auditor to identify the OP_RETURN that belongs to the transaction.
[0217] In some embodiments, event streams involved in atomic or rendezvous transactions may frequently be involved in other atomic or rendezvous transactions, creating complex stream interactions. Thus, in some embodiments, it may be advantageous to record a dust input index and a dust output index, as well as a data storage output index, for each event stream, although it may be possible, and sometimes sufficient, to record only the dust input index and derive the other two.
[0218] FIG. 12 shows an example of three event streams involved in a rendezvous or atomic blockchain transaction based on the method described above in FIG. 9a.
[0219] In this diagram, A, B, and C represent three normal event streams proceeding separately. The first three rows represent three normal on-chain transactions (shown in Figures 5 to 7 of the third embodiment), and the fourth row represents a rendezvous or atomic transaction according to the fourth embodiment that synchronizes these three event streams A, B, and C together. Finally, the fifth row returns to the normal state after synchronization.
[0220] In this diagram, the input and output placement of C is identical even when going through rendezvous / atomic transactions. The streams of A and B differ by the offset of their input indexes.
[0221] Based on the mapping for tracking the state of each event stream as described in Figure 9a, the input index x in an atomic transaction for event stream C in is x = 0. The position of the atomic transaction in each stream A is given by N + 3, where N is the first position or index for event stream C.
[0222] Similarly, for stream B, the input index within the atomic transaction for event stream B in is x=1. The atomic transaction position of each atomic transaction within stream A is given by M+3, where M is the first position or index with respect to event stream B. Also, for stream A, the input index x within the atomic transaction for event stream A in is x=3. The atomic transaction position within each atomic transaction within stream A is given by L+3, where L is the first position or index with respect to event stream A.
[0223] Therefore, the mapping pattern for stream C is Input at x=0 Output at 2x=0 State of C when 2x+1=1 is.
[0224] The mapping pattern for stream B is: Input at x=1 Output at 2x=2 State of B when 2x+1=3 is.
[0225] The mapping pattern for stream A is: Input at x=2 Output at 2x=4 State of A when 2x+1=5 is.
[0226] Figure 10 relates to a fourth aspect of the disclosure and illustrates a computer-implemented method for accessing a platform or data writing service for synchronizing event streams associated with a blockchain, such as platform 100 shown in Figure 1 or platform 300 in Figure 3. The method of Figure 10 is implemented by one or more processors associated with a client.
[0227] In step 1002, an application programming interface (API) endpoint associated with the platform for synchronizing event streams is identified. This API may be made available to clients by one or more known means of delivering APIs. As discussed in connection with FIG. 8, this may be an API associated with the host platform processor for providing data writing services, or it may be a separate API specialized for synchronizing multiple event streams.
[0228] In step 1004, the client selects an event E for synchronizing or adding to multiple M event streams ESn=1 to M. n As mentioned above, multiple M event streams ES n=1 to M An identifier for and / or a target index for each of the multiple event streams may also be included in the request.
[0229] In step 1006, since the platform processor is implemented as an HTTP or REST API, the request prepared in step 1004 is sent using Hypertext Transfer Protocol (HTTP) or a similar transmission protocol format. The request is sent as a JSON object, as described above in connection with FIG. 9.
[0230] In step 1008, results associated with each of the M event streams are received. n If event E is not attached to any of the event streams, the result is an error message. n If the event streams ES are successfully appended to all of the M event streams, in some embodiments, the API appends the event streams ES to the event streams ES. n=1 to M In some embodiments, the event E n A result associated with the output script of the atomic blockchain transaction for is also received. The result is provided to the client in an HTTP transmission protocol format. In some embodiments, the result may be stored in a log separate from the blockchain within or associated with the platform processor.
[0231] Turning now to FIG. 13 , an exemplary simplified block diagram of a computing device 2600 that may be used to implement at least one embodiment of the present disclosure is provided. In various embodiments, the computing device 2600 may be used to implement any of the systems illustrated and described above. For example, the computing device 2600 may be configured to be used as one or more components of the illustrated DBMS, or the computing device 2600 may be configured to be a client entity associated with a given user, where the client entity makes database requests to a database managed by the DBMS of FIG. 13 . Thus, the computing device 2600 may be a portable computing device, a personal computer, or any electronic computing device. As shown in FIG. 13 , the computing device 2600 may include one or more processors (collectively labeled 2602) having one or more levels of cache memory and a memory controller configured to communicate with a storage subsystem 2606, which includes a main memory 2608 and persistent storage 2610. The main memory 2608 may include dynamic random access memory (DRAM) 2618 and read only memory (ROM) 2620 as shown. The storage subsystem 2606 and cache memory 2602 may be used for storage of information such as details related to transactions and blocks as described in this disclosure. The processor 2602 may be utilized to provide the steps or functions of any embodiment as described in this disclosure.
[0232] The processor 2602 may also be in communication with one or more user interface input devices 2612 , one or more user interface output devices 2614 , and a network interface subsystem 2616 .
[0233] The bus subsystem 2604 may provide a mechanism for allowing the various components and subsystems of the computing device 2600 to communicate with each other as intended. Although the bus subsystem 2604 is shown schematically as a single bus, alternative embodiments of the bus subsystem may utilize multiple buses.
[0234] The network interface subsystem 2616 may provide an interface to other computing devices and networks. The network interface subsystem 2616 may act as an interface for receiving data from and transmitting data to other systems from the computing device 2600. For example, the network interface subsystem 2616 may allow a data technician to connect the device to a network so that they may be able to send data to and receive data from the device while at a remote location, such as a data center.
[0235] The user interface input devices 2612 may include one or more user input devices such as a keyboard, a pointing device such as an integrated mouse, trackball, touchpad, or graphics tablet, a scanner, a barcode scanner, a touchscreen integrated into a display, a voice recognition system, an audio input device such as a microphone, and other types of input devices. In general, use of the term "input device" is intended to encompass all possible types of devices and mechanisms for inputting information into the computing device 2600.
[0236] The one or more user interface output devices 2614 may include a display subsystem, a printer, or a non-visual display such as an audio output device. The display subsystem may be a cathode ray tube (CRT), a flat panel device such as a liquid crystal display (LCD), a light emitting diode (LED) display, or a projection or other display device. In general, use of the term "output device" is intended to include all possible types of devices and mechanisms for outputting information from computing device 2600. The one or more user interface output devices 2614 may be used, for example, to present a user interface that facilitates user interaction with applications that perform the described processes and variations thereof, when such interaction may be appropriate.
[0237] The storage subsystem 2606 may provide a computer-readable storage medium for storing basic programming and data constructs that may provide the functionality of at least one embodiment of the present disclosure. Applications (programs, code modules, instructions), which when executed by one or more processors, may provide the functionality of one or more embodiments of the present disclosure, may be stored within the storage subsystem 2606. These application modules or instructions may be executed by the one or more processors 2602. The storage subsystem 2606 may further provide a repository for storing data used in accordance with the present disclosure. For example, the main memory 2608 and the cache memory 2602 may provide volatile storage for programs and data. The persistent storage 2610 may provide persistent (non-volatile) storage for programs and data and may include flash memory, one or more solid-state drives, one or more magnetic hard disk drives, one or more floppy disk drives with associated removable media, one or more optical drives (e.g., CD-ROM, DVD, or Blue-Ray) with associated removable media, and other similar storage media. Such programs and data may include programs for performing the steps of one or more embodiments as described in this disclosure, as well as data related to transactions and blocks as described in this disclosure.
[0238] The computing device 2600 may be of various types, including a portable computer device, a tablet computer, a workstation, or any other device described below. Additionally, the computing device 2600 may include another device that may be connected to the computing device 2600 via one or more ports (e.g., USB, headphone jack, Lightning connector, etc.). A device that may be connected to the computing device 2600 may include multiple ports configured to accept fiber optic connectors. The device may thus be configured to convert optical signals into electrical signals that may be transmitted through ports connecting the device to the computing device 2600 for processing. Due to the ever-changing nature of computers and networks, the description of the computing device 2600 shown in FIG. 13 is intended only as a specific example to illustrate a preferred embodiment of the device. Many other configurations are possible, having more or fewer components than the system shown in FIG. 13.
[0239] Enumerated exemplary embodiments To better illustrate, explain, and understand the claimed aspects and embodiments, the present disclosure will now be discussed based on the following clauses related to the above aspects, which are provided herein as exemplary embodiments.
[0240] 1. A computer-implemented method for synchronizing multiple event streams associated with a blockchain, the method being implemented by a platform processor associated with an application programming interface (API), the method comprising: Multiple existing event streams related to blockchain n=1 to M receiving a request from a client to update n, where n is an integer from 1 to M, and M≧2; Multiple M event streams ES n=1 to M Each event stream ES n The current event E to be added to n from the request; Each event stream ES n About Event Stream ES n Previous blockchain transaction related to TX n-1 and identifying Multiple M event streams ES n=1 to M To synchronize multiple M event streams, n=1 to M Each event stream ES n The current event E to be added to n Atomic blockchain transaction TX n Steps to create Includes atomic blockchain transactions TX n but, There are n=M inputs, and each nth input is a respective event stream ES n Previous transaction TX n-1 and n=M inputs consuming dust outputs related to For each of the n inputs, a respective event stream ES n Atomic transaction TX associated with n Each unspent transaction output (UTXOn_dust) is the nth dust output with respect to Current Events n The unconsumed transaction output (UTXOn_data) associated with the event data represents Including, Computer-implemented methods.
[0241] 2. Multiple M event streams ES n=1 to M Each event stream ES n Regarding the method, each event stream ES n 2. The method of claim 1, comprising mapping dust-related inputs to respective outputs based on an arbitrary or regular pattern to track the state of the dust.
[0242] 3.x, each stream ES n is the index associated with the nth input with respect to Mapping the nth input dust at index x to the stored output at index 2x; Event Stream ES n based on the output stored at index 2x+1; Provided by An input index x is provided for an atomic blockchain transaction, ranging from 0 to M-1. The method described in clause 2.
[0243] 4. The method of any one of clauses 1 to 3, wherein the API is associated with a Hypertext Transfer Protocol (HTTP) endpoint and the requests received from the client are based on the HTTP transmission protocol format.
[0244] 5. The method of any one of clauses 1 to 4, wherein the endpoint is a separate and / or specific endpoint for synchronizing multiple event streams.
[0245] 6. Multiple Event Streams n=1 to M Each event stream is provided in a request from the client. n 6. The method of any one of clauses 1 to 5, comprising identifying based on an identifier relating to
[0246] 7. Current Events E n Multiple event streams for appending n=1 to M One or more event streams from ES n 7. The method of any one of clauses 1 to 6, comprising obtaining a target index for
[0247] 8. One or more event streams from multiple ES n 8. The method of claim 7, wherein a target index for is provided in a request from a client.
[0248] 9. The method of any one of clauses 4 to 8, wherein the request is associated with a digital signature.
[0249] 10. Event Stream ES n is the same as the target index for the respective event stream ESn, the method comprising: Current Events n the respective event streams ES n adding to Otherwise, the method includes generating an error notification. The method described in clause 7 or 8.
[0250] 11. Current Events E n is an event stream ES with multiple M n=1 to M or until an error message is generated for one or more of the event streams in the plurality of event streams. n 11. The method of any one of clauses 1 to 10, comprising locking
[0251] 12. The dust input index for each of the n=M inputs of an atomic blockchain transaction is the respective event stream ES associated with the nth input. n 12. The method described in any one of clauses 1 to 11, as recorded in
[0252] 13. The dust output index and / or event data index for each of the n=M inputs of an atomic blockchain transaction are stored in the respective event stream ES associated with the nth input. n the method described in clause 10, as recorded in
[0253] 14. Each event stream ES among multiple M event streams n Regarding the method, each event stream ES n 14. The method of any one of clauses 1 to 13, comprising creating a unique key pair for each index associated with
[0254] 15. Each event stream ES among multiple M event streams n But K=K 0 to i and i is associated with a key chain K such that i is a given event stream ES n an integer representing the current index value or length or current number of events associated with Given an event stream ES n The identified previous transaction TX n-1 The key pair K associated with i-1 obtaining a Given an event stream ES n Current Events on E n The key pair K for i and deriving Includes atomic blockchain transactions TX n The consumption of the n-th input with respect to each event stream ES n The key pair K obtained for the previous transaction i-1 Approved using Each nth dust output is a corresponding event stream ES n The key pair K derived for i Related to lock scripts protected using 15. The method according to any one of clauses 1 to 14.
[0255] 16. Atomic blockchain transactions are Inputs related to digital assets; one or more change outputs associated with the digital asset; further comprising: 16. The method according to any one of clauses 1 to 15.
[0256] 17. The method set forth in clause 15, in which the Digital Assets are associated with the operational float.
[0257] 18. Current Events E n Multiple M event streams n=1 to M In response to appending to each of the event streams ES n obtaining a new current index value for each of providing a response array of new index values obtained for the multiple M event streams; 18. The method according to any one of clauses 1 to 17, comprising:
[0258] 19. Atomic Blockchain Transaction TX n to the blockchain; Multiple synchronized event streams ES n=1 to M sending results associated with each of the 19. The method according to any one of clauses 1 to 18, comprising:
[0259] 20. The method of clause 19, wherein the submitting step includes including the atomic transaction in a subsequent block associated with the blockchain to be mined.
[0260] 21. Multiple Event Streams ES n=1 to M The results associated with each of the following are: Event E n the atomic blockchain transaction identifier by which the transaction was submitted to the blockchain; Merkle inclusion proofs of atomic blockchain transactions to headers in the blockchain, A copy of the block header containing the atomic blockchain transaction including a certificate verifying at least one of 2. The method described in clause 19 or 20.
[0261] 22. The method of any one of clauses 19 to 21, wherein the result further comprises the response sequence of clause 18.
[0262] 23. The method of any one of clauses 19 to 22, wherein the results are transmitted to the client based on the Hypertext Transfer Protocol (HTTP) transmission protocol format.
[0263] 24. Multiple Event Streams ES n=1 to M The current E n 24. The method of any one of clauses 1 to 23, wherein the event data relating to is the same for all event streams in the plurality.
[0264] 25. Multiple Event Streams ES n=1 to M The current E n 24. The method of any one of clauses 1 to 23, wherein the event data associated with the event streams is different for one or more of the event streams in the plurality of event streams.
[0265] 26. Multiple Event Streams ES n=1 to M The current E n 26. The method of any one of clauses 1 to 25, wherein the event data relating to the
[0266] 27. Multiple Event Streams ES n=1 to M The current E n 24. The method of any one of clauses 1 to 23, wherein the event data relating to the
[0267] 28. A computer-implemented method for requesting synchronization of multiple M event streams in a blockchain, where M≧2, the method being implemented by one or more processors of a given client of the multiple clients, the method comprising: obtaining or identifying an application programming interface (API) endpoint associated with one or more processors associated with the platform for providing a data writing service for synchronizing event streams; Event E n to a plurality of event streams, the request being transmitted in accordance with a Hypertext Transfer Protocol (HTTP) transmission protocol format; Requested event E n receiving a result associated with an output script of the atomic blockchain transaction associated with the Including, Computer-implemented methods.
[0268] 29. The method of clause 28, wherein an identifier for each of a plurality M of event streams is included in the request.
[0269] 30. The method of clause 28 or 29, comprising including in the request a target index value for each of a plurality M of event streams.
[0270] 31. A computing device comprising a processor and a memory, the memory including executable instructions that, when executed by the processor, cause the device to perform the computer-implemented method of any one of clauses 1 to 27, the computing device being associated with a platform processor.
[0271] 32. A device computing device comprising a processor and a memory, the memory including executable instructions that, when executed by the processor, cause the device to perform a computer-implemented method according to any one of clauses 28 to 30, and the computing device is associated with a client.
[0272] 33. A computer system comprising at least one platform processor communicatively coupled to at least one client via a wireless communications network, wherein the at least one platform processor is associated with an application programming interface (API) endpoint for processing HTTP requests from the at least one client, the at least one platform processor being implemented in accordance with the computing device described in clause 31, and the at least one client being implemented in accordance with the computing device described in clause 32.
[0273] 34. A computer-readable storage medium having stored thereon executable instructions which, when executed by a computer processor, cause the computer to perform the method of any one of clauses 1 to 30.
[0274] The above aspects and embodiments illustrate, rather than limit, the present disclosure, and it should be noted that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the present disclosure, as defined by the appended claims. In the claims, any reference signs placed in parentheses shall not be construed as limiting the scope of the claim. The use of terms such as "comprising" and "comprises" does not exclude the presence of elements or steps other than those listed in any claim or the specification as a whole. As used herein, "comprising" means "including or consisting of," and "comprising" means "comprising or consisting of." A reference to an element in the singular does not exclude a reference to a plural of such element, and vice versa. The present disclosure may be implemented by hardware comprising several distinct elements and by a suitably programmed computer. In a device claim enumerating several means, these means may be embodied by one and the same item. The mere fact that certain means are recited in mutually different dependent claims does not indicate that a combination of these means cannot be used to advantage. [Explanation of symbols]
[0275] 100 Platform Processors, Platform Services, Platform 102 Data Services, Service Modules or Processing Resources 104 Computational Services, Service Modules or Processing Resources 106 Commerce Services, Service Modules or Processing Resources 108 API 110 Underlying Software 300 Platform 302 Data services, data writing services 302a Data writer service, data writer 302b Data Reader Service 304 Commerce Services 304a Enterprise Wallet 310 Blockchain 306 Computational Services 306a Application 306b Framework 308 SPV Services 310 Blockchain 2600 Computing Devices 2602 processor, cache memory 2604 Bus Subsystem 2606 Storage Subsystem 2608 main memory 2610 Persistent Storage 2612 User Interface Input Device 2614 User Interface Output Device 2616 Network Interface Subsystem 2618 Dynamic Random Access Memory (DRAM) 2620 Read-Only Memory (ROM)
Claims
1. 1. A computer-implemented method for synchronizing multiple event streams associated with a blockchain, the method being implemented by a platform processor associated with an application programming interface (API), comprising: receiving a request from a client to update a plurality of existing event streams associated with the blockchain; obtaining from the request a current event to be added to each event stream; For each of the event streams, a previous blockchain transaction TX associated with the event stream n-1 and identifying An atomic blockchain transaction TX for the current event to be appended to each event stream to synchronize the event streams. n Steps to create the atomic blockchain transaction TX n but, For each said event stream: The input is the previous transaction TX of the event stream. n-1 The dust output associated with the input and The atomic blockchain transaction TX associated with the event stream n Each unspent transaction output (UTXO) is a dust output n_dust )and, The unspent transaction output (UTXO) associated with the event data representing the current event n_data )and Including, Computer-implemented methods.
2. 10. The method of claim 1, comprising, for each event stream of the plurality of event streams, mapping dust-related inputs to respective outputs based on an arbitrary or regular pattern to track the state of each event stream.
3. x is an index associated with an entry for each event stream, and the regular pattern is mapping the dust of input at index x to the stored output at index 2x; identifying the state of each of the event streams based on the output stored at index 2x+1; Provided by An input index x is provided for the atomic blockchain transaction, ranging from 0 to M-1, where M is the number of event streams. The method of claim 2.
4. 4. The method of claim 1, wherein the API is associated with a Hypertext Transfer Protocol (HTTP) endpoint, and the request received from the client is based on an HTTP transmission protocol format.
5. The method of claim 4 , wherein the endpoints are distinct and / or specific endpoints for synchronizing the multiple event streams.
6. 6. The method of claim 1, comprising identifying the plurality of event streams based on an identifier for each event stream of the plurality of event streams provided in a request from the client.
7. The method of claim 1 , comprising obtaining a target index for one or more of the plurality of event streams to append the current event to.
8. The method of claim 7 , wherein the target index for the one or more event streams of the plurality of event streams is provided in the request from the client.
9. The method of claim 4 , wherein the request is associated with a digital signature.
10. based on a determination that the actual next available index value for the event stream is the same as the target index value for the respective event stream; appending the current event to the respective event stream; otherwise, generating an error notification.
9. The method of claim 7 or 8.
11. 11. The method of claim 1, further comprising locking each event stream associated with the request from the client until the current event has been appended to each of the plurality of event streams or until an error message has been generated for one or more of the event streams in the plurality.
12. 12. The method of claim 1, wherein a dust input index for each of the inputs of the atomic blockchain transaction is recorded in the respective event stream associated with the input.
13. 11. The method of claim 10, wherein a dust output index and / or an event data index for each of the inputs of the atomic blockchain transaction is recorded in the respective event stream associated with the input.
14. 14. The method of claim 1, comprising, for each event stream of the plurality of event streams, creating a unique key pair for each index associated with the respective event stream.
15. Each event stream of the plurality of event streams is such that K=K 0 to i i is an integer representing a current index value or length or current number of events associated with a given event stream, and the method comprises: the identified previous transaction TX for the given event stream n-1 The key pair K associated with i-1 obtaining a a key pair K for the current event for the given event stream i and deriving the atomic blockchain transaction TX n The consumption of the respective inputs for i-1 Approved using Each nth dust output is the key pair K derived for the respective event stream. i Related to lock scripts protected using 15. The method of any one of claims 1 to 14.
16. The atomic blockchain transaction: Inputs related to digital assets; one or more modified outputs associated with said digital asset; further comprising:
16. The method according to any one of claims 1 to 15.
17. 17. The method of claim 16, wherein the digital asset is associated with an operational float.
18. responsive to appending the current event to each of the plurality of event streams, obtaining a new current index value for each of the event streams; providing a response array of the new index values obtained for the plurality of event streams; 18. The method of any one of claims 1 to 17, comprising:
19. The atomic blockchain transaction TX n to the blockchain; sending results associated with each of the plurality of event streams to the client; 19. The method of any one of claims 1 to 18, comprising:
20. 20. The method of claim 19, wherein the submitting step comprises including the atomic blockchain transaction in a subsequent block associated with the blockchain to be mined.
21. The results associated with each of the plurality of event streams include: an atomic blockchain transaction identifier by which the event was submitted to the blockchain; a Merkle inclusion proof of the atomic blockchain transaction into a header in the blockchain; A copy of the block header containing the atomic blockchain transaction including a certificate verifying at least one of 21. The method of claim 19 or 20.
22. 22. The method of any one of claims 19 to 21, wherein the result further comprises the response sequence of claim 18.
23. 23. The method of any one of claims 19 to 22, wherein the results are sent to the client based on a Hypertext Transfer Protocol (HTTP) transmission protocol format.
24. 24. The method of claim 1, wherein the event data related to the current event for synchronizing the plurality of event streams is the same for all event streams in the plurality.
25. 24. The method of claim 1, wherein the event data related to the current event for synchronizing the multiple event streams is different for one or more of the event streams in the multiple event streams.
26. 26. The method of claim 1, wherein the event data related to the current event for synchronizing the multiple event streams includes metadata.
27. 24. The method of claim 1, wherein the event data related to the current event for synchronizing the multiple event streams includes only metadata.
28. 1. A computer-implemented method for requesting synchronization of multiple M event streams in a blockchain, where M≧2, the method being implemented by one or more processors of a given client of a plurality of clients, the method comprising: obtaining or identifying an application programming interface (API) endpoint associated with one or more processors associated with the platform for providing a data writing service for synchronizing event streams; Event E n to the plurality of event streams, wherein the request is transmitted according to a HyperText Transfer Protocol (HTTP) transmission protocol format; The requested event E n receiving a result associated with an output script of an atomic blockchain transaction associated with the block chain, the result being received based on the HTTP transmission protocol format; Including, Computer-implemented methods.
29. 30. The method of claim 28, wherein an identifier for each of the plurality M of event streams is included in the request.
30. 30. The method of claim 28 or 29, comprising including a target index value for each of the plurality M of event streams in the request.
31. 28. A computing device comprising a processor and a memory, the memory including executable instructions that, when executed by the processor, cause the device to perform the computer-implemented method of any one of claims 1 to 27, the computing device being associated with a platform processor.
32. 31. A computing device comprising a processor and a memory, the memory including executable instructions that, when executed by the processor, cause the device to perform the computer-implemented method of any one of claims 28 to 30, the computing device being associated with a client.
33. 32. A computer system comprising at least one platform processor communicatively coupled to at least one client via a wireless communications network, the at least one platform processor associated with an application programming interface (API) endpoint for processing HTTP requests from the at least one client, the at least one platform processor implemented in accordance with the computing device of claim 31, and the at least one client implemented in accordance with the computing device of claim 32.
34. 28. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor of a computer, cause the computer to perform the method of any one of claims 1 to 27.
Citation Information
Patent Citations
Computer-implemented system and method
GB201907180D0
Application programming interface for data transfer and bus management over the bus
JP2000510659A
US16/384696
Methods and apparatus for efficiently implementing a distributed database within a network
WO2019014337A1
Secure permissioning of access to user accounts, including secure distribution of aggregated user account data
WO2019200402A1