-
Notifications
You must be signed in to change notification settings - Fork 38.7k
help: enrich help text for -loadblock
#33343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33343. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. LLM Linter (✨ experimental)Possible typos and grammar issues:
drahtbot_id_5_m |
l0rinc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's a documentation issue, I think we should rather fix it by adding the obfuscation key to the AutoFile instead.
I will investigate if adding a fix and updating feature_loadblock.py makes more sense and will push an alternative PR to see what people think is more appropriate here.
Thanks for jumping on this so quickly.
|
I wasn't aware of this, it seems we have a dedicated tool to https://github.com/bitcoin/bitcoin/tree/master/contrib/linearize. |
Hi l0rinc,
|
|
I wrote that before I found the |
It was originally designed to to something else (create a linear, in order chain), so using the tool has side effects (maybe the users doesn't want to lose historical forks for some reason). Could mention it as an example though. I'm not convinced that changing the interface to support adding a xor-key per |
d96fac4 to
c1789d4
Compare
`-loadblock` doesn't support obfuscated blocks, mention it in its help text to avoid troubles for users. Signed-off-by: Hao Xu <hao.xu@linux.dev>
c1789d4 to
d787e55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HowHsu Did you try contrib/linearize yourself to export the .blk files for -loadblock? Did it solve your issue? I have suggested a simpler documentation, do you think that help others to use the linearize tool when they're in your situation?
| argsman.AddArg("-includeconf=<file>", "Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||
| argsman.AddArg("-allowignoredconf", strprintf("For backwards compatibility, treat an unused %s file in the datadir as a warning, not an error.", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||
| argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||
| argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup (does not support obfuscated blocks, see Issue #33280 for related conversation, and see contrib/linearize tool for clues of deobfuscation and reobfuscation)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup (does not support obfuscated blocks, see Issue #33280 for related conversation, and see contrib/linearize tool for clues of deobfuscation and reobfuscation)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | |
| argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup (obfuscated block files are not supported; use contrib/linearize to export blocks to a plain, loadable format)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); |
I didn't, but I read the code of them (files under |
|
I think we should try it ourselves before recommending it in the documentation |
|
I think it would make sense to support XOR for loadblock if we're assuming the chain has data that can trigger bad things |
It is already tested in |
Hi Luke, what do you mean by "assuming the chain has data that can trigger bad things" |
I'll try that later when I have some time for it, though the function of the script is already clear enough for me by carefully reading the code. |
That's where I found it, but to see if it solves the original problem for why this PR was opened, it would help to have personal experience with the script so that we can document it such that others don't need to browse the tests. I'm also fine with anyone else having experience with the script suggesting a useful help text. |
-loadblockdoesn't support XOR-ed files, mention it in its help text to avoid troubles for users.