hypercube-lab / hypercube

HyperCube is a revolutionary, high-performance decentralized computing platform. HyperCube has powerful computing capabilities to provide high-performance computing power and large-scale data storage support for VR, AR, Metaverse, Artificial Intelligence, Big Data, and Financial Applications.🛰
GNU General Public License v3.0
974 stars 222 forks source link

Parallel transaction processing design #5

Open hypercube-lab opened 2 years ago

hypercube-lab commented 2 years ago
agnitazudkll commented 2 years ago

What I ended up implementing is to put separate read/write locks on each of the following:

I also changed transaction processing to apply all debits first, and once complete, start applying all credits. This ensures that the same set can be validated in any order and that no debit will pull the account below zero. The strategy therefore rejects transactions that would otherwise be valid if a credit was applied first.

agnitazudkll commented 2 years ago

Some take away followups