Repository navigation
backport: [easy] bitcoin#29703, bitcoin#29585, bitcoin#29696, bitcoin#30146, bitcoin#30603, bitcoin#29718, bitcoin#30547, bitcoin#28974, bitcoin#30192, bitcoin#29932 #8162
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
Changes from all commits
8a201b8
d4ef53c
87b6c4c
c3e5e1f
c2a8358
bc846df
2b6ef42
f6b3837
12028ff
048f873
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #include <string> | ||
| thread_local std::string foo; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright (c) 2023 Bitcoin Developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #include "nontrivial-threadlocal.h" | ||
|
|
||
| #include <clang/AST/ASTContext.h> | ||
| #include <clang/ASTMatchers/ASTMatchFinder.h> | ||
|
|
||
|
|
||
| // Copied from clang-tidy's UnusedRaiiCheck | ||
| namespace { | ||
| AST_MATCHER(clang::CXXRecordDecl, hasNonTrivialDestructor) { | ||
| // TODO: If the dtor is there but empty we don't want to warn either. | ||
| return Node.hasDefinition() && Node.hasNonTrivialDestructor(); | ||
| } | ||
| } // namespace | ||
|
|
||
| namespace bitcoin { | ||
|
|
||
| void NonTrivialThreadLocal::registerMatchers(clang::ast_matchers::MatchFinder* finder) | ||
| { | ||
| using namespace clang::ast_matchers; | ||
|
|
||
| /* | ||
| thread_local std::string foo; | ||
| */ | ||
|
|
||
| finder->addMatcher( | ||
| varDecl( | ||
| hasThreadStorageDuration(), | ||
| hasType(hasCanonicalType(recordType(hasDeclaration(cxxRecordDecl(hasNonTrivialDestructor()))))) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| ).bind("nontrivial_threadlocal"), | ||
| this); | ||
| } | ||
|
|
||
| void NonTrivialThreadLocal::check(const clang::ast_matchers::MatchFinder::MatchResult& Result) | ||
| { | ||
| if (const clang::VarDecl* var = Result.Nodes.getNodeAs<clang::VarDecl>("nontrivial_threadlocal")) { | ||
| const auto user_diag = diag(var->getBeginLoc(), "Variable with non-trivial destructor cannot be thread_local."); | ||
| } | ||
| } | ||
|
|
||
| } // namespace bitcoin | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Copyright (c) 2023 Bitcoin Developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #ifndef NONTRIVIAL_THREADLOCAL_CHECK_H | ||
| #define NONTRIVIAL_THREADLOCAL_CHECK_H | ||
|
|
||
| #include <clang-tidy/ClangTidyCheck.h> | ||
|
|
||
| namespace bitcoin { | ||
|
|
||
| // Warn about any thread_local variable with a non-trivial destructor. | ||
| class NonTrivialThreadLocal final : public clang::tidy::ClangTidyCheck | ||
| { | ||
| public: | ||
| NonTrivialThreadLocal(clang::StringRef Name, clang::tidy::ClangTidyContext* Context) | ||
| : clang::tidy::ClangTidyCheck(Name, Context) {} | ||
|
|
||
| bool isLanguageVersionSupported(const clang::LangOptions& LangOpts) const override | ||
| { | ||
| return LangOpts.CPlusPlus; | ||
| } | ||
| void registerMatchers(clang::ast_matchers::MatchFinder* Finder) override; | ||
| void check(const clang::ast_matchers::MatchFinder::MatchResult& Result) override; | ||
| }; | ||
|
|
||
| } // namespace bitcoin | ||
|
|
||
| #endif // NONTRIVIAL_THREADLOCAL_CHECK_H |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,7 +16,7 @@ Once you've obtained the snapshot, you can use the RPC command `loadtxoutset` | |||||||||
| A pruned node can load a snapshot. To save space, it's possible to delete the | ||||||||||
| snapshot file as soon as `loadtxoutset` finishes. | ||||||||||
|
|
||||||||||
| The minimum `-dbcache` setting is 550 MiB, but this functionality ignores that | ||||||||||
| The minimum `-prune` setting is 550 MiB, but this functionality ignores that | ||||||||||
| minimum and uses at least 1100 MiB. | ||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
Comment on lines
+19
to
20
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🟡 Suggestion: Document Dash's actual pruning minimum for AssumeUTXO The documentation states that the minimum mainnet
Suggested change
source:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bitcoin#29718 only renames 🤖 backportsys, on behalf of the Dash backport pipeline.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Withdrawn (re-reviewed at |
||||||||||
|
|
||||||||||
| As the background sync continues there will be temporarily two chainstate | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -122,6 +122,22 @@ $ dash-cli -rpcwallet="restored-wallet" getwalletinfo | |||||||||
|
|
||||||||||
| The restored wallet can also be loaded in the GUI via `File` ->`Open wallet`. | ||||||||||
|
|
||||||||||
| ## Wallet Passphrase | ||||||||||
|
|
||||||||||
| Understanding wallet security is crucial for safely storing your Dash. A key aspect is the wallet passphrase, used for encryption. Let's explore its nuances, role, encryption process, and limitations. | ||||||||||
|
|
||||||||||
| - **Not the Seed:** | ||||||||||
| The wallet passphrase and the seed are two separate components in wallet security. The seed, or HD seed, functions as a master key for deriving private and public keys in a hierarchical deterministic (HD) wallet. In contrast, the passphrase serves as an additional layer of security specifically designed to secure the private keys within the wallet. The passphrase serves as a safeguard, demanding an additional layer of authentication to access funds in the wallet. | ||||||||||
|
|
||||||||||
| - **Protection Against Unauthorized Access:** | ||||||||||
| The passphrase serves as a protective measure, securing your funds in situations where an unauthorized user gains access to your unlocked computer or device while your wallet application is active. Without the passphrase, they would be unable to access your wallet's funds or execute transactions. However, it's essential to be aware that someone with access can potentially compromise the security of your passphrase by installing a keylogger. | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Limit the protection claim to a locked wallet. If the owner has unlocked the wallet, another person using the active computer can send funds during the unlock period without entering the passphrase again. State that the passphrase protects a locked wallet, and recommend locking the wallet and the computer when unattended.
|
||||||||||
| - **Protection Against Unauthorized Access:** | |
| The passphrase serves as a protective measure, securing your funds in situations where an unauthorized user gains access to your unlocked computer or device while your wallet application is active. Without the passphrase, they would be unable to access your wallet's funds or execute transactions. However, it's essential to be aware that someone with access can potentially compromise the security of your passphrase by installing a keylogger. | |
| - **Protection Against Unauthorized Access:** | |
| The passphrase protects the private keys in your wallet while the wallet is locked. If the wallet is unlocked, someone with access to your computer may be able to execute transactions without entering the passphrase again. Lock your wallet and computer when unattended. Someone with access to your computer can also potentially compromise the security of your passphrase by installing a keylogger. |
source: gpt-6.1-sol (phase2-reviewer: general)
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.
This paragraph is copied word for word from upstream bitcoin#28974, and the backport does not change it. Correcting upstream's security wording is better done upstream or in a separate Dash doc PR than by changing the backport.
🤖 backportsys, on behalf of the Dash backport pipeline.
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.
Still applies (re-reviewed at 048f873c): Matching upstream does not make this user-facing security statement accurate: walletpassphrase sets a relock deadline, and signing remains available without another passphrase entry while the wallet is unlocked. The documentation must distinguish locked from unlocked-wallet protection even in a faithful backport.
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.
✅ Withdrawn at
048f873c; see the replies below.
🟡 Suggestion: Qualify the consequences of a forgotten passphrase
A forgotten passphrase prevents unlocking the encrypted wallet, but it does not necessarily make the funds inaccessible in every case. A usable unencrypted backup made before encryption may contain the same keys. Explain the loss condition accurately and tell users to check for a usable backup.
| - **Risk of Fund Loss if Forgotten or Lost:** | |
| If the wallet passphrase is too complex and is subsequently forgotten or lost, there is a risk of losing access to the funds permanently. A forgotten passphrase will result in the inability to unlock the wallet and access the funds. | |
| - **Risk of Fund Loss if Forgotten or Lost:** | |
| If the wallet passphrase is forgotten or lost, you will be unable to unlock that encrypted wallet. Depending on your backups, this may result in permanently losing access to the funds; check whether you have a usable backup, such as an unencrypted HD backup containing the same keys. |
source: gpt-6.1-sol (phase2-reviewer: general, backport-reviewer, dash-core-commit-history)
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.
This text is copied word for word from upstream bitcoin#28974. Adding a note about backups changes upstream's content rather than fixing the backport.
🤖 backportsys, on behalf of the Dash backport pipeline.
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.
Withdrawn (re-reviewed at 048f873c): The paragraph describes the inability to unlock the encrypted wallet and presents permanent loss as a risk, while recovery from a separate backup is a broader documentation enhancement. The requested backup qualification is therefore not required for this faithful backport.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Build | ||
| ----- | ||
|
|
||
| `--enable-lcov-branch-coverage` has been removed, given | ||
| incompatibilities between lcov version 1 & 2. `LCOV_OPTS` | ||
| should be used to set any options instead. |
Uh oh!
There was an error while loading. Please reload this page.