Transaction group, transaction group constructing method, storage medium, device and system

A construction method and transaction group technology, applied in the blockchain field, can solve problems such as unfairness, inability to achieve atomicity, and inability to send at the same time, so as to achieve the effect of ensuring atomicity

Active Publication Date: 2018-12-07
HANGZHOU FUZAMEI TECH CO LTD
View PDF6 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, atomicity cannot be achieved between several independent transactions in the blockchain
[0004] In the existing scheme, multiple transactions cannot guarantee the atomicity and order of transactions
For example, A0 sends ten token1 to A1, and A1 goes to A2 to buy one token2 with these ten token1. This is actually two transactions; when executing these two transactions, it must first ensure that the transaction A0->A1 is in the zone first. Confirmation in the block chain, and then the transaction of A1->A2 can be sent. Now there is a plan that cannot send these two transactions at the same time
Also, for example, A1 and A2 need to exchange token1 and token2 with each other, A1->A2 ten token1, A2->A1 one token2, these two transactions must ensure atomicity, otherwise it will lead to unfair transactions
That is to say, for a group of transactions sent to the blockchain, either the transfer is successful or the transfer fails; and in the existing scheme, the atomicity of the exchange cannot be achieved

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Transaction group, transaction group constructing method, storage medium, device and system
  • Transaction group, transaction group constructing method, storage medium, device and system
  • Transaction group, transaction group constructing method, storage medium, device and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] A transaction group, the transaction group includes multiple transactions, the transaction includes transaction content, Hash value and signature, and the transactions are connected to each other through a Hash linked list, and the head of the transaction group is saved in each transaction Hash value of the transaction.

[0038] Through such a structure, any transaction is deleted or modified from the transaction group, and it is easy to judge that the transaction group is wrong. This guarantee is very important. Users can safely sign their own transactions without fear of other parties modifying any transaction.

Embodiment 2

[0040] Such as figure 2 As shown, a transaction group in this embodiment is further improved on the basis of Embodiment 1, and the Hash linked list is the Hash value of one of the adjacent transactions. Each transaction in the transaction group is constructed in the order from the tail transaction to the head transaction. By adding the Hash value of the previous transaction to the content of the current transaction, the two adjacent transactions are associated through the Hash value. Finally, the head transaction is constructed, and the Hash value of the head transaction is placed in the content of each transaction. When any transaction in the transaction group is changed, an error will occur in the transaction group. Any transaction in the transaction group Neither can succeed.

Embodiment 3

[0042] A transaction group in this embodiment is further improved on the basis of Embodiment 1 or 2, the Hash value of the transaction includes the transaction content, the Hash value of the next transaction and the total number of transactions. When constructing this transaction, add the Hash value of the next transaction. When the content of the previous transaction changes, this transaction cannot be established, and a transaction error occurs. It is guaranteed that each transaction within the transaction group cannot be changed. Each transaction succeeds or fails at the same time, ensuring the atomicity of the transaction group. The content of the transaction can include smart contracts or smart assets. When multiple parties involve multiple smart contracts or smart assets, for interdependent transactions, it can ensure the atomicity of all transactions during execution, reduce execution risks, and avoid unfair transactions. .

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a transaction group, a transaction group constructing method, a storage medium, a device and a system, which belong to the technical field of block chain. The transaction groupconstructing method includes the following steps: calculating the Hash values of transactions from the tail transaction to the head transaction of a transaction group, and calculating the Hash valueof the tail transaction first; calculating the Hash value of the transaction adjacent to the tail transaction, and calculating the Hash values of the transactions in turn according to the order untilthe Hash value of the head transaction is calculated; putting the Hash value of the head transaction in each transaction in the transaction group; and calculating the SIGHASH of each transaction, andcalculating the signature. A device and a system are further disclosed. In view of the problem that the atomicity of transactions cannot be achieved for a group of transactions sent to a block chain in the prior art, it can be ensured that the transactions in a group of transactions sent to a block chain all succeed in transfer or all fail in transfer.

Description

technical field [0001] The present invention relates to the technical field of block chains, in particular to a transaction group, a method for constructing a transaction group, a storage medium, a device and a system. Background technique [0002] The transaction information on the block chain in the prior art includes three parts, such as figure 1 As shown, TxHash is the Hash value of the transaction content; Tx content refers to the transaction content; Tx signature refers to the signature of the transaction. The atomicity of a single transaction can be guaranteed. When two or more transactions are involved, if you want to send multiple transactions at the same time without disrupting the order of transactions, or if multiple transactions succeed or fail at the same time, it cannot be achieved. , the exchange atomicity of the transaction group cannot be achieved, resulting in unfair transactions; in order to achieve the orderliness of transactions, it is generally necess...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06Q20/38
CPCG06Q20/3829
Inventor 王志文吴思进
Owner HANGZHOU FUZAMEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products