rooch-network / rooch

Fully on-chain Application Container with Move Language
https://rooch.network
Apache License 2.0
126 stars 53 forks source link

[Store]proposal: share the same rocksdb instance between rooch and moveos #1596

Open popcnt1 opened 1 week ago

popcnt1 commented 1 week ago

In present, we have two rocksdb instance for rooch and moveos. What we really want is that moveos could have its own rocksdb instance when embed into other application.

pros.

  1. share buffer/cache, helping to improving performance and reducing hardware overhead
  2. helping to add more batch operation
  3. more atomic tx may improve consistence and integrity

TODO

  1. share storage struct and method
  2. simplify abstraction of storage (kvstore, codecstore, rawstore, rocksdbstore and _store are everywhere and mixed)
  3. different options for column familys
  4. hide rocksdb details (in present, StoreInstance is a pointer of rocksdb which makes hard to implement mock store)

related issues:

1593 #1588