I'm wondering if there is a flag that allows running bitcoind without using an obfuscation key for the chainstate. I haven't been able to find it.


To add on to eponymous's answer, to disable this, comment out this section of code:


if (!key_exists && obfuscate && IsEmpty()) {
    // Initialize non-degenerate obfuscation if it won't upset
    // existing, non-obfuscated data.
    std::vector<unsigned char> new_key = CreateObfuscateKey();

    // Write `new_key` so we don't obfuscate the key with itself
    Write(OBFUSCATE_KEY_KEY, new_key);
    obfuscate_key = new_key;

    LogPrintf("Wrote new obfuscate key for %s: %s\n", path.string(), HexStr(obfuscate_key));

Then recompile, then delete your existing chainstate. (This change only causes it to stop generating an obfuscation key, it does not un-obfuscate the data.)


There’s no way of easily disabling obfuscation, but you could build a version that sets the keys to zero, resulting in no change when the XOR is used. Generally it has no impact on anything, so it’s left enabled even on non-windows systems where it’s generally not useful.

  • That's what I was guessing. I'm trying to optimize my python's chainstate parser. It not a big of a deal when parsing a single output, but if you have to parse the whole chainstate it makes a difference in terms of running time. Seeing @NickODell answer seems to me that a config parameter that deals with this could have been easily set though. – sr-gi Nov 15 '17 at 3:26
  • 1
    There’s probably going to be UTXO address indexes in the core client as an option at some point which might be of use to you as well. – Anonymous Nov 15 '17 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.