Author: James O'Beirne 2015-10-08 00:29:25
Published on: 2015-10-08T00:29:25+00:00
A bug in the recently merged "obfuscation" patch for Bitcoin has been reported, which obfuscates the content of the "chainstate" LevelDB by XOR'ing it against a random "key". CLevelDBWrapper's Read/Write methods cover most use cases, but the question was raised whether or not iterating over the database should also be handled. Specifically, it was suggested that the obfuscation key should be applied while iterating over the coin database in CCoinsViewDB::GetStats. The issue has been confirmed as a bug and a fix has been filed at https://github.com/bitcoin/bitcoin/pull/6777. Tests will be written to prevent regressions. The patch author expressed appreciation for the diligence of the reporter and acknowledged that the implementation of GetStats may be dead code. It was noted that users of CLevelDBWrapper who go directly for the iterator run the risk of dealing with obfuscated data and this should be remedied.
Updated on: 2023-06-11T00:01:12.280336+00:00