A Cross-chain Message Verification Method and System Based on Zero-knowledge Virtual Machine Technology
By generating zero-knowledge proofs and verifying on-chain, the problem of trust dependence and computing high cost in cross-chain message verification is solved, and efficient and secure cross-chain message delivery is achieved.
Patent Information
- Application Number
- CN202510576243.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The existing cross-chain message verification technology relies on trusted relay nodes and is easily targeted by attacks. It has large computing volume, consumes a lot of gas, and has high latency, which affects user privacy and system efficiency.
The cross-chain message verification method based on zero-knowledge virtual machine technology is adopted to generate zero-knowledge proofs through the zero-knowledge virtual machine execution engine, and is verified by Solidity smart contracts on the chain to realize off-chain computing-intensive processes and on-chain lightweight verification.
Reduces Gas consumption and verification latency, ensures privacy protection, improves system efficiency, and supports the integration of multiple blockchain and cross-chain protocols.
Smart Images

Figure CN120110685B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical 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 progress of blockchain technology and the continuous expansion of application scenarios, the blockchain ecosystem has gradually grown, and 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 individual "value islands". However, in reality, the demand for interconnection between different blockchains has become increasingly prominent. How to connect the "value islands" formed by individual blockchains to each other has become an urgent problem to be solved in this field. Against this background, cross-chain technology has emerged, and various cross-chain technology solutions and protocols have been proposed one after another. The mainstream technical solutions include notary mechanism, side chain / relay, hash lock, distributed private key control, etc. Some technical solutions can only achieve the exchange or transfer of blockchain native assets, while a complete cross-chain should be able to reliably transfer any message between chains, that is, achieve cross-chain message transfer. Cross-chain message transfer allows different blockchain networks to communicate with each other, transfer transaction data, smart contract calls, and other information. Any cross-chain transaction is essentially composed of a series of cross-chain message transfers. The realization of the cross-chain message transfer function is crucial for expanding the blockchain ecosystem and achieving interoperability between different chains.
[0003] In cross-chain communication, messages may be tampered with or forged during the transmission process. Through cross-chain message verification, it can be checked whether the content of the message has been tampered with during the process of being transmitted from the source chain to the destination chain, and at the same time, it is verified whether the message comes from a trusted entity. If cross-chain communication lacks reliable cross-chain message verification, then this process has the potential to be maliciously attacked, which may cause significant losses to users. Therefore, researching the key technologies of cross-chain message verification is of great significance for ensuring the security and reliability of cross-chain communication and promoting the prosperity and development of the blockchain ecosystem.
[0004] In the prior art, cross-chain message verification often relies on trusted relay nodes or complex message transfer protocols. These methods have the following deficiencies: (1) They require a high trust assumption and are easily targeted for attack. (2) Sensitive information in the message may be leaked during the message verification process, affecting user privacy. (3) When traditional solutions perform verification on the chain, the computational amount is large, the Gas consumption is high, and the latency is high. Summary of the Invention
[0005] To solve the technical problems of privacy impact and high latency existing in the prior art, an 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. 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. 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 includes:
[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 a corresponding zero-knowledge proof according to the cross-chain transaction message;
[0010] S3. Generate a proof benchmark according to the preset cross-chain information and the proof benchmark generator, and debug the initial smart contract of the verifier node based on the proof benchmark;
[0011] S4. Submit the cross-chain transaction message and the zero-knowledge proof to the smart contract of the verifier node, and the smart contract verifies the zero-knowledge proof to obtain the verification result of the cross-chain transaction message;
[0012] S5. If the verification result of the cross-chain transaction message is verification success, recognize the authenticity and integrity of the cross-chain transaction, and execute the subsequent process 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. The system is applied to the cross-chain message verification method based on zero-knowledge virtual machine technology. 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 verification success, recognize the authenticity and integrity of the cross-chain transaction, and execute the subsequent process 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 cross - chain transaction messages;
[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 cross - chain transaction messages and zero - knowledge proofs, verify the zero - knowledge proofs, and obtain the verification result of the cross - chain transaction messages.
[0019] On the other hand, a cross - chain message verification device based on zero - knowledge virtual machine technology is provided. 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. When the computer - readable instructions are executed by the processor, any one of the methods in the above - mentioned cross - chain message verification method based on zero - knowledge virtual machine technology is implemented.
[0020] On the other hand, a computer - readable storage medium is provided. At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the methods in the above - mentioned cross - chain message verification method based on zero - knowledge virtual machine technology.
[0021] The beneficial effects brought by the technical solutions provided in the embodiments of the present invention at least include:
[0022] In the embodiments of the present invention, cross - chain messages are novelly processed based on zkVM compilation and execution of dedicated programs, and zero - knowledge proofs are generated based on RISC - V runtime; Solidity smart contracts are used as verifiers for on - chain proofs, which utilize cryptographic primitives to provide highly secure verification; this technical point ensures that the proofs generated off - chain can be securely and efficiently verified on - chain; efficiently integrates off - chain proof generation based on zkVM and on - chain verification based on Solidity smart contracts, and securely verifies the integrity, authenticity, and target routing of cross - chain message transmission between blockchain networks; places the computationally intensive proof generation process off - chain and only performs lightweight verification on - chain. Compared with traditional cross - chain message verification technical solutions, it significantly reduces Gas consumption and verification latency; 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 also facilitates integration with various blockchain protocols and cross - chain message transmission systems; the system includes tools for generating proof benchmarks, which are used to test and verify whether the zk proof generation process is running properly, and 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 is combined with the on-chain verification of smart contracts to achieve cross-chain message verification without a trusted third party or a centralized relayer; the zero-knowledge proof technology ensures that sensitive message data will not be leaked during the verification process, realizing privacy protection; the computationally intensive proof generation is executed off-chain, and only lightweight verification is performed on-chain, significantly reducing Gas consumption and verification latency, and improving efficiency; the modular design makes the system easy to integrate with various blockchains and cross-chain protocols, applicable to application scenarios such as cross-chain asset transfer, distributed identity verification, 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 will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0025] Figure 1 is a flowchart 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 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 is a schematic 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 OF THE EMBODIMENTS
[0028] The following will describe the technical solutions in the present invention with reference to the accompanying drawings.
[0029] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "example" in the present invention should not be construed as more preferred or more advantageous than other embodiments or design solutions. Exactly speaking, the use of the word "example" is intended to present concepts in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two can be selected.
[0030] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when not emphasizing the difference, their intended meanings are the same. "Of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when not emphasizing the difference, their intended meanings are the same.
[0031] In the embodiments of the present invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When not emphasizing the difference, their intended meanings are the same.
[0032] To make the technical problems, technical solutions, and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0033] The embodiments of the present invention provide a cross-chain message verification method based on zero-knowledge virtual machine technology. This 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 and requires the following tools:
[0035] (1) Rust toolchain: Used to compile and execute the zkVM engine.
[0036] (2) Foundry: Used for the 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 the zkVM program 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] As Figure 1 shown in the flowchart of the cross-chain message verification method based on zero-knowledge virtual machine technology, the processing flow of this method can include the following steps:
[0041] S1. Query cross-chain transaction messages on the target chain through the supplementary component. When specific cross-chain transaction messages are queried, obtain the cross-chain transaction messages 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 messages submitted by the user.
[0044] In a feasible implementation, the cross-chain message input module accepts input parameters including cross-chain messages, source chain identifiers, and target chain identifiers. The input can be provided through a command-line interface or application programming interface (API) call.
[0045] The present invention uses a supplementary component (such as the beefy-listener tool) to query blockchain events. This step queries specific events on the source chain or target chain indicating new cross-chain messages or proof submissions. After such events are queried, 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 verifier contract. The supplementary component involved in this step is included in the integration and deployment module, enabling the present invention to monitor cross-chain transactions in real time, automatically complete cross-chain message verification, and ensure timely reporting in case of verification anomalies.
[0046] S2. Compile the SP1 program based on the zero-knowledge virtual machine execution engine and execute it to generate a corresponding zero-knowledge proof according to the cross-chain transaction message.
[0047] Optionally, the specific operations of S2 may include S21 - S22:
[0048] S21. Compile the SP1 program using the official package management and build tool Cargo of the Rust language to generate an Executable and Linkable Format (ELF) optimized for 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 a feasible implementation, the core of proof generation is the SP1 program, which is written in Rust and is designed to process cross-chain messages. This step compiles the SP1 program using Cargo, the official package management and build tool for the Rust language, to generate an executable and linkable format optimized for RISC-V runtime. The build process integrates the zero-knowledge proof library and cryptographic primitives required for generating 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. Among them, the SP1 program contains the necessary logic for: (1) verifying the structure of the message; (2) verifying whether the source and target chain identifiers match the expected values; (3) calculating a cryptographic commitment based on the RISC-V runtime and generating a zk proof. The engine utilizes the performance and security features of Rust to securely generate proofs. The proof generation process is initiated by running a command (e.g., "cargo prove build"), and then the proof generation is executed with 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) verifying whether the source and target chain identifiers are correctly embedded; (3) proving that the message meets the required integrity constraints.
[0052] In an embodiment of the present invention, a Rust-based zero-knowledge virtual machine (zkVM) is utilized 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 a message string, a source chain identifier (source chain ID), and a target chain identifier (target chain ID). Then, it calculates a zero-knowledge proof (zk proof) that the message meets the predetermined integrity, source / target chain identification, and authenticity criteria 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 according to 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 can be as follows:
[0056] Execute a proof generation command based on the message string, source chain identifier, and target chain identifier in the preset cross-chain message to generate a proof benchmark.
[0057] In a feasible implementation, for development and testing purposes, the present invention provides a tool for generating proof benchmarks. These proof benchmarks, as reference proofs, can be compared with the proofs generated by the zkVM. This process can ensure that the proof generation logic remains consistent before and after the update, and the on-chain verification will succeed. 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 itself to be transmitted. If one believes that a cross-chain message is true and reliable, then the corresponding processing logic can be directly executed according to the instructions of the message itself. However, there are potential risks involved, depending on the honesty of the relayer. Therefore, this method and system are to verify the authenticity and integrity of this message. The proof benchmark is not required for the actual execution process but is only used in the testing phase for debugging.
[0059] The proof benchmark is essentially a test case, the "standard answer" for the proof generated for a given cross-chain message, including the input parameters of the cross-chain message, the 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, facilitating the development and testing of the smart contract.
[0060] S4. Submit the cross-chain transaction message and the zero-knowledge proof to the smart contract of the verifier node. The smart contract verifies the zero-knowledge proof to obtain the verification result of the cross-chain transaction message.
[0061] Optionally, the smart contract is written in Solidity language, integrated with the blockchain development framework, and provides verification of the zero-knowledge proof through the consensus mechanism of other blockchains.
[0062] In a feasible implementation, this step deploys a smart contract responsible for on-chain proof verification. The smart contract is written in Solidity language and integrated with the blockchain development framework, facilitating compilation and deployment. The smart contract accepts a zk proof as input and verifies the zkproof based on pre-stored parameters (such as the 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 operations 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 verifier node.
[0065] S42. The smart contract of the verifier node parses the input zero - knowledge proof and checks whether the embedded source - chain identifier and target - chain identifier match the expected values preset in the smart contract.
[0066] In a feasible implementation, the expected values are determined during the design of the smart contract and used as initialization parameters during deployment. For example, if a smart contract supports cross - chain message verification between blockchains with IDs 1 and 2, then one of the source - chain identifier and target - chain identifier can only be 1 and the other can only be 2.
[0067] S43. The smart contract of the verifier node uses built - in cryptographic primitives or pre - verified parameters to verify the zero - knowledge proof.
[0068] In a feasible implementation, the "pre - verified parameters" are the public parameters of the verification key (Verification Key). The smart contract will build in the verification key for verifying zkVM proofs during deployment. This verification key is generated during the off - chain trusted setup process and corresponds closely to the zkVM program. With this verification key, it is possible to verify the zero - knowledge proof generated by zkVM. The smart contract uses this key to verify the legality of the public data in the proof, thereby indirectly confirming whether each field of the message is correct.
[0069] S44. The smart contract of the verifier 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. It is deployed on the target chain (or verification blockchain), and its functions are as follows: (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 a 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 off-chain zkVM. The Solidity smart contract deployed on the blockchain is used to verify the zk proof generated by the zkVM. 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 verification success, recognize the authenticity and integrity of the cross-chain transaction, and execute the subsequent process according to the cross-chain transaction message.
[0072] In a feasible implementation, recognize the authenticity and integrity of the cross-chain transaction, and execute the subsequent process 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 result and sends a reminder to the system administrator when a failure occurs during the verification process.
[0075] In the embodiments of the present invention, a dedicated program is novelly compiled and executed based on zkVM to process cross-chain messages, and zero-knowledge proofs are generated based on the RISC-V runtime. The Solidity smart contract is used as a validator for on-chain proofs, which uses cryptographic primitives to provide highly secure verification. This technical point ensures that the proofs generated off-chain can be securely and efficiently verified on-chain. The efficient integration of off-chain proof generation based on zkVM and on-chain verification based on Solidity smart contracts securely verifies the integrity, authenticity, and target routing of cross-chain message passing between blockchain networks. The computationally intensive proof generation process is executed off-chain, and only lightweight verification is performed on-chain. Compared with traditional cross-chain message verification technical solutions, the Gas consumption and verification latency are significantly reduced. 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 also facilitates integration with various blockchain protocols and cross-chain message passing systems. The system includes tools for generating proof benchmarks, which are used to test and verify whether the zk proof generation process is running properly, helping to ensure the correctness and reproducibility of the zero-knowledge proof system.
[0076] Based on the above method, the combination of off-chain proof generation based on zkVM and on-chain verification of smart contracts realizes cross-chain message verification without a trusted third party or a centralized relayer. The zero-knowledge proof technology ensures that sensitive message data is not leaked during the verification process, achieving privacy protection. The computationally intensive proof generation is executed off-chain, and only lightweight verification is performed on-chain, significantly reducing the Gas consumption and verification latency and improving the efficiency. The modular design makes the system easy to integrate with multiple blockchains and cross-chain protocols, and is applicable to 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 It is a block diagram of a cross-chain message verification system based on zero-knowledge virtual machine technology provided by the embodiments of the present invention. The system 200 is used for the cross-chain message verification method based on zero-knowledge virtual machine technology. Refer to Figure 2 and 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 of the verifier node 250. Among them:
[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 verification success, 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 cross - chain transaction messages;
[0081] The proof benchmark generator 240 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;
[0082] The smart contract 250 of the verifier node is used to receive cross - chain transaction messages and zero - knowledge proofs, verify the zero - knowledge proofs, and obtain the verification result of the cross - chain transaction messages.
[0083] In the embodiments of the present invention, the off - chain proof generation based on zkVM is combined with the on - chain verification of smart contracts to achieve cross - chain message verification without a trusted third party or a centralized relayer; the zero - knowledge proof technology ensures that sensitive message data will not be leaked during the verification process, realizing privacy protection; the computationally intensive proof generation is executed off - chain, and only lightweight verification is executed on - chain, significantly reducing Gas consumption and verification latency, and improving efficiency; the modular design makes the system easy to integrate with various blockchains and cross - chain protocols, and is applicable to application scenarios such as cross - chain asset transfer, distributed identity authentication, and decentralized finance, with extremely high practical value and market prospects.
[0084] Figure 3 It is a schematic structural diagram of a cross - chain message verification device based on zero - knowledge virtual machine technology provided by the embodiments of the present invention. As Figure 3 shown, the cross - chain message verification device based on zero - knowledge virtual machine technology may include the above - mentioned Figure 2 cross - chain message verification system based on zero - knowledge virtual machine technology. 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 further include a memory 2002 and a transceiver 2003.
[0086] Among them, the first processor 2001, the memory 2002, and the transceiver 2003 may be connected through a communication bus, for example.
[0087] Next, in combination with Figure 3 each component of the cross - chain message verification device 310 based on zero - knowledge virtual machine technology will be 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 single processor or a collective term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or can be an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as: one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).
[0089] Optionally, the first processor 2001 can execute various functions of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology by running or executing software programs 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 the CPU0 and CPU1 shown in
[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 shown in
[0092] Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0093] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or may also be 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 compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or any other magnetic storage device, or any other medium that can be used to carry or store 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 be coupled to the first processor 2001 through an interface circuit ( Figure 3 not shown) of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology. The embodiments of the present invention do not make specific limitations thereto.
[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 not separately shown). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
[0096] Optionally, the transceiver 2003 may be integrated with the first processor 2001 or may exist independently and be coupled to the first processor 2001 through an interface circuit ( Figure 3 not shown) of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology. The embodiments of the present invention do not make specific limitations thereto.
[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 does not constitute a limitation to the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0098] In addition, the technical effects of the cross-chain message verification device 310 based on zero-knowledge virtual machine technology may refer to the technical effects of the cross-chain message verification method based on zero-knowledge virtual machine technology described in the above method embodiments, and will not be elaborated herein.
[0099] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The 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 ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (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 but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink 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 using 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 processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. 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.) means. 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 a data center that contains one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0102] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood by referring to the context before and after.
[0103] In the present invention, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or its similar expressions refer 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 represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0104] It should be understood that in various embodiments of the present invention, the magnitudes of the sequence numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0105] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0106] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the devices, systems, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0107] In 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 merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, 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 displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of systems or units can be electrical, mechanical, or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0110] If the above-mentioned 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, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0111] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to 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 the zero-knowledge virtual machine technology is implemented by a cross-chain message verification system based on the zero-knowledge virtual machine technology. The cross-chain message verification system based on the 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 includes: S1. Query cross-chain transaction messages on the target chain through the supplementary component. 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 a corresponding zero-knowledge proof according to the cross-chain transaction message; S3. Generate a proof benchmark according to the preset cross-chain information and the proof benchmark generator, and debug the smart contract of the initial verifier node based on the proof benchmark; S4. Submit the cross-chain transaction message and the zero-knowledge proof to the smart contract of the verifier node. The smart contract verifies the zero-knowledge proof to obtain the verification result of the cross-chain transaction message; S5. If the verification result of the cross-chain transaction message is successful verification, recognize the authenticity and integrity of the cross-chain transaction, and execute the subsequent process 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, wherein The obtaining the cross-chain transaction message submitted by the user through the cross-chain message input module includes: Call the cross-chain message input module through the command-line interface or the 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, wherein The compiling and executing the SP1 program based on the zero-knowledge virtual machine execution engine in S2 and generating a corresponding zero-knowledge proof according to the cross-chain transaction message includes: S21. Compile the SP1 program using the official package management and build tool Cargo of the Rust language to generate an executable proof generation command optimized for 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. 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.
4. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1, wherein, The generating a proof benchmark according to the preset cross-chain information and the proof benchmark generator in S3 includes: Execute the proof generation command according to the message string, source chain identifier, and target chain identifier in the preset cross-chain message to generate a proof benchmark.
5. The cross-chain message verification method based on zero-knowledge virtual machine technology according to claim 1, wherein The smart contract is written in the Solidity language, integrated with a blockchain development framework, and provides verification of zero-knowledge proofs 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, wherein The submitting the cross-chain transaction message and the zero-knowledge proof to the smart contract in S4, and the smart contract verifying the zero-knowledge proof to obtain 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 verifier node parses the input zero-knowledge proof and checks whether the embedded source chain identifier and target chain identifier match the expected values preset in the smart contract; S43. The smart contract of the verifier node uses built-in cryptographic primitives or pre-verified parameters to verify the zero-knowledge proof; S44. The smart contract of the verifier node returns a status indicator indicating whether the verification process is successful or failed, obtaining 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, characterized in that The method further includes: The supplementary component records the verification result and issues 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, 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 according to any one of claims 1-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 the smart contract of the 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 verification success, it recognizes the authenticity and integrity of the cross-chain transaction and executes the subsequent process 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, generating a corresponding zero-knowledge proof according to the cross-chain transaction message; The proof benchmark generator is used to generate a proof benchmark according to the preset cross-chain information and debug the initial smart contract of the 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 the zero-knowledge virtual machine technology includes: A processor; A memory, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that, Program code is stored in the computer-readable storage medium, and the program code can be called by the processor to execute the method described in 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