CREDITSCOM / node

Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
https://developers.credits.com/
GNU Affero General Public License v3.0
151 stars 16 forks source link

Optimize smart contracts storage in chain #16

Closed 0xAAE closed 5 years ago

0xAAE commented 5 years ago

The purpose is to keep nearly constant size of every contract in chain The contract size in storage may increase due to data expand in its state and may become too large. Currently contract state is duplicated in chain every time when contract is executed. This leads to significant costs in disk space and seems to be inefficient.

The possible solution is to separate contract state storage from transactions The idea is to store last state of every contract outside the chain and put in every execute transaction contract's state hash value

Instand commented 5 years ago

Done