loomchain icon indicating copy to clipboard operation
loomchain copied to clipboard

Refactor Receipts Code

Open pathornteng opened this issue 5 years ago • 0 comments

This PR has refactored the receipts code as follow

  1. Remove LevelDBReceipt, moving most of the logic to evmAuxStore
  2. Auto-rename receipts_db to evmaux.db when starting the node
  3. Use TM goleveldb instead of syndtr/goleveldb
  4. Since TM goleveldb does not have transaction feature, we have to Implement atomic KV store for evmauxstore for commiting receipts
  5. Deprecate EVMPersistentTxReceiptsMax and change it to EvmAuxStore.MaxReceipts
  6. if EvmAuxStore.MaxReceipts is set to 0, no receipts are persisted in evmaux.db

Ref: https://github.com/loomnetwork/loomchain/issues/1486

Note: we probably need to fix this before we merge this PR so that we don't have to save TxHashList to EvmAuxStore anymore.

  • [x] I added unit tests for any code that added
  • [ ] I updated the CHANGELOG.md
  • [x] All IP is original and not copied from another source
  • [x] I assign all copyright to Loom Network for the code in the pull request

pathornteng avatar Sep 18 '19 11:09 pathornteng