torba icon indicating copy to clipboard operation
torba copied to clipboard

Support Blockchain Reorganization

Open eukreign opened this issue 6 years ago • 3 comments

  • [ ] implement support for detecing reorganizations and recovering
    • [x] rewind the headers
    • [ ] undo any transactions
  • [x] unit tests for rewinding headers
  • [ ] unit tests for dropping transactions that happened on removed blocks
  • [x] integration tests using generate and invalidateblock commands

how do reorgs affect files you have on disk and claims you paid for?

eukreign avatar Aug 05 '18 20:08 eukreign

@hackrush01 implement this method: https://github.com/lbryio/torba/blob/7a8c2fc98ba31751ec9262ab4adcefe4f6335a9e/torba/client/basedatabase.py#L334

eukreign avatar Jan 15 '19 15:01 eukreign

this is the tests for the header rewinding, transaction rewinding would be similar / build on this test: https://github.com/lbryio/torba/blob/master/tests/client_tests/integration/test_blockchain_reorganization.py

eukreign avatar Jan 15 '19 15:01 eukreign

This comment will be updated with progress

  • [ ] Write test to reproduce the issue (2 points, by conservative estimate)

hackrush01 avatar Jan 18 '19 15:01 hackrush01