Block chain oracle machine method and system based on zero knowledge proof

Through zero-knowledge proof technology, it solves the problem of insufficient credibility of trust endorsement and reward and punishment incentive mechanisms in blockchain data verification, achieves flexible and credible data verification and processing, and enhances the security and efficiency of blockchain data. .

CN118536167APending Publication Date: 2024-08-23王家天 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410198332.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-02-15
Filing Date
2024-02-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing blockchain data verification solutions have insufficient credibility in the trust endorsement and reward and punishment incentive mechanisms, making it difficult to effectively verify the correctness of data and prevent large-scale data fraud.

Method used

Using zero-knowledge proof (zkp) technology, through the zkOracle system and zkMiddleware structure, it provides blockchain-based trusted data collection, verification and processing capabilities, and uses primitives such as chain consensus verification and block authentication to achieve mathematical logic verification of data. Reduce computational redundancy and improve verification efficiency.

Benefits of technology

It achieves flexible and trustworthy verification of blockchain data, reduces proof time and computational complexity, enhances data reliability and security, and supports decentralized zkOracle network and customized computing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536167A_ABST
    Figure CN118536167A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure are directed to systems and methods for a zero knowledge (zk) oracle system that executes customized compute code for a blockchain application and protects execution results by providing one or more zero knowledge attestation (zkp). The present disclosure provides a zk middleware structure (or blockchain middleware) and how zero knowledge proof is applied to verify blockchain status. This in turn enables data collection, verification, and processing capabilities for blockchain-based applications by establishing credibility and trust only based on verifiable blockchain technologies, computations, and underlying mathematics.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims U.S. Provisional Application No. 63 / 447,615, filed on February 22, 2023, entitled “Blockchain Oracle Methods and Systems Based on Zero-Knowledge Proof”, U.S. Provisional Application No. 63 / 449,812, filed on March 3, 2023, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof”, U.S. Provisional Application No. 63 / 614,662, filed on December 25, 2023, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof”, U.S. Provisional Application No. 64 / 023,451, filed on January 19, 2024, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof”, and U.S. Provisional Application No. 64 / 023,451, filed on January 19, 2024, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof”, and U.S. Provisional Application No. 64 / 023,451, filed on January 19, 2024, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof” The entire contents of which are incorporated herein by reference.

[0003] This application is related to U.S. patent application 18443217, which is filed concurrently and is co-pending, entitled “Blockchain Middleware Methods and Systems Based on Zero-Knowledge Proof With Recursive Prover”, authored by Wang Jiatian and Yu Xiaohang, and owned by the applicant of this application, and is incorporated herein by reference. Technical Field

[0004] The present disclosure relates generally to blockchain technology, and more particularly to a blockchain middleware system with zero-knowledge proof. Background Art

[0005] At present, solutions for trusted verification of the correctness, validity and availability of the source, processing and delivery of blockchain data are generally divided into two types. The first type is usually called "trust endorsement" in centralized scenarios. Social credit such as business reputation is used to ensure data credibility through methods such as trust endorsement. The second type is called "reward and punishment incentives" in decentralized scenario competitions. A certain degree of credibility is maintained through a reward and punishment mechanism linked to economic incentives, that is, rewarding honest participants and punishing malicious or inactive participants. Although "trust endorsement" and "reward and punishment incentives" are widely used in the blockchain industry, both conventional solutions have obvious shortcomings, some of which are constrained by the degree of technological progress.

[0006] In the trust endorsement scheme, data consumers are required to unconditionally trust the collection, verification and processing of data. Data consumers have almost no effective means to verify the correctness of the data or quantify the degree of trust. If data falsification occurs, it is more challenging for data consumers to provide proof. In addition, there are no clear penalties for the business reputation that provides the basis for trust. Even if there is solid evidence to prove that it has falsified the data, it is difficult for the falsifier to be punished accordingly and difficult to change the status quo.

[0007] In a reward-and-punishment incentive scheme, credibility can only be maintained at a certain level (within the range of rewards and punishments). When the benefits of data falsification are greater than the rewards and punishments, the incentive of rewards and punishments fails, and the possibility of data falsification increases with the increase in the benefits of falsification. When there are considerable benefits, large-scale data falsification is likely to occur. Rewards and punishments are used as ex post punishments, that is, before the data is provided to consumers and has actual effects, the credibility of the data cannot be guaranteed.

[0008] Therefore, it is hoped that there will be methods and systems to provide more reliable data trust verification solutions in cryptography and blockchain technology. Summary of the invention

[0009] Embodiments of the present disclosure are directed to systems and methods for zero-knowledge (zk) oracle (zkOracle) systems that execute custom computational code for blockchain applications and ensure the security of the execution results by providing one or more zero-knowledge proofs (zkp). The present disclosure provides a zk middleware (zkMiddleware) structure (or blockchain middleware) and how to apply zero-knowledge proofs to verify blockchain states. This in turn establishes credibility and trust based only on verifiable blockchain technology, computation, and underlying mathematics, enabling data collection, verification, and processing capabilities for blockchain-based applications.

[0010] In some embodiments as described herein, the present disclosure provides a concise zero-knowledge proof that converts data processing calculations into mathematical logic such as polynomial equations and generates proofs. The proof size and the complexity of the verification calculation do not increase with the complexity of the problem being proved. Another feature of the present disclosure is a data processing module, characterized by steps for on-chain data processing (for the purpose of verification): data pairing verification, data cleaning, custom calculations. Another feature is the interaction of the prover and the verifier, characterized by the relationship and interaction between the prover and the verifier to eliminate unnecessary computational redundancy, which reduces the demand for on-chain data and achieves a shorter proof time. In addition, another feature is a prover and a core circuit, characterized by using a core circuit in a prover having the following two core components: chain consensus verification and block attestation to achieve off-chain verification. For chain consensus verification and block attestation, the present disclosure provides one or more computational methods involving primitives such as recursive proofs. In addition, the verifier is characterized by the content included and specifies several types, such as a verifier for common sense in zkp.

[0011] Zk middleware is applied to blockchain, which provides flexible and reliable data collection, verification and processing capabilities for blockchain-based applications, and establishes credibility based on strict verification based on mathematical formulas.

[0012] In one embodiment, a first feature of the present disclosure is directed to a method and system for building a decentralized and permissionless zkOracle network, designed to allow anyone to run a zkOracle validator and contribute to the decentralized zkOracle service.

[0013] In one embodiment, a second feature of the present disclosure is directed to a method and system for building a zk circuit for all Ethereum on-chain data, which enables a zkOracle service to use local and real-time Ethereum on-chain data.

[0014] In one embodiment, a third feature of the present disclosure is directed to a method and system capable of proving historical Ethereum data, which is applicable to both on-chain and off-chain scenarios.

[0015] In one embodiment, a fourth feature of the present disclosure is directed to a method and system for providing the ability to assemble zk circuits and generate zk proofs for custom computations (note that in conventional solutions, previous applications only support zk circuits for predefined and fixed logic).

[0016] In one embodiment, a fifth feature of the present disclosure is directed to a method and system to provide a method and system for verifying zk proofs and data in use provided by a zkOracle verifier. After finalizing the workflow of the zkOracle by verifying the proof, the present disclosure provides a method and system for using the data provided by the zkOracle and protected by the zk proof. In this embodiment, the present disclosure is directed to a zkOracle-specific verifier (rather than a general-purpose zk verifier).

[0017] In one embodiment, the sixth feature of the present disclosure is directed to a method and system that can generate zk proofs in a decentralized manner, supporting the concept of a "decentralized" zkOracle network, thereby lowering the threshold for ordinary users to participate in the proof process and contribute to the zkOracle network.

[0018] In a first aspect of the present disclosure directed to a zkOracle validator circuit architecture, in summary, a system includes: a chain consensus validation circuit (310) for implementing a first set of constraints between a historical block hash and a latest block hash; a chain state authentication circuit (320) coupled to the chain consensus validation circuit for implementing a second set of constraints between the latest block hash and block events and states; a custom computation authentication circuit (330) for implementing a third set of constraints between block events and states and result data; and an aggregation circuit (340) communicatively coupled to the chain consensus validation circuit, the chain state authentication circuit, and the custom computation authentication circuit for aggregating a plurality of proofs generated from the chain consensus validation circuit, the chain state authentication circuit, and the custom computation authentication circuit. In addition, a method includes: receiving blockchain data; determining at least one constraint set for the received blockchain data; generating at least one proof, each proof being associated with a constraint set in the at least one constraint set; and aggregating the one or more proofs into a single proof for processed blockchain data derived from the received blockchain data.

[0019] In a second aspect of the present disclosure directed to a chain state checker circuit and method, a system includes: a state variable authentication circuit (530) for implementing at least one first set of constraints between at least one target event and a block hash and generating a state sub-proof; an event authentication circuit (520) for implementing at least one second set of constraints between at least one state variable and the block hash and generating an event sub-proof; and a transaction authentication circuit (540) for implementing at least one third set of constraints between a target transaction and the block hash and generating a transaction sub-proof. The state variable authentication circuit, the event authentication circuit, and the transaction authentication circuit may generate a chain state proof, the chain state proof including the event sub-proof, the state sub-proof, and the transaction proof. Each of the state variable authentication circuit, the event authentication circuit, and the transaction authentication circuit may include a hashing sub-circuit and a Merkle Patricia Trie (MPT) verification sub-circuit, the hashing sub-circuit being adapted to set at least one constraint between a block hash and a root (i.e., a state root, a receipt root, or a transaction root). The MPT verification subcircuit is adapted to set at least one constraint between a root, a Merkle Patricia Trie (MPT) proof, and a target data. The event circuit (520) may be configured to receive inputs of the receipt root (581) and the raw receipt data (582); the state circuit (530) may be configured to receive inputs of the state root (583) and the state path proof (584); and the transaction circuit (540) may be configured to receive inputs of the transaction root (585) and the raw transaction data (586). Each respective output from the event circuit (502), the state circuit (530), and the transaction circuit (540) may be sent to a chain state proof (560); and wherein the chain state proof receives three sub-proofs: an event proof (561) from the event circuit (520), a state proof (562) from the state circuit (530), and a transaction proof (563) from the transaction circuit (540). The system includes a zero-knowledge system. In addition, the zero-knowledge method includes: converting a plurality of known algorithms into a circuit having a plurality of constraint sets; and establishing a constraint set in the plurality of constraint sets for each of the known algorithms.

[0020] Alternatively, the state variable authentication circuit may include an event authentication circuit, and the transaction authentication circuit generates an Ethereum chain state proof, the Ethereum chain state proof including the event proof, the state proof and the transaction proof. Each corresponding output from the event circuit (502), the state circuit (530) and the transaction circuit (540) is sent to the Ethereum chain state proof (560); and wherein the Ethereum chain state proof receives three sub-proofs: an event proof (561) from the event circuit (520), a state proof (562) from the state circuit (530) and a transaction proof (563) from the transaction circuit (540).

[0021] In a third aspect of the present disclosure directed to a custom computation proof verifier, a custom computation authentication verifier in a zkOracle system includes: receiving at least one custom computation code and an input sequence; decoding and transforming the at least one custom computation code to assemble at least one custom circuit; and processing the input sequence by the at least one custom circuit to generate a custom proof. The step of receiving the input sequence may include at least a public input and at least one witness input. The decoding and transformation steps may include a multi-stage solution having a setup phase and a proof phase. The setup phase may include the zkOracle system decoding the custom computation code and transforming the custom computation code into at least one pre-processed circuit. The proof phase may include the zkOracle system processing in the execution trace of the custom computation code for the public input and witness input, and then generating at least one circuit. The zkOracle system may generate at least one proof based on the circuits from the setup phase and the proof phase.

[0022] In a fourth aspect of the present disclosure directed to proof verification, an on-chain verification method for verifying a zk proof for an input includes: receiving on-chain data, derived data, and a zk proof for the on-chain data and the derived data; and verifying the zk proof for the on-chain data and the derived data, thereby generating an output result indicating whether the on-chain data and the derived data are valid or invalid. The verification step may include accessing a blockchain node to (a) verify that at least one block hash associated with the on-chain data is valid, and (b) executing an on-chain verification program for verifying the block hash and the derived data. In addition, an off-chain proof verification method for verifying a zk proof for an input includes: receiving a genesis block, on-chain data, derived data, and a zk proof for the on-chain data and the derived data; and verifying the zk proof for the genesis block, the on-chain data, and the derived data, thereby generating an output result indicating whether the on-chain data and the derived data are consistent with the genesis block and a predefined computation code. The verification step may include off-chain verification without access to a blockchain node to (a) verify at least one block hash by determining whether the block hash is consistent with the genesis block, and (b) verify that the on-chain data and the derived data are consistent with at least one valid block hash. The off-chain proof verification may include verification by one of the following means: a portable computer, a mobile device, or a browser.

[0023] In a fifth aspect of the present disclosure directed to zkPoS circuits, methods, and architectures, a recursive authentication circuit includes: a block hash chain authentication circuit (720) that implements at least one first constraint set between a current block hash (H) and a previous block hash (H-1) for proving whether the current block (H) hash is valid; a proof-of-stake (POS) authentication circuit (730) that is communicatively coupled to the block hash chain authentication circuit for implementing at least one second constraint set between a predetermined block hash and corresponding chain consensus data for proving whether the predetermined block hash has been certified by a proof-of-stake chain consensus mechanism; and a recursive authentication circuit (740) that is communicatively coupled to the proof-of-stake (POS) circuit for implementing at least one third constraint set for proving verification of the zero-knowledge proof of the previous block hash. The block hash chain authentication circuit may be adapted to receive a genesis block (0) and implement at least one first constraint set between a current block hash (0+1) and a previous block hash (0) for proving whether the current block hash is valid. The recursive attestation circuit may be adapted to implement at least one third set of constraints for proving verification of the zero-knowledge proof of the previous block hash relative to the current block hash.The predetermined block hash may include the current block hash or a previous block hash. In addition, a method for verifying a zkPoS circuit includes: receiving a genesis block (0); implementing at least one first constraint set between a current block hash (0+1) and a previous block hash (0) to prove whether the current block hash is valid; if valid, generating a zero proof (A); iteratively repeating the recursive process, including: on a previous block (H-1), generating a first proof from a block hash link authentication circuit (first circuit), a proof of stake (POS) authentication circuit (second circuit) and a recursive authentication circuit (third circuit); on a current block (H), recursively proving by generating a second proof on the first, second and third circuits including: (a) a circuit X for verifying the first proof; (b) a circuit Y for PoS authentication; and (c) a circuit Z for block hash link authentication.

[0024] In the sixth aspect of the present disclosure, a decentralized zero-knowledge proof system includes: a first zero-knowledge module, which is configured to receive a proof task and divide the proof task into multiple subtasks; a second zero-knowledge module, which is configured to receive the multiple subtasks and assign the multiple subtasks to a verifier network; a third module, which is configured to receive at least one subtask from the second module and generate a proof for each subtask, the third module having a verifier as part of the verifier network; a fourth module, which is configured to receive the proofs of the subtasks from the verifier network and aggregate them into a final proof of the proof task received by the first zero-knowledge module; and a fifth module, which is configured to incentivize the verifier network to execute the third module when the verifier submits a correct proof for the subtask to the fourth module within a predetermined time period.

[0025] Advantageously, the present disclosure provides a blockchain solution for zk knowledge proofs of indexing, querying, data processing and transmission, while retaining trust in the blockchain and eliminating trust assumptions in conventional systems. The present disclosure further provides another advantage of enabling custom logic, verifiable data processing.

[0026] The structure and method of the present disclosure are disclosed in detail in the following description. This summary is not intended to define the present disclosure. The present disclosure is defined by the claims (if any). These and other embodiments, features, aspects and advantages of the present disclosure will be better understood in conjunction with the following description, attached claims and accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The present disclosure will be described with reference to the accompanying drawings, in which:

[0028] Figure 1 is an architectural diagram illustrating a zero-knowledge Oracle (zkOracle) system 100 according to the present disclosure.

[0029] Figure 2 is a block diagram illustrating one embodiment of a data flow process 200 of an engine in a zero-knowledge zkOracle system 100 according to the present disclosure.

[0030] Figure 3 is a block diagram showing a zkOracle circuit system 300 , which is a core component in the verifier 116 of the zkOracle system 100 according to the present disclosure.

[0031] Figure 4 is a block diagram illustrating a zkOracle verifier system 400 in a zkOracle system 100 according to the present disclosure.

[0032] Figure 5 is a block diagram illustrating a zkOracle circuit architecture 500 in a zkOracle system 100 according to the present disclosure.

[0033] Figure 6 is a block diagram illustrating a chain state attestation circuit 600 with one or more Ethereum events in a zkOracle system 100 according to the present disclosure.

[0034] Figure 7 is a block diagram illustrating a chain state attestation circuit 610 with one or more Ethereum states in a zkOracle system 100 according to the present disclosure.

[0035] Figure 8 is a block diagram illustrating a chain state attestation circuit 620 with one or more Ethereum events in a zkOracle system 100 according to the present disclosure.

[0036] Fig. 9 is a block diagram showing a first embodiment of a chain consensus verification circuit 700 in a zkOracle system 100 according to the present disclosure.

[0037] Fig.10 is a block diagram illustrating one embodiment of a chain consensus verification workflow 800 (the term “workflow” is also referred to as a “process” or “method”) for a chain consensus verification circuit 700 in a zkOracle system 100 according to the present disclosure.

[0038] Fig.11 is a block diagram illustrating a second embodiment of a chain consensus check 700 in a zkOracle system 100 according to the present disclosure.

[0039] Fig.12 is a block diagram illustrating one embodiment of a verifier having a witness input and a public input fed into the checker according to the present disclosure.

[0040] Fig.13 is a block diagram illustrating a process 800 (or workflow 800 or method 800 ) for application in a zkOracle system 100 according to the present disclosure.

[0041] Fig.14 is a block diagram illustrating a process 840 (or workflow 840 or method 840) for one or more validators in a zkOracle system 100 according to the present disclosure.

[0042] Fig.15 is a block diagram illustrating a process 860 (or workflow 860 or method 860) for an automaton 126 in a zkOracle system 100 according to the present disclosure.

[0043] Fig.16 is a block diagram illustrating a process 880 (or workflow 880 or method 880) for an indexer 124 in a zkOracle system 100 according to the present disclosure.

[0044] Fig.17 is a block diagram illustrating an example of a computer device on which computer-executable instructions for performing the blockchain methods discussed herein may be installed and executed. DETAILED DESCRIPTION

[0045] refer to Figure 1-17 A description of the structural embodiments and methods of the present disclosure is provided. It should be understood that it is not intended to limit the present disclosure to the specific disclosed embodiments, but other features, elements, methods and embodiments can be used to practice the present disclosure. Similar elements in various embodiments are generally represented by similar reference numerals.

[0046] The following definitions apply to the elements and steps described herein. These terms are also extensible.

[0047] Attestation (also known as "prove") - used for blockchains to reach consensus on transactions, validators attest that the chain's recent and upcoming blocks are accurate. Blockchain attestation, therefore, is the vote of each validator on whether to approve a transaction.

[0048] Circuit - (also referred to as "loop", circuit or "zk circuit") In one embodiment, the term "circuit" in this patent disclosure refers to an "arithmetic circuit", which is essentially a collection of polynomial equations over a finite field in blockchain technology. See also, https: / / eprint.iacr.org / 2019 / 953.pdf and https: / / en.wikipedia.org / wiki / Zero-knowledge_proof, which are incorporated herein by reference. See also the definition of "zk circuit" in this section.

[0049] Data processing modules — are used to define the steps for on-chain data processing (e.g. for verification purposes): data pairing verification, data cleaning, and custom calculations.

[0050] Verifier and Core Circuits - refers to the use of core circuits in defining the verifier, which has two core components: chain consensus verification and block authentication to achieve off-chain verification. For chain consensus verification and block authentication, novel computational methods involving primitives such as recursive proofs are proposed.

[0051] Validator and Verifier Interaction - refers to defining the relationship and interaction between validators and verifiers to eliminate unnecessary computational redundancy, which reduces the need for on-chain data and achieves shorter proof times.

[0052] Succinct zero-knowledge proof (zkp) - refers to converting data processing calculations into one or more mathematical logics such as polynomial equations and generating proofs. The proof size and the complexity of the verification calculation do not increase with the complexity of the problem being proved. In one embodiment, please note that although zkp can be a common technology used in blockchain, zkp does not seem to have been used to provide blockchains in conventional solutions, as well as for indexing, querying, and transmitting blockchains accordingly.

[0053] Tuple - refers to storing multiple items in a single variable. In one embodiment, a tuple refers to one of the four built-in data types for data collection in Python; the other three are lists, sets, and dictionaries, all of which have different properties and uses. A tuple is an ordered and immutable collection.

[0054] Verifier - defines what is included and specifies one or more types, or four types (The term "verifier" refers to common sense in zkp; in one embodiment, the term "verifier" defines whether the circuit is included as part of a zk middleware design improvement that removes trust assumptions in existing systems and implements custom logic, verifiable data processing.)

[0055] zk-circuit (or "zk-circuit" or "circuit") - In one embodiment, zk refers to cryptographic techniques that enable one party (the verifier) ​​to convince another party (the validator) that they possess certain information without revealing the actual information itself (see https: / / medium.com). Zk-circuit refers to the mathematical structure of a program that applies this cryptographic technique. Same as above. Zk-circuit allows one to prove that one knows something without having to reveal what that something is. Same as above. In another embodiment, the term zk-circuit forms sets of constraints that, if satisfied, prove that a computation was performed correctly (see https: / / wwwrareskills.io / post / zk-circuits). Zk-circuit is sometimes called arithmetic circuit because the "gates" in the circuit are addition and multiplication over a finite field.

[0056] Circuits generated by the zk compiler - refers to a front-end compiler and a back-end verifier, where the front-end compiler includes a program that utilizes zk-efficient optimizations to convert (or translate) custom logic written in a high-level programming language into a circuit intermediate representation, and then the back-end verifier generates a proof based on the circuit IR when receiving one or more public inputs and a valid vector of one or more witnesses.

[0057] Circuits generated by zkVM - refers to a collection of zk proof solutions. An instance of zkVM can take any executable file, as well as public input (including execution input / output) and witness data, and generate a proof. The proof implements the constraints defined by the executable file. An instance of zkVM selects a specific VM architecture (such as WASM, MISPS, RISC-V, etc.), such as zkWASM. The executable file should preferably be consistent with the architecture supported by the zkVM instance.

[0058] Figure 1 1 is a system diagram showing a zero-knowledge Oracle (zkOracle) system 100 (also referred to as a "single zkOracle node"), which includes an engine 110, one or more applications 120, and a zkGraph 192, wherein the zkOracle system 100 is coupled by a blockchain 130 and multiple off-chain users 180. The zkOracle 100 is a system designed to process on-chain data of any given blockchain. The zkOracle system 100 extracts on-chain data 140 from the blockchain 130 and processes the on-chain data 140 through the engine 110 to generate an output 150-1 to (multiple) applications 120. The engine 110 includes three components: an extractor (also referred to as an "extractor module") 112, an executor (also referred to as an "executor module") 114, and a verifier (also referred to as a "verifier module") 116. The verifier 116 in the engine 110 includes three sub-circuits: a zkOracle circuit architecture 300, a zkOracle verifier circuit 400, and a zkOracle verifier architecture 500.

[0059] The engine 110 receives a batch of on-chain data 140 from the blockchain 130, calculates the on-chain data 130 through the extractor 112, the executor 114, and the verifier 116, and exports output data having a data tuple 150-1 to one or more applications 120. The data tuple 150-1 has a current block hash 152, result data 154, and a zk proof 154. The extractor 112 extracts the on-chain data 140 and generates an output including a block number and a hash 152 (also referred to as "block number & hash 152") (and other auxiliary data) to the executor 114. The executor 114 calculates the on-chain data 140 (or the extracted data) for customized execution based on the zkGraph 192 received from the developer 190, and generates an output including the result data 154 to the verifier 116. The verifier 116 receives input from the executor 114 (including result data 154) and the extractor (including block number and hash 152) and performs calculations to generate a zk (zero knowledge) proof 156 for execution. The developer or user 190 can submit (or send) one or more custom code snippets such as zkgraph 192 for loading into the engine 110 in the zkOracle system (or zkOracle node) 100. The one or more custom code snippets can be written in any programming language. The zkGraph 192 serves as an interface between the developer or user 190 and the engine 110.

[0060] The one or more applications 120 include three components: a validator (also referred to as a "validator module") 122, an indexer (also referred to as an "indexer module") 124, and an automaton (also referred to as an "automaton module") 126. The application 120 receives an input of a data tuple 150 containing a block number and hash 152, result data 154, and a zk proof 156. Each of the three components in the one or more applications 120 receives a data tuple 150-1 for a respective functional process. The validator 122 is configured to act as a zk proof validator, which verifies the zk proof 156 against the data (in the block number and hash 152 and result data 154). The index 124 is configured to provide the data tuple 150-1 to one or more option users, so that the one or more option users can receive the data tuple and perform the zk verification process themselves to make the one or more option users trust the result data 154. The automaton 126 is configured to receive the data tuple 150-1 and send the data tuple 150-1 to the blockchain 130 to trigger the on-chain verification process and smart contract automation (such as an automatic smart contract triggering service). One or more applications 120 generate a first output including the data tuple 150-2 to the blockchain 130, and / or generate a second output including the data tuple 150-3 to the off-chain user 180. The one or more off-chain users 180 include one or more data consumers.

[0061] In one embodiment, developer 190 is an external user of zkOracle system 100. Off-chain user 180 is also an external user of zkOracle system 100.

[0062] Figure 2 1 is a block diagram illustrating one embodiment of a data flow process 200 of an engine 110 residing in a zero-knowledge zkOracle system 100. The engine 100 receives an input of on-chain data 140 and generates three types of output data, namely, block number and hash 152, result data 154, and zk proof 156. At step 210, the extractor 112 is configured to extract on-chain data 140 from the blockchain 130. The extractor 112 extracts useful data from the on-chain data and sends the extracted data to the executor 114. At step 220, the executor 114 is configured to receive the acquired data and execute custom code. In other words, the executor 114 is configured to receive the extracted data from the extractor 112 and execute the zkGraph 192 provided by the developer 190. The executor then generates a first output containing the result data 154 and a second output containing a selected chain state 250 (which corresponds to the zkGraph scenario). The selected chain state 250 is typically a subset of the extracted data.

[0063] At step 230, the verifier 116 is configured to receive (1) the result data 154, (2) the selected chain state 250, and (3) the genesis block 240, and generate a zero-knowledge proof to prove the internal constraints between the result data, the genesis block, and the selected chain state (consistent with the executed zkGraph). The genesis block 240 originates from or is sent from the extractor 112. In one embodiment, the genesis block 240 refers to the initial block, such as the first block of data of the blockchain system. Once the zkOracle is plugged into a particular blockchain system, the genesis block 240 is fixed. The genesis block 240 does not change. The verifier 116 generates a zero-knowledge proof to prove the internal constraints between the result data 154, the genesis block 240, and the selected chain state 250. The one or more internal constraints in step 230 are consistent with the executed zkGraph 192.

[0064] Figure 31 is a block diagram showing the zkOracle circuit system 300 of the zkOracle system 100, which is a core component in the verifier 116. The zkOracle circuit system 300 includes four subcomponents: a chain consensus verification circuit 310, a chain state authentication circuit 320, a custom calculation authentication circuit 330, and an aggregation circuit 340. The zkOracle circuit system 310 is configured to describe one or more internal constraints between the block number and hash 152 and the origin block 240 by proving the blockchain chain consensus process, and generate an output including a chain consensus proof 350. The chain state authentication circuit 320 is configured to describe one or more internal constraints between the block number and hash 152 and the selected chain state 250 with the help of witness data 380 (also referred to as auxiliary data or helper data set), and generate an output including a chain state proof 360.

[0065] The custom computation authentication circuit 330 is configured to describe one or more internal constraints of the selected chain state 250 and the result data 154. In one embodiment, the one or more internal constraints of the custom computation authentication circuit 330 are not fixed, but are defined by the custom computation code 390 - the custom internal constraints. In one embodiment for comparison, one or more internal constraints in the chain consensus verification circuit 310 and the chain state authentication circuit 320 are fixed.

[0066] In one embodiment, once the blockchain system is fixed, one or more internal constraints in the chain consensus verification circuit 310 and the chain state authentication circuit 320 are fixed. For the custom computation authentication circuit 330, the one or more internal constraints are consistent with the custom computation code 390. The custom computation authentication circuit 330 then generates an output including the custom computation proof 370.

[0067] Three sub-proofs (or three proofs) have been generated: a chain consensus proof 350 from the chain consensus verification circuit 310, a chain state proof 360 from the chain state authentication circuit 320, and a custom computation proof 370 from the custom computation authentication circuit 330. Aggregation circuit 340 is configured to receive inputs of chain consensus proof 350, chain state proof 360, and custom computation proof 370, and aggregate the three sub-proofs into a zk proof (or final proof). One advantage of zk proof 156 is that it reduces the size of the final proof, thereby reducing the cost of final verification. zk proof 156 includes one or more internal constraints between the origin block 240, the block number and hash 152, the selected chain state 250, and the result data 154.

[0068] In one embodiment, the implementation of the aggregation circuit 340 is accomplished by implementing the verification logic of the three sub-proofs 350, 360, and 370. The aggregation circuit 349 is consistent with the verification logic of the three aggregated sub-proofs 350, 360, and 370.

[0069] Figure 4 is a block diagram illustrating a zkOracle validator system 400 in a zkOracle system 100. The zkOracle validator system 400 includes four subcomponents: a chain consensus prover 410, a chain state prover 420, a custom computation prover 430, and an aggregator 440. In one embodiment, there is a general relationship between the zkOracle circuit system 300 and the provers in the zkOracle validator system 400. A prover is a component internal to a system similar to the zkOracle system 100. A circuit is an arithmetic concept (or abstract concept) that defines a prover. A circuit (or zk circuit) describes one or more internal constraints, and a prover is a component that performs a proof process through a circuit.

[0070] Given that Figure 3 To describe Figure 4 , the chain consensus prover 410 includes the chain consensus verification circuit 310, the chain state prover 420 includes the chain state authentication circuit 320, and the custom calculation prover 430 includes the custom calculation authentication circuit 330. The inputs and outputs of the chain consensus verification circuit 310 in the chain consensus prover 410, the chain state authentication circuit 320 in the chain state prover 420, and the custom calculation authentication circuit 330 in the custom calculation prover 430 are in Figure 4 Zhongyu Figure 3 Aggregator 440 includes aggregation circuit 340, which receives chain consensus proof 350, chain state proof 360, custom computation proof 370 and three aggregation sub-proofs 350, 360 and 370 to generate final proof 156.

[0071] Figure 5is a block diagram showing a zkOracle circuit architecture 500 as an embodiment of a zkOracle circuit system 300 in a zkOracle system 100. The zkOracle circuit architecture 500 reflects an embodiment of applying an Ethereum (ETH) use case to the zkOracle circuit system 300. In other words, the zkOracle circuit architecture 500 represents the system when the zkOracle system 100 is inserted into Ethereum as a blockchain system. The zkOracle circuit architecture 500 includes four main components: (1) a ZKPoS authentication circuit 510; (2) three chain state circuits: an event circuit 520, a state circuit 530 (also referred to as a state variable authentication circuit), and a transaction circuit 540; (3) a zkVM generation circuit 550 (alternatively, a zk compiler generation circuit 550); and (4) an aggregation circuit 340. The ZKPoS authentication circuit 510 is a specialized version of a chain consensus verification circuit. The chain consensus algorithm within Ethereum is called proof of stake (PoS). In order to implement a chain consensus verification circuit for Ethereum, a ZKPoS authentication circuit is selected for implementation. The three chain state circuits, namely event circuit 520, state circuit 530 and transaction circuit 540, are specialized instances for Ethereum to prove the Ethereum chain state. Each of the three authentication circuits, namely state variable authentication circuit 530, event authentication circuit 520 and transaction authentication circuit 540, includes a hash subcircuit and an MPT (Merkle-Patricia Trie) verification subcircuit. The hash subcircuit is adapted to set at least one constraint between the block hash and the root (i.e., state root, receipt root or transaction root). The MPT verification subcircuit is adapted to set at least one constraint between the root (i.e., state root, receipt root or transaction root), the MPT proof and the target data (i.e., the target state variable or event or transaction).

[0072] Ethereum auxiliary data 580, including the following data: receipt root 581, raw receipt data 582, state root 583, state path proof 584, transaction root (txs root) 585 and raw transaction data (raw txs data) 586. Event circuit 520 is configured to receive input of receipt root 581 and raw receipt data 582. State circuit 530 is configured to receive input of state root 583 and state path proof 584. Transaction circuit 540 is configured to receive input of transaction root 585 and raw transaction data 586.

[0073] Each corresponding output from event circuit 502, state circuit 530, and transaction circuit 540 is sent to Ethereum chain state proof 560. Ethereum chain state proof receives three sub-proofs. Ethereum chain state proof 560 receives event proof 561 from event circuit 520, state proof 562 from state circuit 530, and transaction proof 563 from transaction circuit 540.

[0074] The zkVM generation circuit 550 or zk compiler generation circuit 550 provides two examples of implementing the custom computation authentication circuit 330. The zkVM generation circuit 550 refers to a collection of zk proof solutions. An instance of zkVM receives an arbitrary executable file, as well as public inputs (including execution input / output) and witness data, and generates a proof. The proof implements one or more constraints defined by the executable file. An instance of zkVM selects a specific VM architecture (e.g., WASM, MISPS, RISC-V, etc.), such as zkWASM. The executable file should be consistent with the architecture supported by the zkVM instance. The zk compiler generation circuit 550 refers to a front-end compiler and a back-end verifier, wherein the front-end compiler includes a program that converts (or translates) custom logic written in a high-level programming language into a circuit intermediate representation with zk efficient optimization, and then the back-end verifier generates a proof based on the circuit IR when receiving one or more public inputs and one or more witness valid vectors.

[0075] Figure 6 1 is a block diagram illustrating a chain state authentication circuit 600 with one or more Ethereum events in a zkOracle system 100. The chain state authentication circuit 600 (also referred to as the Ethereum event circuit) is about Figure 5 A refinement of the event circuit 520 is depicted. As shown in solid lines, the chain state authentication circuit 600 describes one or more internal constraints between two public inputs (block number and hash 152) and a selected event 251. As shown in dashed lines, the receipt root 581 and raw receipt data 582 (which includes all receipts 582a and all events 582b) are witness inputs (or private inputs).

[0076] Each of the constraints in 601, 602, 603, 604, and 605 describes one or more constraints between two data sets. Constraint(s) 601 describe one or more constraints for the hash between block number & hash 152 and receipt root 581. Constraint 602 describes a constraint for the MerklePatricia Trie root proof between receipt root (witness input) 581 and original receipt data (witness input) 582. Constraint 603 describes a constraint for recursive length prefix (RLP) decoding between original receipt data (witness input) 582 and all receipts. Constraint(s) 604 describe one or more constraints for receipt decoding between all receipts and all events. Constraint 605 describes a constraint for a filter between all events and selected events. All receipts 582a are subsets (decoding results) of original receipt data 582. All events 582b are also subsets (decoding results) of original receipt data 582.

[0077] Figure 76 is a block diagram illustrating a chain state verification circuit 610 with one or more Ethereum states in a zkOracle system 100. The chain state verification circuit 610 includes three components: (1) one or more constraints for a block hash 601, which describe one or more constraints between a block number and hash 152 and a state root 583; (2) one or more constraints for an account proof 611 (Merkle-Patricia Trie path proof), which describe one or more constraints between a block number and hash 152 and a state root 583; and (3) one or more constraints for a storage proof 612 (Merkle-Patricia Trie path proof), which describe a constraint between selected account data 251a and selected account data 251b.

[0078] Figure 8 601, 602, 621, and 622, but the data input is between the block number and hash 152 and the selected transaction 253. Figure 8 The constraints in 601, 602, 621 and 622 are the same as Figure 6 The constraints are the same as in Figure 8 The data input in is the data input between the block number and hash 152 and the selected transaction 253, rather than Figure 6 Data input between the block number and hash 152 shown in and the selected event 251.

[0079] Each constraint in 601, 602, 621, 622 describes a constraint between two data sets. Constraint(s) 601 describe(s) one or more constraints for a hash between a block number and hash 152 and a transaction root 585. Constraint(s) 602 describe(s) one or more constraints for a transaction root 585 and RLP encoded transaction data 586. Constraint 621 describes(s) a constraint for transaction RLP decoding between RLP encoded transaction data 586 and all transactions 586a. Constraint(s) 622 describe(s) one or more constraints for a filter 622 between all transactions 586a and selected events 253.

[0080] As shown in solid lines, the chain state authentication circuit 620 describes the internal constraints between the two public inputs, the block number and hash 152, and the selected transaction 253. As shown in dashed lines, the transaction root 585, the RLP encoded transaction data 586, and all transactions 586a are witness inputs (or private inputs). All transactions 586a are a subset of the RLP encoded transaction data 586.

[0081] Fig. 9is a block diagram illustrating a first embodiment of a chain consensus verification circuit 700 in a zkOracle system 100. The chain consensus verification circuit 700 describes constraints between a given recent block generated from the blockchain system 130 and the genesis block 240 of the blockchain system. In other words, the chain consensus verification circuit 700 describes one or more constraints between the anchor data as the genesis block 240 and the newly generated block data.

[0082] The chain consensus verification circuit 700 includes four blocks (or modules, or subcircuits): (1) start block authentication (or start block authentication subcircuit) 710, (2) block chain authentication (also referred to as block chain authentication subcircuit) 720, (3) chain consensus verification (also referred to as chain consensus verification subcircuit) 730, and recursive authentication (also referred to as recursive authentication subcircuit) 740. The start block authentication 710 is configured to describe one or more constraints for verifying the correctness of the origin block (0) 240. The start block authentication 710 defines how to verify that the origin block (0) 240 is correct.

[0083] For the initial round, the start block authentication 710, which acts as the initial circuit, describes one or more constraints of the origin block, which is run first and only once. The start block authentication 710 is configured to receive the origin block (0) chain consensus data 240 and generate a proof 712 of the origin block (0). The start block authentication 710 describes one or more constraints in the correctness verification of the origin block. For subsequent rounds, the chain consensus verification circuit 700 only runs three subcircuits: the block chain authentication subcircuit 720, the chain consensus verification subcircuit 730, and the recursive authentication subcircuit 740.

[0084] After the initial round (or the first round), the start block authentication 710 receives the origin block (0) 240 and generates the proof 712 of the origin block (0), wherein the origin block (0) 240 is then fed into the previous block (H-1) 721, and the proof 712 of the origin block (0) is fed into the proof 722 of the previous block (H-1). For each subsequent round (after the starting round or the first round), each of the previous block (H-1) 721 and the proof 722 of the previous block (H-1) is updated with the actual previous block, which means the actual data and proof of the previous block that is not the origin block.

[0085] The block link authentication 720 is configured to describe one or more constraints between the previous block and the next block (or the current block). In a blockchain system, data in the blockchain system is structured as a chain of one or more blocks. Each block is cryptographically linked to the previous block. Objectively speaking, there is a way to verify or authenticate the link that two given blocks are linked together, where one block is the previous block of the other block. Similarly, the block link authentication 720 in the chain consensus verification circuit 700 is configured to function or describe the constraints between the previous block and the current block. The block link authentication 720 is configured to receive the previous block (H-1) 721 and generate an output of a sub-proof 729 (also referred to as proof #1 or sub-proof #1). It should also be noted that block (1) 711 is only fed into the previous block (H-1) 721 once during the first time, where the previous block is subsequently fed into the previous block (H-1) 721.

[0086] The chain consensus check 730 is configured to describe one or more constraints to verify the chain consensus data of the current block. The chain consensus check 730 receives the input of the chain consensus data 733 to verify the current block 731 and generates a proof 739 (also referred to as proof #2 or sub-proof #2). The purpose of the chain consensus check 730 is to prove (or verify) that the current block 731 has the correct chain consensus through the blockchain chain consensus algorithm. For each round, the current block (H) 731 is extracted from the blockchain system 130. Whenever the blockchain system 130 generates a new block, the new block data enters the current block (H) 731 as the current block data.

[0087] Recursive attestation 740 is configured to recursively verify the entire process. Assuming that a final proof has been generated for a given block (or previous block), and when attempting to prove the next block (or current block), the input into recursive attestation 740 is the final proof of the previous block and the previous block data itself. The term "final proof" refers to the aggregate proof (or proof 732 of the current block); the term "final proof" is also referred to as Figure 3 The chain consensus proof 350 in. The recursive attestation 740 is configured to receive two inputs, namely the proof of the previous block (H-1) and the previous block (H-1) 721, and generate a sub-proof 949 (also referred to as proof #3 or sub-proof #3).

[0088] Each of the subcircuits 710, 720, 730, 740 in the chain consensus verification circuit 700 generates a subproof. The start block verification subcircuit 710 generates a subproof 712. The block chain verification subcircuit 720 generates a subproof 729. The chain consensus verification subcircuit 730 generates a subproof 739. The recursive verification subcircuit 740 generates a subproof 749.

[0089] Aggregate attestation 750 is configured to aggregate three previously generated sub-proofs: sub-proof 729, sub-proof 739, and sub-proof 749, and aggregate sub-proof 729, sub-proof 73.9, and sub-algorithm 749 together to generate final proof 732. Aggregate attestation 750 does not aggregate sub-proof 712 from start block attestation 710 because the function of sub-proof 710 is similar to the initial proof.

[0090] Fig.10 8 is a block diagram illustrating one embodiment of a chain consensus verification workflow 800 (also referred to as a “process” or “method”) for a chain consensus verification circuit 700 in a zkOracle system 100, with the recursive portion detailed. At step 810, during an initial run, the genesis block (0) and block (1) are processed by the start block authentication 710 (including the block chain authentication 720 and the chain consensus verification 730, and further by the aggregate authentication 750), thereby generating the proof 712 of block (1). At step 820, during subsequent runs, the input (previous block (H-1), current block (H), proof of the previous block (H-1), chain consensus data) is processed by the block chain authentication 720 and the chain consensus verification 730, and the recursive authentication 740 receives the proof 722 of the previous block and verifies that the proof of the previous block is correct through the aggregate authentication 750, thereby generating the final proof 732. For each subsequent round, the proof 732 (or 350 chain consensus proof) of the current block (H) becomes the proof 722 of the previous block (H-1) for processing through the recursive structure. In one embodiment, this recursive part is continuously triggered every time the blockchain generates a new block, provided that the blockchain system is continuous (does not stop) and permanent (never ends).

[0091] Fig.11 is a block diagram showing a second embodiment of the chain consensus verification circuit 780 in the zkOracle system 100. The start block authentication 710 is arranged between the origin block (0) 240 and the first block (or block 1) 711. The block chain authentication 720 is arranged between the previous block (H-1) 721 and the current block (block H) 731. The chain consensus verification 730 is arranged between the previous block (block H-1) 721 and the chain consensus data 782 of the previous block (H-1). The chain consensus verification 730 is also arranged between the current block (block H) 731 and the chain consensus data 733 of the block (H). Fig.11 For further description, see the Fig. 9 .

[0092] Fig.12830 is a block diagram illustrating an embodiment of a process (or workflow) 830 for an overall zk checker and validator. In one embodiment, the proof process via the checker 831 and the verification process via the validator 833 represent the core process in the zkOracle system. The checker 831 includes a given circuit 832 for generating a proof based on a given circuit 832. The checker 831 is configured to receive a witness input 834 and a public input 835, and generate a zk proof 836 at the output. The validator 833 is configured to receive a first input containing a zk proof 836 and a second input containing a public input 835, and then generate an output indicating whether the zk proof 838 is correct. In other words, the validator 836 determines whether the zk proof 836 is valid or invalid through the public input 835.

[0093] Fig.13 800 (or workflow) for applications in the zkOracle system 100. The process 800 includes three applications: an indexer 124, an automaton 126, and a verifier 122. Each of the indexer 124, the automaton 126, and the verifier 122 receives an input of a data tuple 150 from the engine 110 of the zkOracle system 100. The data tuple 150 includes a block number and hash 152, result data 154, and a zk proof 156. Each of the indexer 124 and the automaton 126 interacts with and depends on the verifier 122. The indexer 124 is configured to send the data tuple 150 to the verifier 122 to verify the zk proof, and the verifier 122 sends a verification result (on-chain or off-chain) 820 back to the indexer 124. The automaton 126 is configured to send the data tuple 150 to the validator 122 to verify the zk proof, and the validator 122 sends the verification result 822 back to the automaton 126 (e.g., on-chain). The validator 122 (both acting as an on-chain validator or an off-chain validator 122) is configured to verify the zk proof and generate an on-chain version or an off-chain version. The data tuple 150 can also be sent to the validator 122, which means that the validator can also use the data tuple 150 directly.

[0094] Fig.14820 is a block diagram illustrating a process (or workflow) 840 of one or more validators 122 in a zkOracle system 100. In one embodiment, one or more validators 122 have two types of validators, an on-chain validator or an off-chain validator, for verifying a zk proof (ZKP) against one or more public inputs (e.g., a block number and hash 152, result data 154, to determine whether one or more public inputs satisfy a predetermined constraint). One or more validators 122 are configured to receive a data tuple 150 including a block number and hash 152, result data 154, and / or a zk proof 156, and generate an output including a verification result 820. In this embodiment, the verification result 820 is a Boolean value, i.e., true or false, or pass or fail. One of ordinary skill in the art will recognize that other variations and modifications to one or more validators 122 may be practiced without departing from the spirit of the present disclosure.

[0095] Fig.15 is a block diagram illustrating a process (or workflow) 860 for an automaton 126 in a zkOracle system 100. At step 862, a sender sends a data tuple 150 to a blockchain system 130 to initiate an atomic transaction, wherein the atomic transaction includes the data tuple 150. The data tuple 150 includes a block number and hash 152, result data 154, and / or a zk proof 156. At step 864, in response to the atomic transaction being included in the blockchain system, an on-chain smart contract is triggered to receive the data tuple 150, and calls an on-chain validator 122 to verify the zk proof 156 against the block number and hash 152 and the result data 154, and then generates a validator result at the output. At step 866, the automaton 126 is configured to receive the validator result to determine whether the validator result is valid or invalid. For a detailed description of validators and validator results, see Fig.14 Description of . Note that the validator result is a Boolean value, which can be valid or invalid, or true or false. In the first branch where the validator result is valid, at step 868, the on-chain trigger smart contract calls a predefined destination smart contract (in one embodiment, the previous destination smart contract is defined by the developer user of the automaton application). After the destination smart contract is triggered using the result data 154, the transaction is successfully executed at step 870. In the second branch where the validator result is valid, at step 872, execution stops at this point in response to the invalid validator result. The entire transaction is reverted. At step 874, the entire transaction ends with a failed operation and is recorded on the chain. Therefore, the automaton 126 is configured to determine that the result data triggers the predefined destination smart contract only if the zk proof is valid.

[0096] Fig.16is a block diagram 124 illustrating a process (or workflow) 880 for an indexer in a zkOracle system 100. In step 882, one or more indexer nodes are configured to receive a data tuple 150 and store the data tuple 150 in a local database. In one embodiment, an indexer node is a node within the zkOracle system that is willing to host an indexer application. An indexer is an application of the zkOracle system. Since the zkOracle system itself is designed as a decentralized network, the zkOracle system itself includes multiple nodes operated by different entities. Each node can decide which applications to host. The term "indexer node" refers to one or more nodes in the zkOracle system that are willing to host an indexer application. In step 884, a user queries one of the indexer nodes for a data tuple. In step 886, one of the indexer nodes replies to the user with a data tuple 150. In step 888, the user verifies the zk proof 156 for two types of data, namely, the block number and hash 152 and the result data 154, and generates a validator result as an output. For more information on the validator result 154 and the validator, see Fig.14 . In step 890, the validator 122 is configured to determine whether the validator result is valid or invalid. If the validator result is valid, then in step 892, the user accepts the data (i.e., the block number and hash 152 and the resulting data 154). In step 894, the query is considered successful. If the validator result is invalid, then in step 896, the user rejects the data (i.e., the block number and hash 152 and the resulting data 154). In step 898, the user continues to query another indexer node as needed and repeats the process back to step 884.

[0097] Fig.17An exemplary form of a computer system 1700 is shown, in which a set of instructions can be executed to cause the computer system to perform any one or more methods discussed herein. Computer device 1700 may represent any or all of the client, server, or network intermediate device discussed herein. In addition, although only a single machine is shown, the term "machine" should also be considered to include any machine collection that executes a set (or multiple sets) of instructions individually or jointly to perform any one or more methods discussed herein. Exemplary computer system 1700 includes a processor 1702 (e.g., a central processing unit (CPU), a graphics processing unit (GPU) or both), a main memory 1704, and a static memory 1706, which communicate with each other via a bus 1708. Computer system 1700 may also include a video display unit 1710 (e.g., a liquid crystal display (LCD)). Computer system 1700 also includes an alphanumeric input device 1712 (e.g., a keyboard), a cursor control device 1714 (e.g., a mouse), a disk drive unit 1716, a signal generating device 1718 (e.g., a speaker), and a network interface device 1724.

[0098] The disk drive unit 1716 includes a machine-readable medium 1720 on which is stored one or more sets of instructions (e.g., software 1722) embodying any one or more of the methods or functions described herein. The software 1722 may also reside completely or at least partially in the main memory 1704 and / or the processor 1702. During execution, the computer system 1700, the main memory 1704, and the instruction storage portion of the processor 1702 also constitute machine-readable media. The software 1722 may also be transmitted or received over the network 1726 via the network interface device 1724.

[0099] Although the machine-readable medium 1720 is shown as a single medium in the exemplary embodiment, the term "machine-readable medium" should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, and / or associated caches and servers) that store one or more sets of instructions. The term "machine-readable medium" should also be taken to include any tangible medium that can store a set of instructions for execution by a machine and cause the machine to perform any one or more methods of the present invention. Therefore, the term "machine-readable medium" should include, but is not limited to, solid-state memory, optical and magnetic media.

[0100] Some portions of the detailed description herein are presented in terms of algorithms and symbolic representations of data operations within a computer memory or other storage device. These algorithmic descriptions and representations are the means used by those skilled in the art of data processing to most effectively convey the substance of their work to others skilled in the art. Here, an algorithm is generally considered to be a self-consistent sequence of processing blocks that lead to a desired result. Processing blocks are those blocks that require physical manipulation of physical quantities. Throughout the specification, discussions using terms such as "processing" or "computing" or "calculating" or "determining" or "displaying" refer to the actions and processes of a computer system or similar electronic computing device that manipulates and converts data represented as physical (electronic) quantities within the registers and memories of the computer system into other data similarly represented as physical quantities within the memory or registers of the computer system or other such information storage, transmission or display devices.

[0101] The present invention also relates to a device for performing the operations herein. The device may be specially constructed for the desired purpose, or it may include a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer-readable storage medium, such as but not limited to any type of disk, including cloud computing, flash memory, optical disk, magneto-optical disk, read-only memory (ROM), random access memory (RAM), erasable programmable ROM (EPROM), electrically erasable programmable ROM, magnetic or optical card, application-specific integrated circuit (ASIC), or any type of medium suitable for storing electronic instructions, and each is coupled to a computer system bus. In addition, the computer and / or other electronic device mentioned in the specification may include a single processor, or may be an architecture designed with multiple processors to improve the computing power of artificial intelligence, machine learning, and high-performance computing of big data.

[0102] In addition, terms such as "request", "client request", "requested object" or "object" are used interchangeably to refer to the action, object and / or information requested by the client from a network device (such as an intermediary or server). In addition, the term "response" or "server response" are used interchangeably to mean the corresponding action, object and / or information returned from the network device. In addition, the terms "communication" and "client communication" are used interchangeably to mean the entire process of a client making a request and a network device responding to the request.

[0103] With respect to any aspect of the above-mentioned system, device or apparatus, method aspects including steps for implementing the system functions may also be provided.Additionally or alternatively, optional features may be found based on any one or more of the features described herein with respect to other aspects.

[0104] The present disclosure has been described in particular detail with respect to possible embodiments. Those skilled in the art will appreciate that the present disclosure may be practiced in other embodiments. The specific naming of components, capitalization of terms, attributes, data structures, or any other programming or structural aspects are not mandatory or important, and the mechanisms for implementing the present disclosure or its features may have different names, formats, or protocols. The system may be implemented via a combination of the described hardware and software, or may be implemented entirely in hardware elements, or entirely in software elements. The specific division of functions between the various system components described herein is merely exemplary and not mandatory; functions performed by a single system component may be performed by multiple components instead, and functions performed by multiple components may also be performed by a single component instead.

[0105] In various embodiments, the present disclosure may be implemented, alone or in any combination, as a system or method for performing the above-described techniques. Combinations of any specific features described herein are also provided, even if the combination is not explicitly described. In another embodiment, the present disclosure may be implemented as a computer program product, which includes a computer-readable storage medium and a computer program code encoded on the medium for causing a processor in a computing device or other electronic device to perform the above-described techniques.

[0106] As used herein, any reference to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment.

[0107] It should be remembered, however, that all of these and similar terms are associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless otherwise clearly indicated from the following discussion, it should be understood that throughout the description, discussions using terms such as "processing" or "computing," "calculating" or "displaying" or "determining" refer to the actions and processes of a computer system or similar electronic computing module and / or device that manipulates and transforms data represented as physical (electronic) quantities within a computer system memory or register or other such information storage, transmission or display device.

[0108] Certain aspects of the present disclosure include process steps and instructions described herein in algorithmic form. It should be noted that the process steps and instructions of the present disclosure may be embodied in software, firmware and / or hardware, and when embodied in software, it may be downloaded to reside on and operate from different platforms used by various operating systems.

[0109] The algorithms and displays proposed herein are not inherently related to any particular computer, virtualization system, or other device. According to the teachings herein, various general-purpose systems may also be used together with the program, or these systems may prove to be convenient for constructing more specialized devices required for performing the required method steps. According to the description provided herein, the structures required for various these systems will be apparent. According to the description provided herein, the structures required for various these systems will be apparent. In addition, the present disclosure is described without reference to any particular programming language. It will be understood that a variety of programming languages ​​may be used to implement the teachings of the present disclosure as described herein, and any reference to a particular language above is provided to disclose the enabling and best mode of the present disclosure.

[0110] In various embodiments, the present disclosure may be implemented as software, hardware and / or other elements for controlling a computer system, a computing device or other electronic device or any combination thereof or a plurality thereof. According to techniques known in the art, such electronic devices may include, for example, a processor, an input device (such as a keyboard, a mouse, a touchpad, a trackpad, a joystick, a trackball, a microphone and / or any combination thereof), an output device (such as a screen, a speaker, etc.), a memory, a long-term memory (such as a magnetic memory, an optical memory, etc.) and / or a network connection. Such electronic devices may be portable or non-portable. Examples of electronic devices that may be used to implement the present disclosure include mobile phones, personal digital assistants, smart phones, digital watches, kiosks, desktop computers, laptop computers, tablet computers, consumer electronic devices, televisions, set-top boxes, etc. Electronic devices for implementing the present disclosure may use operating systems, such as, for example, iOS available from Apple Inc. in Cupertino, California, Android available from Google Inc. in Mountain View, California, Microsoft Windows 11 available from Microsoft Corporation in Redmond, Washington, Windows 11 Enterprise Edition, Windows Server 2022, or any other operating system suitable for use on a device. In some embodiments, electronic devices for implementing the present disclosure include functionality for communicating over one or more networks including, for example, a cellular telephone network, a wireless network, and / or a computer network such as the Internet.

[0111] Some embodiments may be described using the expressions "coupled" and "connected" and their derivatives. It should be understood that these terms are not synonymous with each other. For example, the term "connected" may be used to describe some embodiments to indicate that two or more elements are in direct physical or electrical contact with each other. In another example, the term "coupled" may be used to describe some embodiments to indicate that two or more elements are in direct physical or electrical contact with each other. However, the term "coupled" may also mean that two or more elements are not in direct contact with each other, but still cooperate or interact with each other. The embodiments are not limited to the present context.

[0112] As used herein, the terms "comprises," "comprising," "includes," "including," "having," "having," or any other variation thereof, are intended to cover non-exclusive inclusion. For example, a process, method, article, or apparatus that includes a list of elements is not necessarily limited to only those elements, but may include other elements not expressly listed, or other elements not expressly listed or inherent in such process, method, article, or apparatus. In addition, unless expressly stated to the contrary, "or" refers to an inclusive or, not an exclusive or. For example, a condition A or B is satisfied by any one of the following: A is true (or exists) and B is false (or does not exist), A is false (or does not exist) and B is true (or exists), and both A and B are true (or exist).

[0113] As used herein, the term "at least one" is a mathematical term meaning "one or more." For example, the phrase "at least one constraint set" is equivalent to "one or more constraint sets."

[0114] The terms "a" or "an", as used herein, are defined as one or more than one. The term "plurality", as used herein, is defined as two or more than two. The term "another", as used herein, is defined as at least a second or more.

[0115] Those skilled in the art do not require additional explanation when developing the methods and systems described herein, but may find some potentially useful guidance in the preparation of these methods and systems by examining standardized references in the relevant art.

[0116] Although the present disclosure has been described with respect to a limited number of embodiments, those skilled in the art who have the benefit of the foregoing description will appreciate that other embodiments may be devised that do not depart from the scope of the present disclosure as described herein. It should be noted that the language used in the specification is selected primarily for readability and teaching purposes, and may not be selected to describe or define the subject matter of the present invention. The terms used should not be interpreted as limiting the present disclosure to the specific embodiments disclosed in the specification and claims, but rather the terms should be interpreted to include all methods and systems operating under the claims described below. Therefore, the present disclosure is not limited by the present disclosure, but its scope is determined entirely by the following claims.

Claims

1. A system comprising: A chain consensus verification circuit (310) for implementing a first set of constraints between the historical block hash and the latest block hash; a chain state authentication circuit (320), coupled to the chain consensus verification circuit, for implementing a second set of constraints between the latest block hash and block events and states; custom computation authentication circuitry (330) for enforcing a third set of constraints between block events and state and result data; as well as Aggregation circuitry (340), communicatively coupled to the chain consensus verification circuitry, the chain state authentication circuitry, and the custom computation authentication circuitry, for aggregating a plurality of attestations generated from the chain consensus verification circuitry, the link state authentication circuitry, and the custom authentication circuitry.

2. A method comprising: Receive blockchain data; Determining at least one constraint set for the received blockchain data; generating at least one proof, each proof being associated with a constraint set of the at least one constraint set; as well as Aggregating the one or more proofs into a single proof for processed blockchain data derived from the received blockchain data.

3. A system comprising: state variable authentication circuitry (530) for enforcing at least one first set of constraints between at least one target event and a block hash and generating a state sub-proof; event authentication circuitry (520) for enforcing at least one second set of constraints between at least one state variable and the block hash and generating an event sub-proof; as well as Transaction authentication circuitry (540) is configured to enforce at least a third set of constraints between the target transaction and the block hash and generate a transaction sub-proof.

4. The system of claim 3, wherein: The state variable authentication circuit, the event authentication circuit and the transaction authentication circuit generate a chain state certificate, and the chain state certificate includes the event sub-certificate, the state sub-certificate and the transaction certificate.

5. The system of claim 3, wherein: Each of the state variable authentication circuit, the event authentication circuit, and the transaction authentication circuit includes a hash subcircuit and a Merkle-Patricia Trie (MPT) verification subcircuit, wherein the hash subcircuit is adapted to set at least one constraint between a block hash and a root (i.e., a state root, a receipt root, or a transaction root), and the MPT verification subcircuit is adapted to set at least one constraint between the root, the MPT proof, and the target data.

6. The system of claim 3, wherein: The event circuit (520) is configured to receive input of the receipt root (581) and the raw receipt data (582), The state circuit (530) is configured to receive input of the state root (583) and the state path proof (584), and The transaction circuit (540) is configured to receive input of the transaction root (585) and the original transaction data (586).

7. The system of claim 3, wherein: Each respective output from the event circuit (502), the state circuit (530), and the transaction circuit (540) is sent to a chain state proof (560); and wherein the chain state proof receives three sub-proofs: an event proof (561) from the event circuit (520), a state proof (562) from the state circuit (530), and a transaction proof (563) from the transaction circuit (540).

8. The system of claim 3, wherein: The system comprises a zero-knowledge system.

9. A zero-knowledge method comprising: converting a plurality of known algorithms into circuits, the circuits having a plurality of constraint sets; as well as A constraint set among the plurality of constraint sets is established for each of the known algorithms.

10. A method for customizing a computational authentication verifier in a zkOracle system, comprising: receiving at least one custom computation code and an input sequence; decoding and transforming the at least one custom computing code to assemble at least one custom circuit; as well as The input sequence is processed by the at least one custom circuit to generate a custom proof.

11. The method of claim 10, wherein: The receiving the input sequence includes at least a public input and at least one witness input.

12. The method of claim 10, wherein: The decoding and transformation steps include a multi-stage solution with a build phase and a proof phase.

13. The method of claim 12, wherein: The setup phase includes the zkOracle system decoding the custom computation code and transforming the custom computation code into at least one pre-processing circuit.

14. The method of claim 12, wherein: The attestation phase includes zkOracle system processing in the execution trace of the custom computation code for the public input and witness input, and then generating at least one circuit.

15. The method of claim 14, wherein: The zkOracle system generates at least one proof based on circuits from the setup phase and the proof phase.

16. An on-chain verification method for verifying a zk proof against an input, comprising: Receiving on-chain data, exported data, and zk proofs for the on-chain data and the exported data; as well as The zk proof is verified against the on-chain data and the exported data, thereby generating an output result indicating whether the on-chain data and the exported data are valid or invalid.

17. The method of claim 16, wherein: The verification step includes accessing a blockchain node to (a) verify that at least one block hash associated with the on-chain data is valid, and (b) execute an on-chain verification procedure for verifying the block hash and the derived data.

18. An off-chain attestation verification method for verifying a zk proof against an input, comprising: Receiving a genesis block, on-chain data, derived data, and zk proofs for the on-chain data and the derived data; as well as The zk proof is verified against the genesis block, the on-chain data, and the derived data, thereby generating an output result indicating whether the on-chain data and the derived data are consistent with the genesis block and a predefined computation code.

19. The method of claim 18, wherein: The verification step includes off-chain verification without access to a blockchain node, for (a) verifying at least one block hash by determining whether the block hash is consistent with the genesis block, and (b) verifying that the on-chain data and the derived data are consistent with at least one valid block hash.

20. The method of claim 18, wherein: The off-chain attestation verification includes verification through one of the following means: a portable computer, a mobile device, or a browser.

21. A recursive verification circuit, comprising: a block hash chain authentication circuit (720) that implements at least one first set of constraints between a current block hash (H) and a previous block hash (H-1) for proving whether the current block (H) hash is valid; Proof of Stake (POS) authentication circuitry (730), communicatively coupled to the block hash chain authentication circuitry, for implementing at least one second set of constraints between a predetermined block hash and the corresponding chain consensus data, for certifying whether the predetermined block hash has been approved by a proof of stake chain consensus mechanism; as well as Recursive authentication circuitry (740), communicatively coupled to the proof-of-stake (POS) authentication circuitry, is configured to implement at least one third set of constraints to prove verification of the zero-knowledge proof of the previous block hash.

22. The system of claim 21, wherein: The block hash chaining authentication circuit is adapted to receive a genesis block (0) and implement at least one first set of constraints between a current block hash (0+1) and a previous block hash (0) for proving whether the current block hash is valid.

23. The system of claim 21, wherein: The recursive attestation circuit is adapted to enforce at least one third set of constraints to prove verification of the zero-knowledge proof of the previous block hash relative to a current block hash.

24. The method of claim 23, wherein: The predetermined block hash includes the current block hash or the previous block hash.

25. A method for verifying a zkPoS circuit, comprising: Receive genesis block (0); implementing at least one first set of constraints between a current block hash (0+1) and a previous block hash (0) for proving whether the current block hash is valid; If valid, generate proof (A); Iteratively repeating the recursive process includes: On a previous block (H-1), a first proof is generated from a block hash link authentication circuit (first circuit), a proof of stake (POS) authentication circuit (second circuit), and a recursive authentication circuit (third circuit); On the current block (H), a recursive proof is performed by generating a second proof on the first, second and third circuits including: (a) a circuit X for verifying said first proof; (b) Circuit Y for PoS authentication; and (c) Circuit Z for block hash chaining authentication.

26. A decentralized zero-knowledge proof system, comprising: A first zero-knowledge module, configured to receive a proof task and divide the proof task into a plurality of subtasks; a second zero-knowledge module configured to receive the plurality of subtasks and assign the plurality of subtasks to a checker network; a third module configured to receive at least one subtask from the second module and generate a proof for each subtask, the first module having a validator as part of the validator network; a fourth module configured to receive the proofs of the subtasks from the verifier network and aggregate them into a final proof of the proof task received by the first zero-knowledge module; as well as A fifth module is configured to incentivize the verifier network to execute the third module when the verifier submits a correct proof for the subtask to the fourth module within a predetermined time period.