CPC H04L 9/50 (2022.05) [G06F 16/2308 (2019.01); G06F 16/27 (2019.01); H04L 9/0825 (2013.01)] | 20 Claims |
1. A cross-blockchain mutual data storage method, comprising:
obtaining, by processing circuitry of a first node in a first blockchain network, initial data in a first data format from a first relay node in the first blockchain network, the first blockchain network corresponding to a first blockchain, and the initial data including transaction data in a target block in the first blockchain;
verifying the initial data according to a first oracle contract in the first node;
in response to a determination that the verification was successful, converting, according to a second data format configured for cross-chain transaction and specified in a second oracle contract associated with the first oracle contract, the initial data from the first data format into the second data format, and determining the initial data in the second data format as to-be-transferred data, the second oracle contract being deployed on a second node in a second blockchain network; and
transmitting the to-be-transferred data to the first relay node by:
obtaining a first cross-chain contract deployed in the first node;
invoking a cross-chain data transfer function in the first cross-chain contract; and
transmitting the to-be-transferred data to the first relay node,
wherein the first relay node encrypts the to-be-transferred data based on a public key of a second relay node in the second blockchain network to obtain encrypted data and transmits the encrypted data to the second relay node,
wherein the second relay node decrypts the encrypted data based on a private key of the second relay node to generate the to-be-transferred data and provides the to-be-transferred data to the second node, and
wherein the second node stores the to-be-transferred data.
|