Storage method and device for decentralized exchange and storage medium
A decentralization and exchange technology, applied in the computer field, can solve problems such as increasing the complexity of the system and not being directly applicable.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] A storage method for decentralized exchanges, which is suitable for AMM decentralized exchanges in the blockchain, stores transaction data through a tree structure, and the tree structure includes a state tree, such as figure 1 As shown, the state tree is used to store account state information and transaction pair information. The state tree includes an account branch tree and a transaction pair branch tree. The leaf nodes of the account branch tree correspond to user accounts one by one. The transaction The leaf nodes of the pair branch tree correspond to the transaction pair accounts one by one; the method includes:
[0035] Blockchain nodes obtain related transactions;
[0036] After the transaction is executed, the accounts and transaction pairs involved in the transaction are obtained, and the account status and transaction pair status are updated according to the transaction content.
[0037] Specifically, the state tree is a multi-fork tree.
[0038] Specifica...
Embodiment 2
[0044] A computer device comprising: one or more processors; memory for storing one or more programs which, when executed by the one or more processors, cause the The one or more processors execute the method as described in Embodiment 1.
[0045] A storage medium storing a computer program, when the program is executed by a processor, implements the method described in Embodiment 1 above.
[0046] Figure 4 It is a schematic structural diagram of a computer device provided in this embodiment.
[0047] Such as Figure 4 As shown, as another aspect, the present application also provides a computer device 500, including one or more central processing units (CPU) 501, which can be The program loaded into the random access memory (RAM) 503 by the part 508 executes various appropriate actions and processes. In the RAM 503, various programs and data necessary for the operation of the device 500 are also stored. The CPU 501 , ROM 502 , and RAM 503 are connected to each other via...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


