Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Epic] Split Omni specific implementation from Bitcoin core #1305

Merged
merged 18 commits into from
Nov 10, 2023

Conversation

bvbfan
Copy link

@bvbfan bvbfan commented Aug 18, 2023

  • Switch Omni protocol validation to event driven using validation interface
  • Switch Omni specific data storage out of bitcoin core databases
  • Move global coins cache to local one
  • Simple and efficient mempool and transaction storage
  • Remove txindex hard requirements
  • Rework all database records to use binary prefix instead of string data
  • Remove usage of core mutexes to allow validation to work in its own thread
  • Omnicore could be started as prune node, a lightweight client

Todo's:

  • Remove Omni specific coin selection from Bitcoin core
  • Remove Omni specific functions from Bitcoin wallet interface

Pending:

  • Full resync to measure time and storage

Fixes: #1293 #1294

@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch from f4e7db6 to 3869278 Compare August 21, 2023 06:58
bvbfan added 10 commits August 21, 2023 16:20
* Move experimental btc balance records to its own database
* Split mempool functionality
* Switch to transaction and mempool events
* Switch coins cache to local storage

Signed-off-by: Anthony Fieroni <[email protected]>
* Remove depends to block index
* DB / persistent storage simplifications

Signed-off-by: Anthony Fieroni <[email protected]>
* Migrate db records to prefix binary format
* Remove depends to internal core mutexes
* TxIndex isn't mandatory

Signed-off-by: Anthony Fieroni <[email protected]>
* Full txindex removal
* Code refinition, simplification
* All tests pass

Signed-off-by: Anthony Fieroni <[email protected]>
Signed-off-by: Anthony Fieroni <[email protected]>
* Optimize protocol layer transaction storage
* Simplify leveldb batch
* Allow transaction existance check

Signed-off-by: Anthony Fieroni <[email protected]>
Signed-off-by: Anthony Fieroni <[email protected]>
* Fix omni mempool transaction tracking
* Keep spent transaction inputs 100 blocks in case of reorg

Signed-off-by: Anthony Fieroni <[email protected]>
@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch from 3869278 to 9ef64ae Compare August 21, 2023 13:57
Signed-off-by: Anthony Fieroni <[email protected]>
@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch from 9ef64ae to 6b12e8c Compare August 21, 2023 16:25
Signed-off-by: Anthony Fieroni <[email protected]>
@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch from 6b12e8c to ccfd268 Compare August 22, 2023 04:51
bvbfan added 3 commits August 29, 2023 08:17
Signed-off-by: Anthony Fieroni <[email protected]>
Signed-off-by: Anthony Fieroni <[email protected]>
@dexX7
Copy link
Member

dexX7 commented Sep 13, 2023

Very nice! Any chance we get testing green? What's currently blocking it?

@bvbfan
Copy link
Author

bvbfan commented Sep 13, 2023

Tests are generally green but sometimes CI environment is slow
AssertionError: Mempool sync timed out after 2400s:
omnij tests could be rerun.
It should be workable, no blockers.
./omnicored -reindex -prune=2048
To run full reindex, prune node with 2GiB block data

  • Todo: Reuse bitcoin core coin db to safe more space and increase performance.

Signed-off-by: Anthony Fieroni <[email protected]>
@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch 4 times, most recently from 5906912 to a86091d Compare October 4, 2023 05:45
@bvbfan bvbfan force-pushed the split_omni_from_bitcoin branch from a86091d to c8fcc2f Compare October 9, 2023 05:50
Signed-off-by: Anthony Fieroni <[email protected]>
@dexX7 dexX7 merged commit a2c114c into OmniLayer:develop Nov 10, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants