CN115293901A - Block chain capacity expansion method and device - Google Patents

Block chain capacity expansion method and device Download PDF

Info

Publication number
CN115293901A
CN115293901A CN202210972753.3A CN202210972753A CN115293901A CN 115293901 A CN115293901 A CN 115293901A CN 202210972753 A CN202210972753 A CN 202210972753A CN 115293901 A CN115293901 A CN 115293901A
Authority
CN
China
Prior art keywords
transaction
state
knowledge proof
block chain
state tree
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.)
Pending
Application number
CN202210972753.3A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210972753.3A priority Critical patent/CN115293901A/en
Publication of CN115293901A publication Critical patent/CN115293901A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a block chain capacity expansion method and a block chain capacity expansion device, which relate to the technical field of block chains, and the method comprises the following steps: creating a state tree root according to a transaction global state summarizing request of a user; calling a zero knowledge proof of the front and back change of the state tree root generated by the computing cluster; and packaging the batch transaction detail, the state tree root and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction world state by an intelligent contract on the block chain. The transaction that originally verifies on the block chain is placed outside the chain and verified, and performance capacity of calculation type transactions such as block chain processing transfer, settlement and reconciliation is improved to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the effectiveness of transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, and the function of safe and credible batch verification on a chain is realized.

Description

Block chain expansion method and device
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block chain capacity expansion method and apparatus.
Background
The transaction processing capabilities of the current block chain are limited primarily by block size and block time. The block size determines the number of transactions that can be accommodated in a single block of the current blockchain. In order to increase the capacity of the blockchain system to support wider application scenarios, a Layer2 protocol is adopted in the industry to transfer a large amount of computation requirements of a blockchain main network to Layer2, thereby reducing the burden of the main network. The transaction of this type of scheme is executed at Layer2, and the transaction state is synchronized to the main chain (Layer 1). Meanwhile, in order to ensure the security of the transaction, the transaction data of Layer2 is generally stored in Layer1. Different Layer2 schemes have different implementation schemes on how to prove the correctness of the synchronous state of Layer 2. In the existing side chain scheme, the system takes a snapshot of the blocks generated by the side chains and then submits them to the main chain. The side-chain snapshot is the hash value of the block, and the snapshot is stored on the main chain, and when miners in the side chain want to collude to branch, the snapshot can be used for dealing with the cheating behavior.
A potential problem with the side chain is security, the side chain snapshotting the block header of blocks in the chain to the main chain to prevent forking. If block a is archived as a snapshot into the main chain, then the chain in which a continues will be considered the only valid side chain. Although the side chain can take advantage of the backbone to prevent bifurcation, miners on the side chain still have the opportunity to launch an attack known as "invalid state transition". This attack takes advantage of the fact that the main chain cannot verify the shortage of all blocks on the sidechains, so if more than 50% or 66% (depending on the design mechanism of the sidechains) miners are involved in the collusion, they may create an invalid block, steal assets from other accounts, and upload this snapshot of the transaction to the main chain, completing the attack. In existing side-chain schemes, the project side assumes that at least 50% (or 66%, depending on the design mechanism) or more miners will not cheat.
And whether the main chain or the side chain is, the calculation in the block chain is completed in the intelligent contract, and the intelligent contract runs in the virtual machine, the calculation capacity of the intelligent contract is limited, and the calculation capacity of the block chain is limited. The true calculation cannot be done by relying on the blockchain alone.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for expanding a block chain to solve at least one of the above-mentioned problems.
In order to achieve the purpose, the invention adopts the following scheme:
according to a first aspect of the present invention, there is provided a method for expanding a block chain, the method including: creating state tree roots corresponding to the front and the back of a transaction according to a transaction global state summarizing request of a user; calling a computing cluster to generate the zero-knowledge proof for proving the effectiveness of the front and back changes of the state tree root; and packaging the batch transaction detail, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
According to a second aspect of the present invention, there is provided a block-chain expanding device, the device comprising: the state tree root creating unit is used for creating state tree roots corresponding to the front and the back of the transaction according to a transaction global state summarizing request of a user; the calling unit is used for calling the computing cluster to generate a zero-knowledge proof for proving the effectiveness of the front and back changes of the state tree root; and the encapsulation sending unit is used for encapsulating the transaction details of each batch, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
According to a fourth aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to a fifth aspect of the invention, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the above method.
According to the technical scheme, the transaction which is originally verified on the block chain is placed outside the chain for verification, and the performance capacity of calculation transactions such as transfer, settlement and reconciliation in block chain processing is improved to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the effectiveness of transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, and the function of safe and credible batch verification on a chain is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts. In the drawings:
fig. 1 is a schematic flowchart illustrating a block chain capacity expansion method according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a block chain capacity expansion method according to another embodiment of the present application;
FIG. 3 is a diagram illustrating the structure of information contained in each batch transaction provided by an embodiment of the present application;
FIG. 4 is a diagram of batch packaging middleware provided by an embodiment of the present application submitting verification data to a blockchain;
FIG. 5 is a schematic structural diagram of a block chain expanding device according to an embodiment of the present disclosure;
fig. 6 is a schematic block diagram of a system configuration of an electronic device according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic flow chart of a block chain capacity expansion method provided in an embodiment of the present application, where the present embodiment describes the present application from a batch packaging middleware side, and the method includes the following steps:
step S101: and creating state tree roots corresponding to the front and the back of the transaction according to the transaction global state summarizing request of the user. In this embodiment, the transaction global status summary request is sent by the user side, and the transaction type may be a transfer transaction, a credit settlement, or a Non-homogeneous Token (NFT) circulation, etc.
Preferably, the user may initiate a transaction request of the transaction type through the mobile terminal or the WEB terminal, and then the service application background of the user side executes and verifies the transaction according to the transaction request, and constructs a transaction message, where the transaction message may include: transaction initiator address, transaction receiver address, transaction amount, transaction serial number, transaction signature and the like.
Preferably, if the user performs multiple transactions for another specific user within a certain period of time, the multiple transaction messages may be combined into a batch transaction message, and then the transaction global status summary request is sent to the batch packaging middleware based on the batch transaction message. In this embodiment, a timer may be set, and then a plurality of transaction requests within a preset time may be collected to form the batch transaction message.
Preferably, after receiving the transaction global state summarizing request, the batch packaging middleware of this embodiment first executes balance check and signature check of batch transactions according to the transaction global state summarizing request of the user, and when the balance check and the signature check pass, creates a state tree root before transaction, and converts the state tree root before transaction according to transaction information to obtain a state tree root after transaction, where the balance check may include checking whether the balance of a transaction sender is sufficient, and whether the balance of a transaction double-issue account is correct after transaction is completed, and the conversion of the state tree root is to convert the initial state tree root of the first transaction in the batch by using a conversion function to obtain a state tree root after the first transaction is completed, and then to convert the state tree root after the second transaction is completed by using the state tree root after the first transaction is used as the initial state tree root before the second transaction is started, and to sequentially convert the state tree root after the second transaction until the state tree root after the last transaction is completed.
Step S102: and calling the computing cluster to generate a zero-knowledge proof for proving the effectiveness of the front and back changes of the state tree root.
In this embodiment, an initial state tree root is corresponding to the batch transaction, a transaction completion state tree root is corresponding to the batch transaction, and zero knowledge proof can be used to prove the effectiveness of the change from the initial state tree root to the transaction completion state tree root.
In this embodiment, the batch packaging middleware may send a zero knowledge proof request for proving validity of changes before and after the state tree root to the computing cluster after receiving the transaction global state summary request sent by the service application background, and the computing cluster performs computation according to a zero knowledge proof algorithm and returns a zero knowledge proof.
Step S103: and packaging the batch transaction details, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, wherein the verification of the zero knowledge proof and the change of the transaction global state are carried out by an intelligent contract on the block chain.
According to the technical scheme, the transaction which is originally verified on the block chain is placed outside the chain for verification, and the performance capacity of calculation transactions such as transfer, settlement and reconciliation in block chain processing is improved to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the validity of the transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, the function of safe and credible batch verification on the chain is realized, and finally, a part of transactions are merged and packaged, the state execution result and the proof and part of transaction data are submitted to the chain for verification, the calculation pressure on the chain is relieved, and the block chain processing performance is further improved.
Fig. 2 is a schematic flow chart of a block chain capacity expansion method according to another embodiment of the present application, where the method includes the following steps:
step S201: the user initiates a transaction request through the terminal.
Step S202: and the business application background executes and verifies the transaction, and then constructs a transaction message which comprises a transaction initiator address, a transaction receiver address, a transaction amount, a transaction serial number and a transaction signature.
Step S203: and the service application background sends a transaction global state summary request to the batch packaging middleware.
Step S204: and the batch packaging middleware creates state tree roots corresponding to the front and the back of the transaction according to the transaction global state summarizing request.
Step S205: the batch packaging middleware sends a zero knowledge proof request of the change of the computation state tree root to the computation cluster.
Step S206: the computing cluster performs computation according to the zero knowledge proof request and creates a corresponding zero knowledge proof.
Step S207: the compute cluster returns the created zero knowledge proof to the batch packaging middleware.
Step S208: and the batch packaging middleware packages the batch transaction details, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message and sends the transaction message to the blockchain node.
Step S209: and calling a zero knowledge proof verification interface by the intelligent contract on the block chain node to verify the zero knowledge proof of the batch transaction, and changing the world state of the transaction after the verification is passed.
According to the technical scheme, the transaction which is originally verified on the block chain is placed outside the chain for verification, and the performance capacity of calculation transactions such as transfer, settlement and reconciliation in block chain processing is improved to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the validity of the transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, the function of safe and credible batch verification on the chain is realized, and finally, a part of transactions are merged and packaged, the state execution result and the proof and part of transaction data are submitted to the chain for verification, the calculation pressure on the chain is relieved, and the block chain processing performance is further improved.
As described further below with reference to a specific embodiment, the user a sends n signature transactions to the user B in sequence within a period of time, account structures for the user a and the user B are shown in table 1, and a data structure of the n signature transactions is shown in table 2.
TABLE 1
Content item Description of the preferred embodiment Whether it is necessary to select
address Block chain address public key hash value Is that
balance Existing balance of linked accounts Is that
seq Serial number of next transaction Is that
TABLE 2
Content item Description of the preferred embodiment Whether it is necessary to select
tx_i Transaction serial number
from Account sender address public key hash value Is that
to Transaction recipient address Is that
value Amount of transaction Is that
sign Signature
The initial status of the user A account is shown in Table 3, and the initial status of the user B account is shown in Table 4:
TABLE 3
address balance seq
pk_a a 0
TABLE 4
tx_i from to value sign
i pk_a pk_b value_a sign_a
The initial state of the accounts of both sides of the transaction is represented by S [0 ]:
S[0]=[pk_a,a,seq_a_i,pk_b,b,seq_b_i]。
denote the ith transaction by T [ i ]:
T[i]=[i,pk_a,value_a,pk_b,sign_a]。
after receiving the transaction global status summary request of the n transactions, the batch packaging middleware executes each transaction under the chain, including balance check, signature check and state root conversion. The state transition function is denoted by STF, wherein S [ i ] represents the current state tree root of the transaction, T [ i ] represents the ith transaction, and the process of the transaction state after n transactions from S [0] to S [ n ] is as follows:
s [0] = [ pka, a,0, pkb, b,0] (initial state);
S[1]=[pka,a-1,1,pkb,b+1,0];
S[2]=[pka,a-2,2,pkb,b+2,0];
...
s [ n ] = [ pka, a-n,1000, pkb, b + n,0] (final state).
Simply, n transaction state transitions can be identified by the following formula:
S[n]=STF(S[0],T[1],T[2],...,T[n])。
if the value of the current transaction state S [0], i.e. the state tree root is Pre-state root, and the operations for executing n transactions are { T [1], T [ 2., T [ n }, respectively, the state tree root Post-state root of the latest state can be expressed as follows:
Post-state root=STF(Pre-state root,T[1],T[2],...,T[n])。
after the status tree root is created, the information included in each batch transaction is as shown in fig. 3, which includes the transaction details of each transaction, the status tree root Pre-state root in the initial status, and the status tree root Post-state root in the latest status.
To confirm that the transaction package is submitted to the chain of lots (Batch) correctly, the submitter is required to provide a zero-knowledge proof of the change of the state tree root before and after generated by the zero-knowledge proof algorithm in addition to the transaction data and the state tree root before and after the transaction when submitting Batch. The batch packaging middleware will submit the Pre _ state root, post _ state root, as well as the compressed transaction data and zero knowledge proof of progress to the on-chain contract. The validation data submitted is shown in figure 4.
This zero knowledge proof of knowledge is submitted to the intelligent contract on the chain, which can be used by anyone to verify transactions for a particular batch down the chain. After the chain intelligent contract is verified, the account state maintained on the chain is changed from Pre _ state root to Post _ state root, so that the balance updating of the chain account book is completed.
Fig. 5 is a schematic structural diagram of a block chain extension apparatus provided in an embodiment of the present application, where the apparatus includes: a state tree root creating unit 510, a calling unit 520 and an encapsulation sending unit 530, wherein the calling unit 520 is connected with the state tree root creating unit 510 and the encapsulation sending unit 530 respectively.
The status tree root creating unit 510 is configured to create status tree roots corresponding to the front and the back of the transaction according to the transaction global status aggregation request of the user.
The invoking unit 520 is configured to invoke the compute cluster to generate a zero-knowledge proof for proving validity of the change before and after the root of the state tree.
The encapsulation sending unit 530 is configured to encapsulate the transaction details of each batch, the state tree roots before and after the transaction, and the zero knowledge proof in the transaction global state summary request into a transaction message, and send the transaction message to a block chain, where an intelligent contract on the block chain verifies the zero knowledge proof and changes the transaction world state.
Preferably, the transaction global status summary request includes a batch transaction message, and the batch transaction message is constructed by executing and verifying a transaction request of a user by a service application background.
Preferably, the batch transaction message includes at least one transaction message within a preset time period.
Preferably, the batch transaction message includes: a transaction initiator address, a transaction recipient address, a transaction amount, a transaction serial number, and a transaction signature.
Preferably, the state tree root creation unit 510 is further configured to: balance verification and signature verification of batch transaction are executed according to the transaction global state summary request of the user; after the balance check and the signature check are passed, establishing a state tree root before transaction; and converting the state tree root before the transaction according to the transaction information to obtain the state tree root after the transaction.
Preferably, the invoking unit 520 is further configured to: sending a zero-knowledge proof request for proving the effectiveness of the front and back change of the state tree root to the computing cluster; receiving a zero knowledge proof created by the compute cluster from the zero knowledge proof request.
According to the technical scheme, the block chain capacity expanding device provided by the application places the transaction which is originally verified on the block chain outside the chain for verification, and improves the performance capacity of calculation transactions such as block chain processing transfer, settlement and reconciliation to a certain extent. In addition, safety is improved by introducing zero knowledge proof, effectiveness of transaction state conversion is proved by verifying zero knowledge proof of all transactions contained in a block, a function of safe and credible batch verification on a chain is realized, and finally, a part of transactions are merged and packaged, a state execution result, proof and part of transaction data are submitted to the chain for verification, calculation pressure on the chain is relieved, and block chain processing performance is further improved.
Fig. 6 is a schematic block diagram of a system configuration of an electronic device 1100 according to another embodiment of the present invention. As shown in fig. 6, the electronic device 1100 may include a central processor 1110 and a memory 1120; the memory 1120 is coupled to the central processor 1110. Notably, this FIG. 6 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications or other functions.
In one embodiment, the blockchain expansion method function may be integrated into the cpu 1110. The central processor 1110 may be configured to control as follows:
step S101: and creating state tree roots corresponding to the transaction before and after according to the transaction global state summarizing request of the user.
Step S102: and calling a computing cluster to generate a zero-knowledge proof of the front and back changes of the state tree root.
Step S103: and packaging the batch transaction detail, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
In another embodiment, the blockchain capacity expansion device may be configured separately from the central processing unit 1110, for example, the blockchain capacity expansion device may be configured as a chip connected to the central processing unit 1110, and the function of the blockchain capacity expansion method described above is implemented by the control of the central processing unit.
As shown in fig. 6, the electronic device 1100 may further include: a communication module 1130, an input unit 1140, an audio processor 1150, a display 1160, and a power supply 1170. It is worthy to note that electronic device 1100 also does not necessarily include all of the components shown in FIG. 6; furthermore, the electronic device 1100 may also comprise components not shown in fig. 6, as reference may be made to the prior art.
As shown in fig. 6, the central processor 1110, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 1110 receiving input and controlling operation of the various components of the electronic device 1100.
The memory 1120 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The above mentioned method for expanding the block chain can be stored, and the program for executing the information can be stored. And the central processor 1110 may execute the program stored in the memory 1120 to realize information storage or processing, etc.
The input unit 1140 provides input to the central processor 1110. The input unit 1140 is, for example, a key or a touch input device. The power supply 1170 is used to provide power to the electronic device 1100. The display 1160 is used for displaying display objects such as images and characters. The display may be, for example, but is not limited to, an LCD display.
The memory 1120 may be a solid-state memory such as Read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes referred to as an EPROM or the like. The memory 1120 may also be some other type of device. The memory 1120 includes a buffer memory 1121 (sometimes referred to as a buffer). The memory 1120 may include an application/function storage 1122 for storing application programs and function programs or a flow for executing operations of the electronic device 1100 by the central processor 1110.
The memory 1120 may also include a data store 1123, the data store 1123 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage 1124 of the memory 1120 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, directory application, etc.).
The communication module 1130 is a transmitter/receiver 1130 that transmits and receives signals via an antenna 1131. The communication module (transmitter/receiver) 1130 is coupled to the central processor 1110 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 1130, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 1130 is also coupled to a speaker 1151 and a microphone 1152 via an audio processor 1150 to provide audio output via the speaker 1151 and receive audio input from the microphone 1152 to perform general telecommunication functions. Audio processor 1150 may include any suitable buffers, decoders, amplifiers and so forth. Additionally, an audio processor 1150 is also coupled to the central processor 1110, enabling recording of sounds locally through a microphone 1152, and enabling playing of locally stored sounds through a speaker 1151.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the block chain expansion method in which the execution subject is the server or the client in the foregoing embodiments, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the block chain expansion method in which the execution subject is the server or the client, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: and creating state tree roots corresponding to the transaction before and after according to the transaction global state summarizing request of the user.
Step S102: and calling a computing cluster to generate a zero-knowledge proof of the front and back changes of the state tree root.
Step S103: and packaging the batch transaction detail, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application places the transaction that is originally verified on the blockchain outside the chain for verification, thereby improving performance capacity of computing transactions such as transfer, settlement, reconciliation, and the like in blockchain processing to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the validity of the transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, the function of safe and credible batch verification on the chain is realized, and finally, a part of transactions are merged and packaged, the state execution result and the proof and part of transaction data are submitted to the chain for verification, the calculation pressure on the chain is relieved, and the block chain processing performance is further improved.
Embodiments of the present application further provide a computer program product capable of implementing all steps in the blockchain capacity expansion method in which an execution subject in the foregoing embodiments is a server or a client, where the computer program/instruction when executed by a processor implements the steps of the blockchain capacity expansion method, for example, the computer program/instruction implements the following steps:
step S101: and creating state tree roots corresponding to the transaction before and after according to the transaction global state summarizing request of the user.
Step S102: and calling a computing cluster to generate a zero-knowledge proof of the front and back changes of the state tree root.
Step S103: and packaging the batch transaction detail, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
As can be seen from the above description, the computer program product provided in the embodiment of the present application places the transaction that is originally verified on the blockchain outside the chain for verification, thereby improving the performance capacity of computing transactions such as transfer, settlement, reconciliation, and the like, which are processed by the blockchain to a certain extent. In addition, the safety is improved by introducing the zero knowledge proof, the validity of the transaction state conversion is proved by verifying the zero knowledge proof of all transactions contained in the block, the function of safe and credible batch verification on the chain is realized, and finally, a part of transactions are merged and packaged, the state execution result and the proof and part of transaction data are submitted to the chain for verification, the calculation pressure on the chain is relieved, and the block chain processing performance is further improved.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the various embodiments is provided to illustrate the practice of the invention, and the sequence of steps is not limited thereto and can be adjusted as desired.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and should not be used to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for expanding a block chain, the method comprising:
creating state tree roots corresponding to the front and the back of a transaction according to a transaction global state summarizing request of a user;
calling a computing cluster to generate a zero-knowledge proof for proving the effectiveness of the front and back changes of the state tree root;
and packaging the batch transaction detail, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message, and sending the transaction message to a block chain, and verifying the zero knowledge proof and changing the transaction global state by an intelligent contract on the block chain.
2. The blockchain capacity expansion method of claim 1, wherein the transaction global status summary request includes batch transaction messages, and the batch transaction messages are constructed by a service application background after executing and verifying a transaction request of a user.
3. The method of claim 2, wherein the batch transaction message comprises at least one transaction message within a predetermined time period.
4. The method of claim 3, wherein the batch transaction message comprises: a transaction initiator address, a transaction recipient address, a transaction amount, a transaction serial number, and a transaction signature.
5. The blockchain capacity expansion method of claim 4, wherein the creating of the state tree roots corresponding to the before and after of the transaction according to the transaction global state summary request of the user includes:
balance verification and signature verification of batch transaction are executed according to the transaction global state summary request of the user;
after the balance check and the signature check are passed, establishing a state tree root before transaction;
and converting the state tree root before the transaction according to the transaction information to obtain the state tree root after the transaction.
6. The blockchain expansion method of claim 1, wherein invoking the compute cluster to generate a zero knowledge proof for proving the validity of the change back and forth to the state tree root comprises:
sending a zero-knowledge proof request for proving the effectiveness of the front and back changes of the state tree root to the computing cluster;
receiving a zero knowledge proof created by the computing cluster according to the zero knowledge proof request.
7. A block chain capacity device, comprising:
the state tree root creating unit is used for creating state tree roots corresponding to the front and the back of the transaction according to a transaction global state summarizing request of a user;
the calling unit is used for calling the computing cluster to generate a zero-knowledge proof for proving the effectiveness of the front and back changes of the state tree root;
and the encapsulation sending unit is used for encapsulating the transaction details of each batch, the state tree roots before and after the transaction and the zero knowledge proof in the transaction global state summarizing request into a transaction message and sending the transaction message to a block chain, and the verification of the zero knowledge proof and the change of the transaction world state are carried out by an intelligent contract on the block chain.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the computer program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method of any of claims 1 to 6.
CN202210972753.3A 2022-08-15 2022-08-15 Block chain capacity expansion method and device Pending CN115293901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210972753.3A CN115293901A (en) 2022-08-15 2022-08-15 Block chain capacity expansion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210972753.3A CN115293901A (en) 2022-08-15 2022-08-15 Block chain capacity expansion method and device

Publications (1)

Publication Number Publication Date
CN115293901A true CN115293901A (en) 2022-11-04

Family

ID=83829146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210972753.3A Pending CN115293901A (en) 2022-08-15 2022-08-15 Block chain capacity expansion method and device

Country Status (1)

Country Link
CN (1) CN115293901A (en)

Similar Documents

Publication Publication Date Title
CN110351096B (en) Multiple signature method, signature center, program medium, and electronic device
US20160358135A1 (en) Digital currency management method and digital currency node apparatus
US10387856B2 (en) Online payment method, system, and apparatus
CN110458557B (en) Payment method, payment equipment and storage medium
CN111861456A (en) 5G message transfer transaction verification method, system and device based on block chain
CN109272316B (en) Block implementing method and system based on block chain network
JP2022554202A (en) INTERACTIVE AGGREGATE SIGNATURE METHOD, EQUIPMENT AND STORAGE MEDIUM
CN111931209B (en) Contract information verification method and device based on zero knowledge proof
CN113850600B (en) Transaction consensus method, device, equipment and storage medium based on block chain
CN111275555A (en) Block chain transaction processing method, transaction node and block chain system
CN111064583A (en) Threshold SM2 digital signature method and device, electronic equipment and storage medium
CN111161078A (en) One-to-many block chain transfer realization method
CN111404695A (en) Token request verification method and device
CN111311415B (en) Loosely coupled blockchain transaction method and transaction node
CN113935010A (en) Mobile banking login method and device based on block chain and 5G message
CN115293901A (en) Block chain capacity expansion method and device
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN112988898A (en) Block chain-based merchant fund clearing method and device
CN113132459A (en) Distributed storage method, system, storage medium, information data processing terminal
CN111309809A (en) Block header storage method and equipment thereof
CN113362064B (en) Multiple signature method, computer device, and storage medium
CN113806441B (en) Signature processing method and device based on blockchain, electronic equipment and storage medium
CN110443684B (en) Combined product snapshot type price information processing method and device
CN113938413A (en) Bank card sharing method and device based on block chain
CN112910643A (en) Method and device for generating random number in block chain

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