CN112583917B - CSCP-based hybrid chain construction method - Google Patents

CSCP-based hybrid chain construction method Download PDF

Info

Publication number
CN112583917B
CN112583917B CN202011458029.6A CN202011458029A CN112583917B CN 112583917 B CN112583917 B CN 112583917B CN 202011458029 A CN202011458029 A CN 202011458029A CN 112583917 B CN112583917 B CN 112583917B
Authority
CN
China
Prior art keywords
chain
transaction
cross
certificate
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011458029.6A
Other languages
Chinese (zh)
Other versions
CN112583917A (en
Inventor
臧铖
陈嘉俊
郭东升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Zheshang Bank Co Ltd
Original Assignee
China Zheshang Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Zheshang Bank Co Ltd filed Critical China Zheshang Bank Co Ltd
Priority to CN202011458029.6A priority Critical patent/CN112583917B/en
Publication of CN112583917A publication Critical patent/CN112583917A/en
Application granted granted Critical
Publication of CN112583917B publication Critical patent/CN112583917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Abstract

The invention discloses a mixed chain construction method based on CSCP, which is a decentralized inter-chain communication scheme.A block chain organization is provided with at least one cross-chain communication proxy node, and the proxy node can be connected with all nodes of an original ecological block chain; the method realizes the interaction of the convergence chain protocols of the alliance chain, the private chain, the public chain and other interlink protocol block chain networks by unifying the information format of the interlink standard interaction protocol CSCP; the CSCP protocol converts the block chain messages of different architectures into cross-chain bus messages with uniform standards, effectively gets through the value islands of each block chain network, has high throughput rate during service processing, and can meet the requirements of reality, reliability, equal value, transaction consistency and the like of information interaction. Assets and traffic on different blockchain platforms, including public, federation, private, and other inter-chain blockchain networks, will be able to be added with the identity of the native chain, building a larger blockchain ecosystem.

Description

CSCP-based hybrid chain construction method
Technical Field
The invention relates to the technical field of block chains, in particular to a hybrid chain construction method based on CSCP.
Background
The maximum value of a blockchain is to realize the transfer of information value, but a large multi-blockchain platform has strong exclusivity, so that a plurality of value islands exist in a blockchain network nowadays, particularly for a licensed chain and an unlicensed chain, the inter-chain interaction faces the problems of inconsistent architecture, inconsistent interfaces, inconsistent consensus and the like, and the problems of continuously reduced execution speed and continuously increased transaction delay generally exist, so that the transaction scale and the transaction speed are far from the requirements of high concurrency and high response speed of commercial application. These reasons have greatly limited the further development of block chains.
Disclosure of Invention
Aiming at the problem that core pain points cannot be solved by the conventional public chain and cross-chain, the invention provides a hybrid chain construction method based on CSCP.
The purpose of the invention is realized by the following technical scheme: a CSCP-based hybrid chain construction method comprises the following steps:
each block chain organization is provided with at least one cross-chain communication agent node, the agent nodes can be connected with all the nodes of the original ecological block chain, the construction of the hybrid chain is realized through the agent nodes, and the agent nodes are responsible for registration, message signature, transaction routing, signature verification, transaction existence verification and transaction consistency guarantee among all the parties of the block chain;
the method realizes the interaction of the convergence chain protocols of the alliance chain, the private chain, the public chain and other interlink protocol block chain networks by unifying the information format of the interlink standard interaction protocol CSCP;
the CSCP protocol converts block chain messages of different architectures into cross-chain bus messages of unified standard, and main fields comprise: version, protocol version; sourcechaini id, source chain address; DestChainID, destination chain address; crosschiainnpayload, cross-chain transaction content; timestamp, Timestamp; signature, proxy node signature; cert, cross-chain transaction node certificate; proof, presence verification information; OriginInfo, original transaction information for cross-chain transaction; extra, user extension field; wherein the Crossschainpayload is serialized into byte types through json, and the corresponding structure is analyzed through json when the byte types are transmitted to a destination chain according to a block chain architecture of cross-chain transaction;
the CSCP protocol defines a standard interface for information interaction between different block chains, and the standard interface comprises the following steps: the transaction conversion interface is used for adapting heterogeneous transaction messages to respective architectures through the CSCP protocol aiming at chains of different architectures.
Furthermore, the cross-chain standard interaction protocol CSCP is a basic protocol supporting mixed chain ecology, decentralized management and decentralized data storage are adopted, and the intercommunication of assets on the chain is realized; assets and traffic on different blockchain platforms can be added in with the identity of the native chain to construct a larger blockchain ecology.
Further, each party of the blockchain or the proxy node thereof is provided with a certificate management module for generating and managing the relevant CA certificate and digital certificate, and the functions of the certificate management module are as follows:
a. and (3) certificate issuing: generating a root certificate root.ca and a root certificate private key root.priv through a certificate management module; when communication is initiated between different block chains in a hybrid chain, identity information needs to be registered, and a root certificate root.ca of a destination chain issues a cross-chain certificate crosschain.cert and a cross-chain certificate private key crosschain.priv to a source chain;
b. and (3) certificate checking: the certificate management module provides a certificate checking service, and checks whether the content comprises a cross-link certificate signed and issued by a root.ca certificate of a destination link proxy node and whether a digest signature is legal or not;
c. certificate revocation: when the personal identity information of the user changes, or the private key is lost, leaked or suspected to be leaked, the certificate user can provide a certificate revocation request to the certificate management module, the certificate management module generates a certificate revocation list, all digital certificates which are revoked in the validity period are listed in the certificate revocation list, and whether the certificate of the cross-chain transaction is revoked is checked according to the certificate revocation list during certificate verification.
Further, the process of constructing the hybrid chain by different blockchain platforms includes the following steps:
(1) and (3) certificate issuance: issuing a certificate and a public and private key pair to a cross-chain agent node through a certificate management module;
(2) chain registration: the source chain carries out cross-chain registration to the destination chain, mainly comprising the identity information and the verification rule of the source chain, after the registration is successful, the verification engine of the destination chain can generate the verification rule of the chain, and stores the identity information and the chain information of the source chain into a registry of the destination chain for persistent storage;
(3) and (3) identity and verification rule management: the verification rules are used for verifying the existence and the validity of cross-chain transactions, the identity of the chain can be verified when different block chains in the mixed chain are communicated, and the verification rules of the corresponding chain are matched to verify the existence and the validity of the transactions;
(4) and (3) an inspection stage: checking whether a source chain generating the cross-chain transaction is registered and has related authority;
(5) a verification stage: matching an authentication rule in a registry of a destination chain through source chain identity information of the transaction, and then inputting transaction authority information, authentication rule and cross-chain transaction into an authentication engine for authentication;
(6) an execution stage: and executing the transaction after the cross-chain transaction passes the verification and returning the result.
Furthermore, authority control management is carried out through registration information, and the authority information of the chain can be specified during registration, wherein the authority information comprises the access authority of the chain, contract read-write authority, data read-write authority and information acquisition range; the verification can be carried out in the transaction verification stage, and flexible authority management and control can be carried out.
Further, the validity of the transaction message is guaranteed through asymmetric key signature and signature verification in the execution stage.
Further, the existence certification of the cross-chain transaction is realized by a Mercker certification, the cross-chain transaction certification generated by the source chain is constructed into a Mercker tree structure, and after the cross-chain transaction certification sent by the source chain is received by the target chain, the existence of the cross-chain transaction is verified through a Mercker certification method.
Further, ensuring cross-chain transaction consistency through cross-chain transaction locking and transaction commit rollback comprises the following steps:
the source chain initiates cross-chain transaction to the destination chain through the agent node of the source chain; the following operations are executed at the proxy node of the source chain and the proxy node of the destination chain:
the proxy node of the source chain generates a cross-chain transaction certificate and a cross-chain transaction abstract signature, locks a transaction alpha and initiates a cross-chain transaction request to the proxy node of the destination chain;
after receiving the cross-chain transaction request, the proxy node of the destination chain verifies the locked transaction alpha, locks the transaction beta if the verification is passed, generates a transaction beta locking certificate, and sends the transaction beta locking certificate to the proxy node of the source chain;
receiving and verifying a transaction beta locking certificate by a proxy node of a source chain, and if the transaction beta locking certificate passes the verification, initiating a cross-chain transaction request to a destination chain, wherein the cross-chain transaction request comprises a cross-chain transaction certificate and a cross-chain transaction summary signature;
the proxy node of the destination chain receives the cross-chain transaction request, verifies a cross-chain transaction certificate and a cross-chain transaction abstract signature, unlocks a transaction beta if the cross-chain transaction certificate and the cross-chain transaction abstract signature pass the verification, submits a cross-chain transaction, and returns a submitted cross-chain transaction certificate to the proxy node of the source chain;
the proxy node of the source chain receives and verifies the submitted cross-chain transaction certificate, and if the verification is passed, the transaction alpha is unlocked, so that the consistency operation of the transaction alpha and the transaction beta is realized;
in the verification process, the proxy node of the destination chain verifies whether the transaction beta is unlocked within the threshold time, and if the transaction beta is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain transaction and releasing the transaction beta; the proxy node of the source chain verifies whether the transaction alpha is unlocked within a threshold time, and if the transaction alpha is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain transaction and releasing the transaction alpha;
through transaction locking and interaction, the transaction alpha and the transaction beta are ensured to be unlocked at the same time or not unlocked at the same time.
Further, transaction locking and rollback are specified as follows:
generating random content s by a source chain, calculating a hash value H (Hash)(s), and sending the Hash value H of the random content s and threshold time T0 to a destination chain;
the source chain locks the transaction alpha with the hash value H and a threshold time T0;
the destination chain receives the hash value H of the random content s and locks the transaction beta with a threshold time T1 and H, wherein T1< T0;
the destination chain sends a transaction beta locking certificate and threshold time T1 to the source chain;
the source chain sends the original content s of the H to the destination chain, if the destination chain receives s within the threshold time T1, the transaction beta is unlocked, the source chain obtains the information locked by the transaction beta, otherwise, the transaction rollback is carried out;
and the destination chain sends the original content s of the H to the source chain, if the source chain receives s within the threshold time T0, the transaction alpha is unlocked, the destination chain acquires the information locked by the transaction alpha, and otherwise, the transaction rollback is carried out.
Further, the mixed chain message transmission process is carried out by the cross-chain proxy node, and comprises the following steps:
the source chain sends a cross-chain message to the proxy node of the source chain;
the proxy node of the source chain converts the type of the source chain message into CSCP;
the proxy node of the source chain signs the CSCP message and sends the CSCP message to the proxy node of the destination chain;
the agent node of the destination chain receives the CSCP message, and converts the CSCP message into a transaction message in a destination chain format after signature verification, identity verification, authority verification and existence verification are carried out on the CSCP message,
sending the cross-chain transaction to a destination chain;
the destination chain processes the cross-chain message and returns a processing result.
The invention has the beneficial effects that: the invention designs a cross-chain standard interaction protocol CSCP, which can unify information formats, so that the invention can be compatible with public chain, alliance chain, private chain and other cross-chain protocol block chain networks, effectively get through value isolated islands of each block chain network, has very high throughput rate when processing services, greatly improves the performance compared with single chain, and can meet the requirements of reality, reliability, equal value, transaction consistency and the like of information interaction. The hybrid chain construction scheme is a decentralized inter-chain communication scheme, and each block chain organization carries out cross-chain identity management, transaction certification, transaction consistency guarantee, inter-chain routing and the like. Assets and traffic on different blockchain platforms, including public, federation, private, and other inter-chain blockchain networks, will be able to be added with the identity of the native chain, building a larger blockchain ecosystem.
Drawings
FIG. 1 is a diagram of a hybrid chain architecture provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a hybrid chain construction provided by an embodiment of the present invention;
fig. 3 is an ecological schematic diagram of a hybrid chain constructed by public chains, federation chains, private chains, and other inter-chain blockchain networks provided by the embodiment of the present invention;
fig. 4 is a flow chart of mixed chain information interaction provided by the embodiment of the present invention;
FIG. 5 is a block diagram of a Merck tree according to an embodiment of the present invention;
FIG. 6 is a flow diagram of transaction locking and rollback provided by an embodiment of the present invention;
fig. 7 is a flow diagram of hybrid chain messaging provided by an embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The invention designs a CSCP-based hybrid chain construction method, wherein a hybrid chain architecture is shown in figure 1. The invention designs a cross-chain standard interaction protocol CSCP (cross chain standard communication protocol), which can unify information formats, so the invention can be compatible with public chain, alliance chain, private chain and other cross-chain protocol block chain networks, effectively get through the value isolated island of each block chain network, has very high throughput rate when processing services, has greatly improved performance compared with single chain, and can meet the requirements of reality, reliability, equal value, transaction consistency and the like of information interaction.
The invention mainly realizes the construction of a hybrid chain through a cross-chain communication agent node cross, and the main functions of the invention comprise: certificate management module, inter-chain communication protocol CSCP, cross-chain communication bus interface, etc. FIG. 2 is a diagram of mixed chain construction. The certificate management module is arranged on each party of the block chain or an agent node of each party, and is mainly responsible for functions of certificate issuing, management and the like, and the safety of interaction among the chains is ensured by means of cryptography. The cross is responsible for inter-chain communication, identity registration management of the chain, transaction authenticity verification, transaction consistency guarantee and other functions, and is a specific implementation of the CSCP protocol.
The mixed chain construction scheme is a decentralized inter-chain communication scheme, and each block chain organization carries out cross-chain identity management, transaction certification, transaction consistency guarantee, inter-chain routing and the like. Unlike the relay link approach, the relay link is a centralized inter-link management mode, which goes against the block link decentralized idea.
The CSCP provided by the invention is a basic protocol supporting mixed chain ecology, and realizes the interaction of a converged chain protocol of a alliance chain, a private chain, a public chain and other cross-chain block chain networks. The method adopts decentralized management and decentralized data storage, realizes asset intercommunication on the chain, and can promote global aggregate decentralized transaction, grid chain treatment and application value flow. Assets and traffic on different blockchain platforms, including public, federation, private, and other inter-chain blockchain networks, will be able to be added in with the identity of the native chain, building a larger blockchain ecosystem, as shown in fig. 3.
Under the existing block chain technology, the data storage adopts chain type local storage, which causes the problem that the parallel expansion cannot be realized, and the consensus mechanism adopts a synchronous state machine model, which causes the problem that the transaction cannot be processed efficiently, and is limited by the performance limit of a single node in the network, so that the single chain architecture cannot meet the requirements of application performance, capacity, user experience and the like. The advantage of the CSCP-based hybrid chain is that the applicable application scenarios are numerous, with processing performance and throughput far superior to that of a single chain, including but not limited to token transaction and traffic interaction between public and public chains, between cross-chains, and between public and alliance chains, most typically decentralized trading exchanges, financial payments, traceability alliance chains, node reward patterns, etc. The problem of value and data island in the current block chain world can be effectively solved, and a real block chain grid ecology is created.
And the two parties of the mixed chain communication communicate through the proxy node cross. Specifically, the method comprises the following steps:
the cross-chain message is transmitted to the cross-chain node of the destination chain by the transmitting interface of the cross-chain and then transmitted to the destination chain for relevant operation. TLS encryption is adopted in the communication process, so that the information transmission safety can be ensured. cross is mainly responsible for registration, message signing, transaction routing, signature verification, transaction existence verification, transaction consistency guarantee and the like among all parties of the block chain.
The CSCP is a mixed chain network communication basic protocol capable of satisfying cross-chain call between different block chains, and converts block chain messages of different architectures into cross-chain bus messages of a uniform standard, and the main fields of the protocol are as follows:
Figure BDA0002829982600000071
Figure BDA0002829982600000081
the cross-chain transaction content CrossconfornPayload is serialized into byte types through json, the byte types can be determined according to the block chain architecture of the cross-chain transaction, and the corresponding structure is analyzed through json when the byte types are transmitted to a destination chain.
The CSCP protocol defines a standard interface, which can be used for information interaction between different block chains. Mainly comprises the following steps:
the transaction conversion interface TxToCSCP \ CSCPToTx can adapt heterogeneous transaction messages to respective architectures through a bus standard protocol CSCP aiming at chains of different architectures;
the transaction sending interface SendTx is used for sending information to a destination chain by a source chain;
a transaction receiving interface ReceivTX for receiving cross-chain transaction by a destination chain;
the transaction verification interface VerifyCSCP is used for verifying transaction information;
the registration link port RegistChain is used for identity registration;
updating a link interface UpdateChain, which is used for updating the link identity information;
and the cancellation link interface DeleteChain is used for canceling the link identity information.
The key logic flow for transferring information between hybrid chains is shown in fig. 4, and includes the following steps:
(1) certificate issuance
And the certificate management module issues a certificate and a public and private key pair to the hybrid chain cross-chain proxy node. The specific issuing rule is as follows: assuming that chain A and chain B communicate with each other, the chain A crossbar certificate issues a chain crossing certificate and a public and private key pair to the chain B, the chain B crossbar certificate issues a chain crossing certificate and a public and private key pair to the chain A, and the certificate and the public and private key pair are deployed on the chain crossing communication proxy node crossbar. Then the B chain can use the root certificate to verify the cross-chain certificate of the message sent by the a chain, and similarly, the a chain can use the root certificate to verify the cross-chain certificate of the message sent by the B chain; meanwhile, the message digest signature is verified, so that cross-chain authority management is achieved and communication safety is guaranteed.
The invention designs and realizes a certificate management module certManage which is mainly used for generating and managing related CA certificates and digital certificates and has the functions of certificate issuing, public and private key generation, certificate checking, certificate revocation and the like. The method comprises the following specific steps:
a. and (3) certificate issuing: the crossgene node generates a root certificate root.ca and a root certificate private key root.priv through certManage. When communication is initiated between different blockchains in a hybrid chain, identity information needs to be registered, and a cross-chain certificate crosschain certificate, cert and a cross-chain certificate private key crosschain certificate, crosschain certificate and priv are signed by a root certificate root.
b. And (4) certificate checking: certManage provides a certificate checking service that checks whether content includes a cross-chain certificate that is signed by a root.ca. certificate of a destination chain cross, whether a digest signature is legitimate, and so on.
c. Certificate revocation: when the user's personal identity information changes, or the private key is lost, leaked, or suspected to be leaked, the certificate user may send a certificate revocation request to CertManage, which may generate a certificate revocation list that lists all digital certificates that are revoked but are in the validity period. When the certificate is verified, whether the certificate of the cross-chain transaction is revoked is checked according to the certificate revocation list.
(2) Chain registration
The source chain can carry out cross-chain registration to the destination chain, the cross-chain registration mainly comprises identity information, a verification rule and the like of the source chain, after the registration is successful, a verification engine of the destination chain can generate the verification rule of the chain, and the legality of the cross-chain transaction is verified according to the verification rule. Different validation rules are generated for blockchains of different architectures. And storing the identity information and the chain information of the source chain into a registry of the destination chain for persistent storage. The verification engine of the destination chain cross checks the information registered by the source chain.
And performing authority control management through the registration information, wherein the authority information of the chain can be specified during registration, such as the access authority of the chain, contract read-write authority, data read-write authority, information acquisition range and the like. The method can be used for verification in a transaction verification stage, authority management and control can be flexibly carried out, safety and isolation of data among chains are guaranteed, and a refined and customized authority management strategy can better meet application scenarios. The registration information content is shown in the following table:
Figure BDA0002829982600000091
Figure BDA0002829982600000101
cross supports chain update and logout operations, the overall process is similar to the registration process, and the content of the registry is updated after the update and logout information is checked and verified.
(3) Identity and authentication rule management
Validation rules are used by a validation engine to validate presence and validity for cross-chain transactions. Because the verification rules of each chain are different due to the heterogeneity of each chain, the verification engine of the cross cannot provide a uniform verification rule for each chain, and therefore when the source chain is required to be registered with the destination chain, the cross of the destination chain deploys and registers the corresponding verification rules, and records the identity information of the registered chain into the registry. When different block chains in the mixed chain are communicated, the identity of the chain can be verified, the verification rule of the corresponding chain is matched to verify the existence and the validity of the transaction, and the related transaction is executed after the verification is passed.
(4) Inspection phase
The checking work of the cross-chain transaction comprises the following steps: whether the source chain generating the cross-chain transaction is registered or not and whether the source chain has related authority (including access authority of the chain, contract read-write authority, data read-write authority, information acquisition range and the like) or not.
(5) Verification phase
And the checked cross-chain transaction enters a verification stage, the verification stage is executed by a verification engine, a verification rule is matched in a registry of a destination chain through the source chain identity information of the transaction, and then the transaction authority information, the verification information (existence and validity), the verification rule and the cross-chain transaction are input into the verification engine and then verified. After the verification is passed, the transaction will enter the execution phase.
(6) Execution phase
And after the cross-chain transaction passes the verification, the execution phase is entered, and a method for ensuring transaction validity, transaction existence certification and transaction consistency is designed in the execution phase.
6.1 transaction validity
The validity of the transaction message is ensured through asymmetric key signature and signature verification.
6.2, transaction Presence
In the present invention, the proof of existence of cross-chain transactions is achieved by mercker's proof. And after receiving the cross-chain transaction certificate sent by the chain A, the chain B verifies the existence of the cross-chain transaction by a Merckel certification method.
The structure of the merkel tree is shown in fig. 5, where each non-leaf node is labeled by the hash value of its child node, and the root node of the tree is called the merkel root (merkle root). FIG. 5 shows the Merck tree structure for a block X, and if it is verified whether the transaction Tx _ D is in the block, the entire block does not need to be obtained, but only the transactions Tx _ D, H _ AB, H _ C and merkle root need to be provided. The specific process is as follows:
a. calculating hash according to the transaction Tx _ D to obtain H _ D;
b. calculating hash according to the H _ C and the H _ D to obtain H _ CD;
c. calculating hash according to the H _ AB and the H _ CD to obtain H _ ABCD;
d. comparing H _ ABCD with merkle root, if the same, it is proved that transaction Tx _ D exists in the block, otherwise it is said that it does not exist.
The communication between the mixed chains needs existence certification, and the transaction information needs to be provided with verification information, wherein the certification information refers to initial hash values used in the verification process, namely H _ AB, H _ C, merkle root and Tx _ D.
6.3 transaction consistency
The block chain ensures the consistency among the nodes through a consensus mechanism, and the consensus algorithm can ensure that the state is determined and all transaction execution results are consistent in all clusters aiming at the transaction guarantee in the single chain. However, in the cross-chain interaction, on one hand, the inter-chain states are not mutually synchronized, and if the consensus protocols adopted in the chain are different, the intra-node consensus states cannot be used as the signs of transaction submission. However, cross-chain interaction needs to acquire transaction and state data between chains, so that the transaction guarantee in the cross-chain interaction process becomes a key point.
In order to realize consistency of cross-chain transactions among mixed chains, the invention designs a cross-chain transaction lock scheme, and the cross-chain transaction interaction flow is as follows:
a. chain A initiates a cross-chain transaction to chain B through the proxy node of the chain A;
b. the following operations are performed at the proxy node of chain a and the proxy node of chain B:
1. the agent node of the chain A generates a cross-chain transaction certificate and a cross-chain transaction abstract signature, locks a transaction alpha and sends a cross-chain transaction request to the agent node of the chain B;
2. after receiving the cross-chain transaction request, the agent node of the chain B verifies the locked transaction alpha, locks the transaction beta if the verification is passed, generates a transaction beta locking certificate, and sends the transaction beta locking certificate to the agent node of the chain A;
3. the proxy node of the chain A receives and verifies the transaction beta locking certificate, and if the transaction beta locking certificate passes the verification, a cross-chain transaction request is sent to the chain B, wherein the cross-chain transaction request comprises a cross-chain transaction certificate and a cross-chain transaction abstract signature;
4. the agent node of the chain B receives the cross-chain transaction request, verifies a cross-chain transaction certificate and a cross-chain transaction abstract signature, unlocks a transaction beta if the verification is passed, submits a cross-chain transaction, and returns a submitted cross-chain transaction certificate to the agent node of the chain A;
5. and the proxy node of the chain A receives and verifies the submitted cross-chain transaction certificate, and if the cross-chain transaction certificate passes the verification, the transaction alpha is unlocked, so that the consistency operation of the transaction alpha and the transaction beta is realized.
In the verification process:
the agent node of the chain B verifies whether the transaction beta is unlocked within the threshold time, and if the transaction beta is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain transaction and releasing the transaction beta;
the agent node of the chain A verifies whether the transaction alpha is unlocked within the threshold time, and if the transaction alpha is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain affair and releasing the affair alpha;
through transaction locking and interaction, the transaction alpha and the transaction beta are ensured to be unlocked at the same time or not unlocked at the same time.
In one embodiment, as shown in FIG. 6, the specific flow of transaction locking and rollback is as follows (both performed on the proxy node):
1. chain A generates random content s, calculates a hash value H (Hash (s)), and sends the hash value H of the random content s and threshold time T0 to chain B;
2. chain A locks transaction alpha with hash value H and threshold time T0, where alpha is locked to value asset information related to cross-chain interaction;
3. chain B receives the hash value H of the random content s and locks a transaction beta with a threshold time T1 (T1< T0), wherein the transaction beta can be the value asset information related to cross-chain interaction;
4. chain B sends the transaction β lock attestation and the threshold time T1 to chain A;
5. the chain A sends the original content s of the H to the chain B, if the chain B receives s within the threshold time T1, the transaction beta is unlocked, the chain A obtains the value asset locked by the transaction beta, and otherwise, the transaction rollback is carried out;
6. chain B sends the original content s of H (s was sent by chain a in step 5) to chain a, if chain a receives s within a threshold time T0, then the transaction α is unlocked, chain B acquires the value asset that transaction α locks, otherwise the transaction rolls back.
The invention realizes transaction locking and rollback through the hash value, and utilizes the characteristics of hash calculation, so that forward calculation (calculating H by s) is simpler, but reverse calculation (calculating s by H) is difficult to realize, and attack can be effectively prevented.
(7) Result return
The destination chain constructs the execution structure and the execution state information into return information and sends the return information to the source chain.
In the process of mixed chain message delivery, the cross-chain agent node cross is used for carrying out the message delivery, and the main flow of the message delivery is shown in fig. 7.
1. Chain A sends a cross-chain message to the proxy node cross;
2. the crossgene of chain A converts the type of the A chain message into a bus standard communication message CSCP;
3. the cross of chain a signs the CSCP message;
4. the crossgene of chain A sends a CSCP message to the crossgene of chain B;
5. the cross of chain B receives the CSCP message;
6. cross of chain B verifies the signature of CSCP message;
7. the cross of chain B authenticates the CSCP message;
8. the cross of the chain B carries out authority verification on the CSCP message;
9. cross of chain B performs presence verification on CSCP messages;
10. the cross of chain B converts the CSCP message into a transaction message in a B chain format;
11. cross gene of chain B sends a cross to chain B;
12. chain B processes the cross-chain message;
13. chain B returns the processing results.
In one embodiment, a computer device is provided, which includes a memory and a processor, where the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor executes the steps in the CSCP-based hybrid chain construction method in the foregoing embodiments.
In one embodiment, a storage medium storing computer readable instructions is provided, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the CSCP-based hybrid chain construction method in the embodiments described above. The storage medium may be a nonvolatile storage medium.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (9)

1. A CSCP-based hybrid chain construction method is characterized by comprising the following steps:
each block chain organization is provided with at least one cross-chain communication agent node, the agent nodes can be connected with all the nodes of the original ecological block chain, the construction of the hybrid chain is realized through the agent nodes, and the agent nodes are responsible for registration, message signature, transaction routing, signature verification, transaction existence verification and transaction consistency guarantee among all the parties of the block chain;
the method realizes the interaction of the convergence chain protocols of the alliance chain, the private chain, the public chain and other interlink protocol block chain networks by unifying the information format of the interlink standard interaction protocol CSCP;
the CSCP protocol converts block chain messages of different architectures into cross-chain bus messages of unified standard, and main fields comprise: version, protocol version; sourcechaini id, source chain address; DestChainID, destination chain address; crosschiainnpayload, cross-chain transaction content; timestamp, Timestamp; signature, proxy node signature; cert, cross-chain transaction node certificate; proof, presence verification information; OriginInfo, original transaction information for cross-chain transaction; extra, user extension field; wherein the Crossschainpayload is serialized into byte types through json, and the corresponding structure is analyzed through json when the byte types are transmitted to a destination chain according to a block chain architecture of cross-chain transaction;
the CSCP protocol defines a standard interface for information interaction between different block chains, which includes: the transaction conversion interface is used for adapting heterogeneous transaction messages to respective architectures through a CSCP protocol aiming at chains of different architectures;
ensuring cross-chain transaction consistency through cross-chain transaction locking and transaction commit rollback includes:
the source chain initiates cross-chain transaction to the destination chain through the agent node; the following operations are executed at the proxy node of the source chain and the proxy node of the destination chain:
the proxy node of the source chain generates a cross-chain transaction certificate and a cross-chain transaction abstract signature, locks a transaction alpha and initiates a cross-chain transaction request to the proxy node of the destination chain;
after receiving the cross-chain transaction request, the proxy node of the destination chain verifies the locked transaction alpha, locks the transaction beta if the verification is passed, generates a transaction beta locking certificate, and sends the transaction beta locking certificate to the proxy node of the source chain;
a proxy node of a source chain receives and verifies a transaction beta locking certificate, if the transaction beta locking certificate passes the verification, a cross-chain transaction request is initiated to a target chain, and the cross-chain transaction request comprises a cross-chain transaction certificate and a cross-chain transaction abstract signature;
the proxy node of the destination chain receives the cross-chain transaction request, verifies a cross-chain transaction certificate and a cross-chain transaction abstract signature, unlocks a transaction beta if the cross-chain transaction certificate and the cross-chain transaction abstract signature pass the verification, submits a cross-chain transaction, and returns a submitted cross-chain transaction certificate to the proxy node of the source chain;
the proxy node of the source chain receives and verifies the submitted cross-chain transaction certificate, and if the cross-chain transaction certificate passes the verification, the transaction alpha is unlocked, so that the consistency operation of the transaction alpha and the transaction beta is realized;
in the verification process, the proxy node of the destination chain verifies whether the transaction beta is unlocked within the threshold time, and if the transaction beta is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain transaction and releasing the transaction beta; the proxy node of the source chain verifies whether the transaction alpha is unlocked within a threshold time, and if the transaction alpha is unlocked, the cross-chain transaction is executed; otherwise, rolling back the cross-chain affair and releasing the affair alpha;
through transaction locking and interaction, the transaction alpha and the transaction beta are ensured to be unlocked or not unlocked at the same time.
2. The CSCP-based hybrid chain construction method according to claim 1, wherein the cross-chain standard interaction protocol CSCP is a basic protocol supporting hybrid chain ecology, and realizes on-chain asset intercommunication by decentralized management and decentralized data storage; assets and traffic on different blockchain platforms can be added in with the identity of the native chain to construct a larger blockchain ecology.
3. The CSCP-based hybrid chain construction method according to claim 1, wherein certificate management modules are provided on each party of the blockchain or a proxy node thereof, and configured to generate and manage a related CA certificate and a related digital certificate, and the functions of the certificate management modules are specifically as follows:
a. issuing a certificate: generating a root certificate root.ca and a root certificate private key root.priv through a certificate management module; when communication is initiated between different block chains in a hybrid chain, identity information needs to be registered, and a root certificate root.ca of a destination chain issues a cross-chain certificate crosschain.cert and a cross-chain certificate private key crosschain.priv to a source chain;
b. and (4) certificate checking: the certificate management module provides a certificate checking service, and checks whether the content comprises a cross-link certificate signed and issued by a root.ca certificate of a destination link proxy node and whether a digest signature is legal or not;
c. certificate revocation: when the personal identity information of the user changes, or the private key is lost, leaked or suspected to be leaked, the certificate user can provide a certificate revocation request to the certificate management module, the certificate management module generates a certificate revocation list, all digital certificates which are revoked in the validity period are listed in the certificate revocation list, and whether the certificate of the cross-chain transaction is revoked is checked according to the certificate revocation list during certificate verification.
4. The CSCP-based hybrid chain construction method according to claim 1, wherein the process of constructing the hybrid chain by using different blockchain platforms comprises the following steps:
(1) and (3) certificate issuance: issuing a certificate and a public and private key pair to a cross-chain agent node through a certificate management module;
(2) chain registration: the source chain carries out cross-chain registration to the destination chain, mainly comprising the identity information and the verification rule of the source chain, after the registration is successful, the verification engine of the destination chain can generate the verification rule of the chain, and stores the identity information and the chain information of the source chain into a registry of the destination chain for persistent storage;
(3) identity and authentication rule management: the verification rules are used for verifying the existence and the validity of cross-chain transactions, the identity of the chain can be verified when different block chains in the mixed chain are communicated, and the verification rules of the corresponding chain are matched to verify the existence and the validity of the transactions;
(4) and (3) an inspection stage: checking whether a source chain generating the cross-chain transaction is registered and has related authority;
(5) a verification stage: matching verification rules in a registry of a destination chain through source chain identity information of the transaction, and then inputting transaction authority information, verification rules and cross-chain transaction into a verification engine for verification;
(6) an execution stage: and after the cross-chain transaction passes the verification, executing the transaction and returning the result.
5. The CSCP-based hybrid chain construction method according to claim 1, wherein authority control management is performed through registration information, and authority information of a chain can be specified during registration, including access authority of the chain, contract read-write authority, data read-write authority, and information acquisition range; and verification can be performed in the transaction verification stage, and flexible authority management and control can be performed.
6. The CSCP-based hybrid chain construction method according to claim 1, wherein the validity of the transaction message is guaranteed by asymmetric key signature and signature verification in the execution stage.
7. The CSCP-based hybrid chain construction method according to claim 1, wherein cross-chain transaction existence certification is realized by Merckel certification, cross-chain transaction certification generated by a source chain is constructed into a Merckel tree structure, and after a cross-chain transaction certification sent by the source chain is received by a destination chain, the existence of cross-chain transaction is verified by a Merckel certification method.
8. The CSCP-based hybrid chain construction method according to claim 1, wherein the transaction locking and rollback are specifically as follows:
the source chain generates random content s, calculates a hash value H-Hash(s), and sends the hash value H of the random content s and threshold time T0 to the destination chain;
the source chain locks the transaction alpha with the hash value H and the threshold time T0;
the destination chain receives the hash value H of the random content s and locks the transaction β with a threshold time T1 and H, where T1< T0;
the destination chain sends a transaction beta locking certificate and a threshold time T1 to the source chain;
the source chain sends the original content s of the H to the destination chain, if the destination chain receives s within the threshold time T1, the transaction beta is unlocked, the source chain obtains the information locked by the transaction beta, otherwise, the transaction rollback is carried out;
and the destination chain sends the original content s of the H to the source chain, if the source chain receives s within the threshold time T0, the transaction alpha is unlocked, the destination chain acquires the information locked by the transaction alpha, and otherwise, the transaction rollback is carried out.
9. The CSCP-based hybrid chain construction method according to claim 1, wherein the hybrid chain message passing process is performed by a cross-chain proxy node, comprising the steps of:
the source chain sends a cross-chain message to the agent node;
the proxy node of the source chain converts the type of the source chain message into CSCP;
the proxy node of the source chain signs the CSCP message and sends the CSCP message to the proxy node of the destination chain;
the agent node of the destination chain receives the CSCP message, and after signature verification, identity verification, authority verification and existence verification are carried out on the CSCP message, the CSCP message is converted into a transaction message in a destination chain format, and cross-chain transaction is sent to the destination chain;
the destination chain processes the cross-chain message and returns a processing result.
CN202011458029.6A 2020-12-10 2020-12-10 CSCP-based hybrid chain construction method Active CN112583917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011458029.6A CN112583917B (en) 2020-12-10 2020-12-10 CSCP-based hybrid chain construction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011458029.6A CN112583917B (en) 2020-12-10 2020-12-10 CSCP-based hybrid chain construction method

Publications (2)

Publication Number Publication Date
CN112583917A CN112583917A (en) 2021-03-30
CN112583917B true CN112583917B (en) 2022-09-06

Family

ID=75131509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011458029.6A Active CN112583917B (en) 2020-12-10 2020-12-10 CSCP-based hybrid chain construction method

Country Status (1)

Country Link
CN (1) CN112583917B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259328B (en) * 2021-04-22 2023-01-10 国网青海省电力公司 Internal and external network data interaction system for power grid
CN113256290B (en) * 2021-05-14 2023-04-18 杭州链网科技有限公司 Decentralized encrypted communication and transaction system
CN113452781B (en) * 2021-06-28 2023-02-14 上海计算机软件技术开发中心 Block chain cross-chain system and method
CN113783949A (en) * 2021-08-26 2021-12-10 浙商银行股份有限公司 Cross-chain decentralized method based on contract management
CN113904875B (en) * 2021-12-06 2022-02-22 湖南宸瀚信息科技有限责任公司 Multi-chain fusion authority control system based on block chain
CN115190162B (en) * 2022-06-27 2023-11-28 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain
CN115330161A (en) * 2022-08-03 2022-11-11 国网江苏省电力有限公司南通供电分公司 Power infrastructure and subcontractor credit management method and system based on block chain technology
CN115982208B (en) * 2022-08-24 2023-09-29 淮阴工学院 Cold chain product relevance query method and device based on block chain cross-chain collaboration

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110061851A (en) * 2019-04-28 2019-07-26 广州大学 A kind of across trust domain authentication method and system of decentralization
CN110266655A (en) * 2019-05-30 2019-09-20 中国工商银行股份有限公司 A kind of across chain interconnected method, equipment and system based on block chain
CN110650189A (en) * 2019-09-20 2020-01-03 深圳供电局有限公司 Relay-based block chain interaction system and method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170331896A1 (en) * 2016-05-13 2017-11-16 De La Rue International Limited Methods and systems for processing assets
US10778758B2 (en) * 2017-06-30 2020-09-15 Verizon Patent And Licensing, Inc. Scalable and secure vehicle to everything communications
CN108764925A (en) * 2018-05-31 2018-11-06 李沁福 A kind of synthesis business platform based on block chain technology
CN108900585A (en) * 2018-06-15 2018-11-27 浙江华信区块链科技服务有限公司 Across chain transaction consistency implementation method
CN109145205B (en) * 2018-07-27 2020-09-01 阿里巴巴集团控股有限公司 Cross-chain data operation method and device based on block chain
CN111245840B (en) * 2020-01-14 2021-12-24 北京工业大学 Inter-block chain cross-chain information transmission control system
CN111598566A (en) * 2020-04-30 2020-08-28 厦门潭宏信息科技有限公司 Network payment system based on mixed cross-chain
CN111666323B (en) * 2020-05-15 2023-05-23 西安纸贵互联网科技有限公司 Cross-chain intercommunication method and system for block chain
CN111784518B (en) * 2020-06-30 2024-04-05 京东科技信息技术有限公司 Block chain cross-chain processing method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110061851A (en) * 2019-04-28 2019-07-26 广州大学 A kind of across trust domain authentication method and system of decentralization
CN110266655A (en) * 2019-05-30 2019-09-20 中国工商银行股份有限公司 A kind of across chain interconnected method, equipment and system based on block chain
CN110650189A (en) * 2019-09-20 2020-01-03 深圳供电局有限公司 Relay-based block chain interaction system and method

Also Published As

Publication number Publication date
CN112583917A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112583917B (en) CSCP-based hybrid chain construction method
CN112615915B (en) Method for constructing alliance chain between private chains
CN110266655B (en) Cross-chain interconnection method, device and system based on block chain
CN112529706B (en) Decentralizing heterogeneous public chain asset exchange method
CN110288480B (en) Private transaction method and device for blockchain
CN111010376B (en) Master-slave chain-based Internet of things authentication system and method
Kiayias et al. A composable security treatment of the lightning network
CN111598566A (en) Network payment system based on mixed cross-chain
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN112507393B (en) Method for guaranteeing consistency of block chain cross-chain transaction
CN107908979B (en) Method and electronic device for configuration and endorsement in blockchain
CN114499898B (en) Block chain cross-chain secure access method and device
CN112000976A (en) Authentication management method, device, medium and electronic equipment for block chain system
CN113328997B (en) Alliance chain crossing system and method
WO2021258549A1 (en) Assembly line friendly signing and signature verifying methods, device, and storage medium
CN110098938B (en) Trusted committee under-chain acceleration solution method and system
CN112396421A (en) Identity authentication system and method based on block chaining-through card
CN114503508A (en) Computer-implemented method and system for storing authenticated data on blockchains
CN112581128B (en) Heterogeneous license chain value exchange method with presence evidence
Mao et al. A survey on cross-chain technology: Challenges, development, and prospect
CN115174570A (en) Cross-chain consensus method and system based on dynamic committee
CN112615838B (en) Extensible block chain cross-chain communication method
Liu et al. Fail-safe watchtowers and short-lived assertions for payment channels
CN112118231B (en) Trusted identity management method based on block chain technology
Sui et al. Monet: A fast payment channel network for scriptless cryptocurrency monero

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant