loomchain
loomchain copied to clipboard
Refactor Receipts Code
This PR has refactored the receipts code as follow
- Remove
LevelDBReceipt
, moving most of the logic toevmAuxStore
- Auto-rename
receipts_db
toevmaux.db
when starting the node - Use TM
goleveldb
instead ofsyndtr/goleveldb
- Since TM
goleveldb
does not have transaction feature, we have to Implement atomic KV store for evmauxstore for commiting receipts - Deprecate
EVMPersistentTxReceiptsMax
and change it toEvmAuxStore.MaxReceipts
- if
EvmAuxStore.MaxReceipts
is set to 0, no receipts are persisted inevmaux.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