Skip to content

[Upstream] [DB] Bitcoin 0.12-0.14 dbwrapper improvements - #102

Merged
lopeed merged 13 commits into
developfrom
upstream-backport_dbwrapper
Aug 27, 2021
Merged

[Upstream] [DB] Bitcoin 0.12-0.14 dbwrapper improvements#102
lopeed merged 13 commits into
developfrom
upstream-backport_dbwrapper

Conversation

@lyricidal

Copy link
Copy Markdown

f4e6c52 from bitcoin/bitcoin#12659

The leveldb::Status class logs the filename of corrupted files, which might be useful when looking at error reports from usres. In theory this is already logged via the LogPrintf() statement in HandleError(), but that may not always be close to where the final error message is logged, e.g. see #11355 (comment) where the log trace provided by the user does not contain that information (and other user comments in the same issue).

This also adds a log message instructing the user to run the process with -debug=leveldb, which provides much more verbose error messages about LevelDB internals. This may not really help much, but improving the error messages here can't hurt.

The rest of the commits:

This backports a series of updates and cleanups to the LevelDB wrapper from:

PIVX-specific edits were required to keep the sporks and zerocoin databases in line.

[*] NOTE: excluding the obfuscation of databases by xoring data, as we might not want this feature (e.g. as zcash/zcash#2598). Otherwise it can be discussed, and added, with a separate PR.

from PIVX-Project/PIVX#1629

coming from bitcoin/bitcoin@42cb388 extracting the refactor and omitting the chainstate obfuscation
based on bitcoin/bitcoin@3499ce1 and bitcoin/bitcoin@0fdf8c8 excluding the obfuscation, and fixing styling.
…tch, CLevelDBIterator

Backports bitcoin/bitcoin@1488506 (gettxoutsetinfo functional test is already ported)
HandleError is implementation-specific.

backports bitcoin/bitcoin@869cf12
@lyricidal
lyricidal requested review from anprdev and lopeed August 27, 2021 02:04
@lopeed
lopeed merged commit a769e60 into develop Aug 27, 2021
@lopeed
lopeed deleted the upstream-backport_dbwrapper branch August 27, 2021 07:09
@lyricidal lyricidal added the Upstream Upstream backports/fixes label Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Upstream Upstream backports/fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants