Backport chainstate obfuscation to 0.11 #6919

pull laanwj wants to merge 6 commits into bitcoin:0.11 from laanwj:2015_10_backport_chainstate_obfuscation changing 9 files +565 −65
  1. laanwj commented at 8:07 AM on October 31, 2015: member

    This is a direct backport of #6650 and its follow-up, #6777 and #6865

  2. Add chainstate obfuscation to avoid spurious antivirus detection
    Adds an `obfuscate` parameter to `CLevelDBWrapper` and makes use of it
    for all new chainstate stores built via `CCoinsViewDB`. Also adds an
    `Xor` method to `CDataStream`.
    
    Thanks to @sipa @laanwj @pstratem @dexX7 @KyrosKrane @gmaxwell.
    
    Conflicts:
    	src/Makefile.test.include
    
    Github-Pull: #6650
    Rebased-From: 42cb388167ef78f47a3a440eb651b6938c10f508
    11d88c2ca2
  3. Encapsulate CLevelDB iterators cleanly
    Conflicts:
    	src/leveldb.cpp
    	src/leveldb.h
    	src/txdb.cpp
    
    Github-Pull: #6777
    Rebased-From: 3499ce1e1ad87a86598d00b7124072c91ddad833
    a8d781f863
  4. Handle obfuscation in CLevelDBIterator
    Github-Pull: #6777
    Rebased-From: 0fdf8c80ee322ab747321d61faf9c72af4a51445
    ba03d14234
  5. laanwj force-pushed on Oct 31, 2015
  6. laanwj commented at 9:42 AM on October 31, 2015: member

    I like this backported becase:

    • It it pretty well self-contained
    • Will make it possible to downgrade from databases started with 0.12/master to 0.11.x
    • Can be combined with #6917 to mitigate all known windows corruption issues
  7. MarcoFalke commented at 9:48 AM on October 31, 2015: member

    Concept ACK

  8. dexX7 commented at 12:53 PM on October 31, 2015: contributor

    Please note that #6865 should be included, too.

  9. laanwj commented at 4:20 PM on October 31, 2015: member

    Please note that #6865 should be included, too.

    Good catch! included.

  10. Add tests for gettxoutsetinfo, CLevelDBBatch, CLevelDBIterator
    Thanks @dexX7.
    
    Conflicts:
    	qa/pull-tester/rpc-tests.py
    
    Github-Pull: #6777
    Rebased-From: 14885068726a8e0dc73ffa127225ab80be3e3612
    775d01d4e1
  11. Refer to obfuscate_key via pointer in peripheral CLevelDB classes
    cc @sipa
    
    Github-Pull: #6777
    Rebased-From: dcd8e27c65de0d2cb972588a6e811ca7ccd1b3bd
    8b7354bf2c
  12. Fix chainstate serialized_size computation
    Github-Pull: #6865
    Rebased-From: 298e040bca0aad62b616a1d3e66e1e44d2b9bd3a
    8d043126ca
  13. laanwj force-pushed on Oct 31, 2015
  14. luke-jr commented at 6:06 PM on October 31, 2015: member

    Suggest disabling (using null) obfuscation by default in 0.11 so it remains compatible to 0.10.

  15. gmaxwell commented at 7:02 PM on October 31, 2015: contributor

    @luke-jr ugh, that would defeat much of the purpose because the people who need this won't know to turn it on. If you already have data and don't reindex, it stays null however.

  16. luke-jr commented at 7:35 PM on October 31, 2015: member

    As I see it, the primary purpose is of the backport is to be compatible with 0.12. If we don't want to wait on new features like this, we should just go ahead and release 0.12 early.

  17. gmaxwell commented at 7:42 PM on October 31, 2015: contributor

    @luke-jr I don't think that is an interesting reason to backport. Combined with the levedb fix this will end the constant corruption issues that are making the software unusable to many windows users.

  18. laanwj commented at 9:00 AM on November 1, 2015: member

    Suggest disabling (using null) obfuscation by default in 0.11 so it remains compatible to 0.10.

    IMO due to the way obfuscation is used, only for new databases, that's not an issue. The people that want to go back to 0.10 will (usually) have started syncing on 0.10. And in the rare case it's not, they can just reindex.

  19. laanwj commented at 8:17 AM on November 5, 2015: member

    Closing this - even though this was a zero-hassle backport I'm not convinced that this is correct and I don't expect to find enough testing.

  20. laanwj closed this on Nov 5, 2015

  21. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me