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.
2 Answers
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_giCommented Nov 15, 2017 at 3:26
-
1There’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.– ClarisCommented Nov 15, 2017 at 3:59