CN-121984680-A - Blockchain cross-chain transaction processing method, device, equipment, medium and program product
Abstract
The application provides a blockchain cross-chain transaction processing method which can be applied to the technical field of blockchain transactions. The blockchain cross-link transaction processing method includes the steps of responding to detection of cross-link transaction initiated by a user, recording the state of a target asset as a transaction state in a global state tree, responding to detection of zero knowledge proof corresponding to the cross-link transaction, verifying the zero knowledge proof, responding to zero knowledge proof verification, updating the global state tree according to verification results, carrying out attack pattern recognition according to records of the global state tree and the cross-link transaction to process the cross-link transaction according to recognition results, wherein the cross-link transaction indicates that the target asset is transferred from a source chain where the target asset is located to the target chain, and the records of the global state tree contain the state and/or verification results of the target asset. The application also provides a blockchain cross-chain transaction processing device, equipment, a storage medium and a program product. The embodiment of the application has the effect of improving the security of the block chain cross-chain transaction.
Inventors
- Gong Jingqiu
- HE HUIZHEN
- LI ZHAOJIANG
- LIU LISHAN
Assignees
- 中国工商银行股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20250625
Claims (12)
- 1. A blockchain cross-chain transaction processing method, comprising: in response to detecting a user initiated cross-chain transaction, recording a state of the target asset as a transaction state in a global state tree; Verifying the zero knowledge proof in response to detecting the zero knowledge proof corresponding to the cross-chain transaction, and updating a global state tree according to a verification result in response to the zero knowledge proof verification passing; performing attack pattern recognition according to the record of the global state tree and the cross-chain transaction so as to process the cross-chain transaction according to a recognition result; Wherein the cross-chain transaction indicates transferring the target asset from a source chain in which the target asset is located to a target chain; the record of the global state tree contains the state of the target asset and/or an update according to the verification result.
- 2. The method of claim 1, wherein said verifying the zero-knowledge proof comprises at least one of the following verifications: verifying integrity of the common parameters based on the trusted settings; generating a random challenge value for zero knowledge proof for verification; performing lightweight validation using the on-chain contracts; Verification using an under-chain form verification tool, and Random slice verification was performed multiple times.
- 3. The method of claim 1, wherein updating the global state tree based on the validation result comprises recording a common parameter validation flip state to the global state tree; And carrying out attack pattern recognition according to the record of the global state tree and the cross-chain transaction, wherein the attack pattern recognition comprises the step of verifying the overturn state according to the public parameters.
- 4. The method of claim 1, wherein said attack pattern recognition from said record of global state tree and said cross-chain transaction comprises: Identifying an attack mode through a rule engine and/or an anomaly detection model according to the global state tree and the cross-chain transaction; the anomaly detection model is obtained according to fusion training of a cross-chain transaction sample and a label.
- 5. The method of claim 4, wherein the characteristics of the cross-link transaction sample include at least one of a generation time of the zero-knowledge proof, a computational resource consumption pattern, or a cross-link path complexity.
- 6. The method as recited in claim 1, further comprising: Recording the verification result to a global state tree in response to zero knowledge proving that the verification fails, and Suspending a cross-chain transaction and auditing at least one of the zero knowledge proof, common parameters, the cross-chain transaction, and the global state tree.
- 7. The method as recited in claim 1, further comprising: Responsive to not identifying the attack pattern, recording a state of the target asset in a global state tree as a non-transacted state; transferring the target asset to a target chain.
- 8. The method as recited in claim 1, further comprising: and recording the state of the attack pattern recognition result to a global state tree.
- 9. A blockchain cross-chain transaction processing device, the device comprising: the global state tree management module is used for responding to the detection of the cross-chain transaction initiated by the user and recording the state of the target asset as the transaction state in the global state tree; a zero knowledge proof verification module for verifying the zero knowledge proof in response to detecting the zero knowledge proof corresponding to the cross-chain transaction, updating the global state tree according to the verification result in response to the zero knowledge proof verification passing, and The anomaly detection module is used for carrying out attack pattern recognition according to the record of the global state tree and the cross-chain transaction so as to process the cross-chain transaction according to a recognition result; Wherein the cross-chain transaction indicates transferring the target asset from a source chain in which the target asset is located to a target chain; the record of the global state tree contains the state of the target asset and/or an update according to the verification result.
- 10. An electronic device, comprising: One or more processors; a memory for storing one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-8.
- 11. A computer-readable storage medium, on which a computer program or instructions is stored, which, when executed by a processor, carries out the steps of the method according to any one of claims 1-8.
- 12. A computer program product comprising a computer program or instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.
Description
Blockchain cross-chain transaction processing method, device, equipment, medium and program product Technical Field The present application relates to the field of blockchains, and more particularly to a blockchain transaction technique, and more particularly to a blockchain cross-chain transaction processing method, apparatus, device, medium and program product. Background The cross-chain technology is used in the related scene that a plurality of inter-chain interaction information needs to be carried out to realize the purposes of transaction and the like, compared with the intra-chain transaction, the cross-chain transaction needs to depend on a cross-chain bridge or a repeater, and the common knowledge mechanisms and the finalization time of different chains are different, so that the security attack surface is easily enlarged, and the threat to the aspects of asset protection is caused. Because the cross-chain achieves asset and data intercommunication by connecting different blockchain networks, the cross-chain transaction faces the following multiple security risks. Double flower attack-the same asset is reused on multiple chains. Falsification proof attack-malicious nodes generate false zero knowledge proof to pass verification. And (3) the Sybil attack, namely the attacker counterfeits a plurality of identity manipulation consensus or verification processes. Smart contract vulnerabilities such as reentry attacks, integer overflows, etc. These risks make the security of blockchain cross-chain transactions further desirable. Disclosure of Invention In view of the foregoing, the present application provides blockchain cross-chain transaction processing methods, apparatus, devices, media, and program products that improve the security of blockchain cross-chain transactions. According to a first aspect of the application, a blockchain cross-chain transaction processing method is provided, and is characterized by comprising the steps of responding to detection of cross-chain transaction initiated by a user, recording the state of a target asset as a transaction state in a global state tree, responding to detection of zero knowledge proof corresponding to the cross-chain transaction, verifying the zero knowledge proof, updating the global state tree according to verification results in response to zero knowledge proof verification, carrying out attack pattern recognition according to records of the global state tree and the cross-chain transaction to process the cross-chain transaction according to recognition results, wherein the cross-chain transaction indicates that the target asset is transferred from a source chain where the target asset is located to a target chain, and the records of the global state tree contain the state of the target asset and/or are updated according to verification results. According to an embodiment of the application, the zero knowledge proof is verified, including at least one of verifying integrity of the ritual verification public parameters based on trusted settings, generating a random challenge value for the zero knowledge proof, performing a lightweight verification using an on-chain contract, verifying using an off-chain formal verification tool, and performing a plurality of random slice verifications. According to the embodiment of the application, the global state tree is updated according to the verification result, and the method comprises the steps of recording the common parameter verification overturn state to the global state tree, and carrying out attack pattern recognition according to the record of the global state tree and the cross-chain transaction, wherein the attack pattern recognition is carried out according to the common parameter verification overturn state. According to the embodiment of the application, the attack mode is identified according to the record of the global state tree and the cross-chain transaction, wherein the attack mode is identified according to the global state tree and the cross-chain transaction through a rule engine and/or an anomaly detection model, and the anomaly detection model is obtained according to fusion training of a cross-chain transaction sample and a label. According to an embodiment of the application, the characteristics of the cross-link transaction sample include at least one of a generation time of zero knowledge proof, a computational resource consumption pattern, or a cross-link path complexity. According to an embodiment of the application, the blockchain cross-chain transaction processing further includes recording a validation result to the global state tree in response to the zero knowledge proof validation failing, and suspending the cross-chain transaction and auditing at least one of the zero knowledge proof, the common parameters, the cross-chain transaction, and the global state tree. According to an embodiment of the application, the blockchain cross-chain transaction processing further inclu