Cross-chain message verification method and system based on zero-knowledge virtual machine technology

By using zero-knowledge virtual machine technology in cross-chain message verification, zero-knowledge proofs are generated and light-weight on-chain verification, the problems of privacy leakage, high latency and large Gas consumption in the existing technology are solved, and efficient and secure cross-chain message verification is achieved.

CN120110685AActive Publication Date: 2025-06-06HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510576243.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-06-06
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

The existing cross-chain message verification technology has problems such as privacy leakage, high latency and large gas consumption, making it difficult to ensure the security and efficiency of cross-chain communication.

Method used

The cross-chain message verification method based on zero-knowledge virtual machine (zkVM) technology is adopted to ensure the integrity and authenticity of messages while reducing Gas consumption and latency by generating zero-knowledge proofs off-chain and performing lightweight verification on the chain.

Benefits of technology

It realizes cross-chain message verification without the need for trusted third parties or centralized repeaters, ensures privacy protection, significantly reduces Gas consumption and verification latency, improves efficiency, and facilitates integration with a variety of blockchain and cross-chain protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120110685A_ABST
    Figure CN120110685A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-chain message verification method and system based on a zero-knowledge virtual machine technology, and relates to the technical field of cross-chain of block chains. The method comprises the steps of querying a cross-chain transaction message on a target chain through a supplementary component, and obtaining a cross-chain transaction message submitted by a user through a cross-chain message input module; compiling and executing an SP1 program based on the zero-knowledge virtual machine execution engine, and generating a corresponding zero-knowledge proof according to the cross-chain transaction message; according to preset cross-chain information and a proof benchmark generator, generating a proof benchmark, and debugging the smart contract of the verifier node; submitting the cross-chain transaction message and the zero-knowledge proof to the smart contract, and verifying the zero-knowledge proof to obtain a verification result of the cross-chain transaction message; and if the verification result is successful, accepting the authenticity and integrity of the cross-chain transaction, and executing the subsequent process. By adopting the method and the device, sensitive message data is not leaked in the verification process, privacy protection is realized, Gas consumption and verification delay are remarkably reduced, and efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain cross-chain technology, and in particular to a cross-chain message verification method and system based on zero-knowledge virtual machine technology. Background Art

[0002] With the continuous advancement of blockchain technology and the continuous expansion of application scenarios, the blockchain ecosystem has gradually grown. There are many different blockchain networks. Different blockchain networks may run different consensus mechanisms, data structures and smart contracts. Therefore, they cannot communicate directly with each other, thus forming "value islands". However, in reality, the need for interconnection between different blockchains has become increasingly prominent. How to connect the "value islands" formed by a single blockchain has become an urgent problem to be solved in this field. In this context, cross-chain technology has emerged, and various cross-chain technical solutions and protocols have been proposed one after another. The mainstream technical solutions include notary mechanism, side chain / relay, hash locking, distributed private key control, etc. Some technical solutions can only realize the exchange or transfer of blockchain native assets, while cross-chain in the full sense should enable any message between chains to be reliably transmitted, that is, to realize cross-chain message transmission. Cross-chain message transmission allows different blockchain networks to communicate and transmit transaction data, smart contract calls and other information. Any cross-chain transaction is essentially a combination of a series of cross-chain message transmissions. The implementation of cross-chain message transmission function is crucial to expanding the blockchain ecosystem and achieving interoperability between different chains.

[0003] In cross-chain communication, messages may be tampered with or forged during transmission. Through cross-chain message verification, it is possible to check whether the content of the message has been tampered with during transmission from the source chain to the destination chain, and verify whether the message comes from a trusted entity. If cross-chain communication lacks reliable cross-chain message verification, then the process is vulnerable to malicious attacks, which may cause users to suffer significant losses. Therefore, studying the key technologies of cross-chain message verification is of great significance to ensuring the security and reliability of cross-chain communication and promoting the prosperity and development of the blockchain ecosystem.

[0004] In the existing technology, cross-chain message verification often relies on trusted relay nodes or complex message delivery protocols. These methods have the following shortcomings: (1) They require high trust assumptions and are easy to become targets of attack. (2) The message verification process may leak sensitive information in the message, affecting user privacy. (3) When traditional solutions perform verification on the chain, the amount of calculation is large, the gas consumption is high, and the delay is high. Summary of the invention

[0005] In order to solve the technical problems of privacy impact and high latency in the prior art, the embodiment of the present invention provides a cross-chain message verification method and system based on zero-knowledge virtual machine technology. The technical solution is as follows:

[0006] On the one hand, a cross-chain message verification method based on zero-knowledge virtual machine technology is provided, and the cross-chain message verification method based on zero-knowledge virtual machine technology is implemented by a cross-chain message verification system based on zero-knowledge virtual machine technology, and the cross-chain message verification system based on zero-knowledge virtual machine technology includes a supplementary component, a cross-chain message input module, a zero-knowledge virtual machine execution engine, a proof benchmark generator, and a smart contract of a verifier node;

[0007] The method comprises:

[0008] S1. Through the supplementary component, query the cross-chain transaction message on the target chain. When a specific cross-chain transaction message is queried, obtain the cross-chain transaction message submitted by the user through the cross-chain message input module;

[0009] S2. Compile and execute the SP1 program based on the zero-knowledge virtual machine execution engine, and generate the corresponding zero-knowledge proof based on the cross-chain transaction message;

[0010] S3. Generate a proof benchmark based on the preset cross-chain information and the proof benchmark generator, and debug the smart contract of the initial validator node based on the proof benchmark;

[0011] S4. Submit the cross-chain transaction message and zero-knowledge proof to the smart contract of the verifier node. The smart contract verifies the zero-knowledge proof and obtains the verification result of the cross-chain transaction message.

[0012] S5. If the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message.

[0013] On the other hand, a cross-chain message verification system based on zero-knowledge virtual machine technology is provided, which is applied to a cross-chain message verification method based on zero-knowledge virtual machine technology, and the system includes a supplementary component, a cross-chain message input module, a zero-knowledge virtual machine execution engine, a proof benchmark generator, and a smart contract of a verifier node; wherein:

[0014] The supplementary component is used to query the cross-chain transaction message on the target chain; if the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message;

[0015] The cross-chain message input module is used to obtain the cross-chain transaction message submitted by the user when a specific cross-chain transaction message is queried;

[0016] The zero-knowledge virtual machine execution engine is used to compile and execute the SP1 program and generate corresponding zero-knowledge proofs according to the cross-chain transaction message;

[0017] The proof benchmark generator is used to generate a proof benchmark according to preset cross-chain information, and debug the smart contract of the initial verifier node based on the proof benchmark;

[0018] The smart contract of the verifier node is used to receive the cross-chain transaction message and the zero-knowledge proof, verify the zero-knowledge proof, and obtain the verification result of the cross-chain transaction message.

[0019] On the other hand, a cross-chain message verification device based on zero-knowledge virtual machine technology is provided, and the cross-chain message verification device based on zero-knowledge virtual machine technology includes: a processor; a memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned cross-chain message verification methods based on zero-knowledge virtual machine technology is implemented.

[0020] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned cross-chain message verification methods based on zero-knowledge virtual machine technology.

[0021] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0022] In the embodiment of the present invention, a special program is compiled and executed based on zkVM to process cross-chain messages, and zero-knowledge proofs are generated based on the RISC-V runtime; Solidity smart contracts are used as verifiers of on-chain proofs, which use cryptographic primitives to provide high-security verification; this technical point ensures that proofs generated off-chain can be safely and efficiently verified on-chain; off-chain proof generation based on zkVM and on-chain verification based on Solidity smart contracts are efficiently integrated to safely verify the integrity, authenticity and target routing of cross-chain message transmission between blockchain networks; the computationally intensive proof generation process is executed off-chain, and only lightweight verification is performed on-chain, which significantly reduces Gas consumption and verification delay compared with traditional cross-chain message verification technical solutions; the system adopts a modular design; the components responsible for proof generation, proof benchmark creation and on-chain verification are independent of each other, allowing independent updates and improvements; this modular design is also convenient for integration with various blockchain protocols and cross-chain messaging systems; the system includes a tool for generating proof benchmarks, which is used to test and verify whether the zk proof generation process is operating normally, which helps to ensure the correctness and repeatability of the zero-knowledge proof system.

[0023] Based on the above method, the off-chain proof generation based on zkVM and the on-chain verification of smart contracts are combined to achieve cross-chain message verification without the need for a trusted third party or centralized relayer; zero-knowledge proof technology ensures that sensitive message data will not be leaked during the verification process, thus achieving privacy protection; computationally intensive proof generation is performed off-chain, and only lightweight verification is performed on-chain, which significantly reduces Gas consumption and verification delays and improves efficiency; the modular design makes the system easy to integrate with a variety of blockchains and cross-chain protocols, and is suitable for application scenarios such as cross-chain asset transfer, distributed identity authentication, and decentralized finance, with extremely high practical value and market prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 This is a flow chart of a cross-chain message verification method based on zero-knowledge virtual machine technology provided by an embodiment of the present invention;

[0026] Figure 2 This is a block diagram of a cross-chain message verification system based on zero-knowledge virtual machine technology provided by an embodiment of the present invention;

[0027] Figure 3 It is a structural diagram of a cross-chain message verification device based on zero-knowledge virtual machine technology provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0029] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0030] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0031] In the embodiments of the present invention, sometimes the subscripts such as W 1 It may be written in non-subscript form such as W1. When the difference is not emphasized, the meaning is the same.

[0032] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0033] An embodiment of the present invention provides a cross-chain message verification method based on zero-knowledge virtual machine technology. The method can be implemented by a cross-chain message verification system based on zero-knowledge virtual machine technology. The cross-chain message verification system includes a supplementary component, a cross-chain message input module, a zero-knowledge virtual machine execution engine, a proof benchmark generator, and a smart contract of a verifier node.

[0034] Before using the system, the user must complete the configuration of the development environment, which requires the following tools:

[0035] (1) Rust toolchain: used to compile and execute the zkVM engine.

[0036] (2) Foundry: used for compilation and on-chain testing of Solidity smart contracts.

[0037] (3) Node.js: used to run JavaScript-based utility scripts.

[0038] (4) Cargo and related dependencies: used to build Rust applications.

[0039] To facilitate end-to-end deployment, the system provides scripts and configuration files to support integration with blockchain networks. This module includes files that implement the following functions: (1) clone the code repository and install dependencies; (2) compile zkVM programs based on the Rust language; (3) run the proof generation process and execute the verification process; (4) deploy smart contracts using blockchain development tools (such as Foundry and Hardhat), and interact with Solidity smart contracts.

[0040] like Figure 1The flowchart of the cross-chain message verification method based on zero-knowledge virtual machine technology is shown. The processing flow of the method may include the following steps:

[0041] S1. Through the supplementary components, query the cross-chain transaction message on the target chain. When a specific cross-chain transaction message is queried, obtain the cross-chain transaction message submitted by the user through the cross-chain message input module.

[0042] Optionally, the specific execution method of S1 is as follows:

[0043] Call the cross-chain message input module through the command line interface or application programming interface to obtain the cross-chain transaction message submitted by the user.

[0044] In one feasible implementation, the cross-chain message input module accepts input parameters including a cross-chain message, a source chain identifier, and a target chain identifier. The input may be provided via a command line interface or an application programming interface (API) call.

[0045] The present invention uses supplementary components (such as the beefy-listener tool) to query blockchain events. This step queries specific events on the source or target chain that indicate new cross-chain messages or proof submissions. After querying such events, an automated workflow can be triggered to achieve the following functions: (1) retrieve the corresponding proof from the off-chain system; (2) submit the proof to the on-chain validator contract. The supplementary components involved in this step are included in the integration and deployment module, allowing the present invention to monitor cross-chain transactions in real time, automatically complete cross-chain message verification, and ensure that verification anomalies can be reported in a timely manner.

[0046] S2. Compile and execute the SP1 program based on the zero-knowledge virtual machine execution engine, and generate the corresponding zero-knowledge proof based on the cross-chain transaction message.

[0047] Optionally, the specific operation of S2 may include S21-S22:

[0048] S21. Use Cargo, the official package management and build tool of the Rust language, to compile the SP1 program and generate an Executable and Linkable Format (ELF) optimized for the RISC-V runtime.

[0049] S22. According to the message string, source chain identifier and target chain identifier in the cross-chain transaction message, execute the proof generation command to generate a zero-knowledge proof corresponding to the cross-chain transaction message. The zero-knowledge proof encapsulates the commitment to the cross-chain transaction message, verifies whether the source and target chain identifiers are correctly embedded, and proves that the message meets the required integrity constraints.

[0050] In one possible implementation, the core of proof generation is the SP1 program, which is written in Rust and is designed to handle cross-chain messages. This step uses Cargo, the official package management and build tool for the Rust language, to compile the SP1 program into an executable and linkable format optimized for the RISC-V runtime. The build process integrates the zero-knowledge proof library and cryptographic primitives required to generate proofs. The zkVM execution engine implemented in Rust compiles and executes the SP1 program to generate a zero-knowledge proof that the provided message meets the required properties. The SP1 program contains the necessary logic to: (1) verify the structure of the message; (2) verify that the source and target chain identifiers match the expected values; and (3) compute cryptographic commitments based on the RISC-V runtime and generate a zk proof. The engine leverages Rust's performance and security features to securely generate proofs. The proof generation process is initiated by running a command (e.g., "cargo prove build"), which then executes the proof generation using runtime parameters.

[0051] After the program is compiled, the next step is to generate a zero-knowledge proof for a given cross-chain message. This step executes the proof generation command and specifies the message and chain identifier parameters. If the execution is successful, the system will generate a proof. During this process, the zkVM engine processes the input, calculates the cryptographic commitment, and generates a zero-knowledge proof that encapsulates: (1) the commitment to the message; (2) verification that the source and target chain identifiers are correctly embedded; and (3) proof that the message satisfies the required integrity constraints.

[0052] In the embodiment of the present invention, a Rust-based zero-knowledge virtual machine (zkVM) is used to compile and execute a dedicated program (hereinafter referred to as the "SP1 program") to process cross-chain messages. The program accepts parameters such as the message string, the source chain identifier (source chain ID), and the target chain identifier (target chain ID). Then, it calculates a zero-knowledge proof (zk proof) to prove that the message meets the predetermined integrity, source / target chain identification and authenticity standards without revealing the specific content of the message.

[0053] It should be noted that in order to further enhance interoperability, the present invention designs the system according to the modular concept. The present invention provides interfaces and APIs that allow integration with existing cross-chain messaging protocols. For example, the present invention can be integrated with existing relay mechanisms or blockchain cross-chain bridges to ensure that the generated zk proof can be used as a trusted verification layer before the cross-chain message is forwarded or used by the target chain application.

[0054] S3. Generate a proof benchmark based on the preset cross-chain information and the proof benchmark generator, and debug the smart contract of the verifier node based on the proof benchmark.

[0055] Optionally, the specific processing of S3 may be as follows:

[0056] According to the message string, source chain identifier and target chain identifier in the preset cross-chain message, the proof generation command is executed to generate the proof benchmark.

[0057] In one feasible implementation, the present invention provides a tool for generating proof benchmarks for development and testing purposes. These proof benchmarks serve as reference proofs that can be compared with the proofs generated by the zkVM. This process ensures that the proof generation logic remains consistent before and after the update, and the on-chain verification will pass successfully. The output of the proof benchmark generator is proof data in a format compatible with the Solidity smart contract used for verification.

[0058] The cross-chain message is the information to be transmitted. If you believe that a cross-chain message is true and reliable, you can directly execute the corresponding processing logic according to the instructions of the message itself, but this is a hidden danger and depends on the honesty of the repeater. Therefore, this method and system is to verify the authenticity and integrity of the message. The proof benchmark is not required for the actual execution process, but for debugging and is only used in the testing phase.

[0059] The proof benchmark is essentially a test case, which is the "standard answer" to the proof generated by a given cross-chain message. It includes the input parameters of the cross-chain message, public data and the corresponding proof. One cross-chain message corresponds to one proof benchmark. If the input parameters of the cross-chain message do not change, the proof benchmark will not change. The role of the proof benchmark is to provide reproducible test cases for the proof verification logic inside the smart contract, which is convenient for the development and testing of smart contracts.

[0060] S4. Submit the cross-chain transaction message and zero-knowledge proof to the smart contract of the verifier node. The smart contract verifies the zero-knowledge proof and obtains the verification result of the cross-chain transaction message.

[0061] Optionally, smart contracts are written in Solidity language and integrated with blockchain development frameworks to provide verification of zero-knowledge proofs through the consensus mechanism of other blockchains.

[0062] In one possible implementation, this step deploys a smart contract responsible for on-chain proof verification. The smart contract is written in Solidity and integrated with the blockchain development framework for easy compilation and deployment. The smart contract accepts a zk proof as input, verifies the zkproof based on pre-stored parameters (such as expected message commitment, source chain ID, and target chain ID), and finally returns the verification result. The smart contract is designed to work with the lowest gas cost while providing the highest degree of verification using the consensus mechanism of other blockchains.

[0063] Optionally, the specific operation of S4 may include the following S41-S44:

[0064] S41. Initiate a transaction on the target chain and submit the zero-knowledge proof to the smart contract of the validator node.

[0065] S42. The smart contract of the validator node parses the input zero-knowledge proof and checks whether the embedded source chain identifier and the target chain identifier match the expected values ​​preset in the smart contract.

[0066] In a feasible implementation, the expected value is determined when the smart contract is designed and used as an initialization parameter when deployed. For example, if a smart contract supports cross-chain message verification between a blockchain with ID 1 and a blockchain with ID 2, then the source chain identifier and the target chain identifier can only be 1 and 2.

[0067] S43. The smart contract of the validator node verifies the zero-knowledge proof using built-in cryptographic primitives or pre-verified parameters.

[0068] In one feasible implementation, the "pre-verified parameters" are the public parameters of the Verification Key. When deployed, the smart contract will have a built-in verification key for verifying the zkVM proof. This verification key is generated during the trusted setup process off-chain and corresponds closely to the zkVM program. With this verification key, the zero-knowledge proof generated by the zkVM can be verified. The smart contract uses this key to verify the legitimacy of the public data in the proof, thereby indirectly confirming whether the various fields of the message are correct.

[0069] S44. The smart contract of the validator node returns a status indicator indicating whether the verification process is successful or failed, and obtains the verification result of the cross-chain transaction message.

[0070] In a feasible implementation, the Solidity smart contract for on-chain verification is a key module of the present invention, which is deployed on the target chain (or verification blockchain) and has the following functions: (1) accepting the submitted zk proof as input; (2) executing the on-chain verification routine to check whether the validity of the proof is consistent with the cryptographic commitment of the message; (3) ensuring that the source and target chain identifiers provided in the proof match the expected parameters; (4) returning a Boolean value (or similar status indicator) indicating whether the proof is valid. This on-chain verification mechanism enables the final verification to be guaranteed by the consensus mechanism of the blockchain, while most of the calculations are completed by the zkVM off-chain. The zk proof generated by the zkVM is verified using the Solidity smart contract deployed on the blockchain. The smart contract verifies the generated zk proof to ensure that the cross-chain message is generated according to the correct protocol and meets the expected source and target constraints.

[0071] S5. If the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message.

[0072] In one feasible implementation, the authenticity and integrity of the cross-chain transaction are recognized, and subsequent processes are executed according to the actual content of the cross-chain transaction, such as unlocking or minting the corresponding digital assets.

[0073] Optionally, after obtaining the verification result, the method may further include the following steps:

[0074] The supplementary component records the verification results and alerts the system administrator when failures occur during the verification process.

[0075] In the embodiment of the present invention, a special program is compiled and executed based on zkVM to process cross-chain messages, and zero-knowledge proofs are generated based on the RISC-V runtime; Solidity smart contracts are used as verifiers of on-chain proofs, which use cryptographic primitives to provide high-security verification; this technical point ensures that proofs generated off-chain can be safely and efficiently verified on-chain; off-chain proof generation based on zkVM and on-chain verification based on Solidity smart contracts are efficiently integrated to safely verify the integrity, authenticity and target routing of cross-chain message transmission between blockchain networks; the computationally intensive proof generation process is executed off-chain, and only lightweight verification is performed on-chain, which significantly reduces Gas consumption and verification delay compared with traditional cross-chain message verification technical solutions; the system adopts a modular design; the components responsible for proof generation, proof benchmark creation and on-chain verification are independent of each other, allowing independent updates and improvements; this modular design is also convenient for integration with various blockchain protocols and cross-chain messaging systems; the system includes a tool for generating proof benchmarks, which is used to test and verify whether the zk proof generation process is operating normally, which helps to ensure the correctness and repeatability of the zero-knowledge proof system.

[0076] Based on the above method, the off-chain proof generation based on zkVM and the on-chain verification of smart contracts are combined to achieve cross-chain message verification without the need for a trusted third party or centralized relayer; zero-knowledge proof technology ensures that sensitive message data will not be leaked during the verification process, thus achieving privacy protection; computationally intensive proof generation is performed off-chain, and only lightweight verification is performed on-chain, which significantly reduces Gas consumption and verification delays and improves efficiency; the modular design makes the system easy to integrate with a variety of blockchains and cross-chain protocols, and is suitable for application scenarios such as cross-chain asset transfer, distributed identity authentication, and decentralized finance, with extremely high practical value and market prospects.

[0077] Figure 2 200 is a block diagram of a cross-chain message verification system based on zero-knowledge virtual machine technology provided by an embodiment of the present invention. The system 200 is used for a cross-chain message verification method based on zero-knowledge virtual machine technology. Figure 2 , the system 200 includes a supplementary component 210, a cross-chain message input module 220, a zero-knowledge virtual machine execution engine 230, a proof benchmark generator 240, and a smart contract 250 of a verifier node; wherein:

[0078] The supplementary component 210 is used to query the cross-chain transaction message on the target chain; if the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message;

[0079] The cross-chain message input module 220 is used to obtain the cross-chain transaction message submitted by the user when a specific cross-chain transaction message is queried;

[0080] The zero-knowledge virtual machine execution engine 230 is used to compile and execute the SP1 program and generate corresponding zero-knowledge proofs according to the cross-chain transaction message;

[0081] The proof benchmark generator 240 is used to generate a proof benchmark according to the preset cross-chain information, and debug the smart contract of the initial verifier node based on the proof benchmark;

[0082] The smart contract 250 of the verifier node is used to receive the cross-chain transaction message and the zero-knowledge proof, verify the zero-knowledge proof, and obtain the verification result of the cross-chain transaction message.

[0083] In the embodiment of the present invention, the off-chain proof generation based on zkVM and the on-chain verification of the smart contract are combined to realize cross-chain message verification without the need for a trusted third party or centralized repeater; the zero-knowledge proof technology ensures that sensitive message data will not be leaked during the verification process, thereby realizing privacy protection; the computationally intensive proof generation is executed off-chain, and only lightweight verification is performed on the chain, which significantly reduces Gas consumption and verification delay, and improves efficiency; the modular design makes the system easy to integrate with a variety of blockchains and cross-chain protocols, and is suitable for application scenarios such as cross-chain asset transfer, distributed identity authentication, and decentralized finance, and has extremely high practical value and market prospects.

[0084] Figure 3 : is a schematic diagram of the structure of a cross-chain message verification device based on zero-knowledge virtual machine technology provided by an embodiment of the present invention, such as Figure 3 As shown, the cross-chain message verification device based on zero-knowledge virtual machine technology may include the above Figure 2 The cross-chain message verification system based on zero-knowledge virtual machine technology is shown. Optionally, the cross-chain message verification device 310 based on zero-knowledge virtual machine technology may include a first processor 2001.

[0085] Optionally, the cross-chain message verification device 310 based on zero-knowledge virtual machine technology may also include a memory 2002 and a transceiver 2003.

[0086] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.

[0087] Combine the following Figure 3 The various components of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology are specifically introduced:

[0088] Among them, the first processor 2001 is the control center of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement an embodiment of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).

[0089] Optionally, the first processor 2001 can perform various functions of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.

[0090] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.

[0091] In a specific implementation, as an embodiment, the cross-chain message verification device 310 based on zero-knowledge virtual machine technology may also include multiple processors, such as Figure 3 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0092] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0093] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0094] The transceiver 2003 is used to communicate with a network device or a terminal device.

[0095] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0096] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and may be connected to the first processor 2001 through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0097] It should be noted that Figure 3 The structure of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology shown in the figure does not constitute a limitation on the router. The actual knowledge structure identification device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0098] In addition, the technical effects of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology can refer to the technical effects of the cross-chain message verification method based on zero-knowledge virtual machine technology described in the above method embodiment, and will not be repeated here.

[0099] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0100] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0101] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0102] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0103] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0104] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0107] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the system or unit, which can be electrical, mechanical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0111] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A cross-chain message verification method based on zero-knowledge virtual machine technology, characterized in that: The cross-chain message verification method based on zero-knowledge virtual machine technology is implemented by a cross-chain message verification system based on zero-knowledge virtual machine technology, and the cross-chain message verification system based on zero-knowledge virtual machine technology includes a supplementary component, a cross-chain message input module, a zero-knowledge virtual machine execution engine, a proof benchmark generator, and a smart contract of a verifier node; The method comprises: S1. Through the supplementary component, query the cross-chain transaction message on the target chain. When a specific cross-chain transaction message is queried, obtain the cross-chain transaction message submitted by the user through the cross-chain message input module; S2. Compile and execute the SP1 program based on the zero-knowledge virtual machine execution engine, and generate the corresponding zero-knowledge proof based on the cross-chain transaction message; S3. Generate a proof benchmark based on the preset cross-chain information and the proof benchmark generator, and debug the smart contract of the initial validator node based on the proof benchmark; S4. Submit the cross-chain transaction message and zero-knowledge proof to the smart contract of the verifier node. The smart contract verifies the zero-knowledge proof and obtains the verification result of the cross-chain transaction message. S5. If the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message.

2. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: The cross-chain transaction message submitted by the user is obtained through the cross-chain message input module, including: Call the cross-chain message input module through the command line interface or application programming interface to obtain the cross-chain transaction message submitted by the user.

3. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: The zero-knowledge virtual machine execution engine of S2 compiles and executes the SP1 program, and generates a corresponding zero-knowledge proof according to the cross-chain transaction message, including: S21. Use Cargo, the official package management and build tool of the Rust language, to compile the SP1 program and generate executable proof generation commands optimized for the RISC-V runtime. S22. According to the message string, source chain identifier and target chain identifier in the cross-chain transaction message, execute the proof generation command to generate a zero-knowledge proof corresponding to the cross-chain transaction message, wherein the zero-knowledge proof encapsulates the commitment to the cross-chain transaction message, verifies whether the source and target chain identifiers are correctly embedded, and proves that the message satisfies the required integrity constraints.

4. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: The S3 generates a proof benchmark according to the preset cross-chain information and the proof benchmark generator, including: According to the message string, source chain identifier and target chain identifier in the preset cross-chain message, the proof generation command is executed to generate the proof benchmark.

5. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: The smart contract is written in Solidity language, integrated with the blockchain development framework, and provides zero-knowledge proof verification through the consensus mechanism of other blockchains.

6. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: S4 submits the cross-chain transaction message and the zero-knowledge proof to the smart contract, and the smart contract verifies the zero-knowledge proof. The verification result of the cross-chain transaction message includes: S41. Initiate a transaction on the target chain and submit the zero-knowledge proof to the smart contract of the verifier node; S42, the smart contract of the validator node parses the input zero-knowledge proof and checks whether the embedded source chain identifier and the target chain identifier match the expected values ​​preset in the smart contract; S43. The smart contract of the validator node verifies the zero-knowledge proof using built-in cryptographic primitives or pre-verified parameters; S44. The smart contract of the validator node returns a status indicator indicating whether the verification process is successful or failed, and obtains the verification result of the cross-chain transaction message.

7. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1 is characterized in that: The method further comprises: The supplementary component records the verification results and sends a reminder to the system administrator when a failure occurs during the verification process.

8. A cross-chain message verification system based on zero-knowledge virtual machine technology, wherein the cross-chain message verification system based on zero-knowledge virtual machine technology is used to implement the cross-chain message verification method based on zero-knowledge virtual machine technology as claimed in any one of claims 1 to 7, characterized in that: The system includes a supplementary component, a cross-chain message input module, a zero-knowledge virtual machine execution engine, a proof benchmark generator, and a smart contract of a verifier node; wherein: The supplementary component is used to query the cross-chain transaction message on the target chain; if the verification result of the cross-chain transaction message is successful, the authenticity and integrity of the cross-chain transaction are recognized, and the subsequent process is executed according to the cross-chain transaction message; The cross-chain message input module is used to obtain the cross-chain transaction message submitted by the user when a specific cross-chain transaction message is queried; The zero-knowledge virtual machine execution engine is used to compile and execute the SP1 program and generate corresponding zero-knowledge proofs according to the cross-chain transaction message; The proof benchmark generator is used to generate a proof benchmark according to preset cross-chain information, and debug the smart contract of the initial verifier node based on the proof benchmark; The smart contract of the verifier node is used to receive the cross-chain transaction message and the zero-knowledge proof, verify the zero-knowledge proof, and obtain the verification result of the cross-chain transaction message.

9. A cross-chain message verification device based on zero-knowledge virtual machine technology, characterized in that: The cross-chain message verification device based on zero-knowledge virtual machine technology includes: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Block chain-based trusted energy data transaction method

    CN117391726A

  • Private transaction method and device

    CN119809826A

  • Method for verifying cross-chain transaction, and terminal device and readable storage medium

    WO2022143798A1