Skip to content

Conversation

knst
Copy link
Collaborator

@knst knst commented Sep 27, 2025

Issue being fixed or feature implemented

Output of spelling linter is pretty long and dirty, this PR clear it up a bit

What was done?

Backports + extra fixes for Dash specific code

How Has This Been Tested?

Reviewed output of https://github.com/dashpay/dash/actions/runs/18056747144/job/51387575631?pr=6855

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

MarcoFalke and others added 4 commits September 27, 2025 14:42
58ccc88 lint: add creat and ba into ignore-words for lint-spelling (brunoerg)
bad0e7f doc: Fix typos pointed out by lint-spelling (brunoerg)

Pull request description:

  Occuring -> occurring (random.h)
  Covert -> convert (chacha_poly_aead.cpp)
  Fix `nWe` false positive in blockchain.cpp (bitcoin#24203 (comment))

  Got it by linter, other ones are false positives.

ACKs for top commit:
  prusnak:
    ACK 58ccc88

Tree-SHA512: b350d0e64968b96ead226da0be6aa4ca3f8e482ae401697867684ce8478e96b954124b3dea6dcd697aad4206f209f32f238d7cf0a0589075f24f5cf629c563f3
94c7dd9 doc: Fix typos from codespell lint (Yerzhan Mazhkenov)

Pull request description:

  Typos from codespell linter: https://cirrus-ci.com/task/6677401661865984?logs=lint#L856
  - txrequest.cpp: `annoucements` ==> `announcements`
  - contrib/guix/README.md:298: `stil` ==> `still`
  - contrib/guix/guix-build:18: `invokable` ==> `invocable`
  - contrib/guix/libexec/prelude.bash:12: `invokable` ==> `invocable`
  - src/test/fuzz/tx_pool.cpp:37: `acess` ==> `access`
  - src/txorphanage.h:29: `orginating` ==> `originating`

ACKs for top commit:
  practicalswift:
    cr ACK 94c7dd9: thnaks fro fiixng tpyos!
  jarolrod:
    ACK 94c7dd9

Tree-SHA512: e0fac462a2f9e68b6a161c9f5d95b4d0648ce5c618fd7cd243d57db8f0256138b8823b166ea406b21e95586eae43047df1ef0df04616858082a39c1d1eb13a86
… in comments

f565b28 Fixup option name in bench message (Ben Woosley)
bf209ac doc: Fix spelling errors identified by codespell in coments (Ben Woosley)

Pull request description:

  From the output [here](https://cirrus-ci.com/task/5275612980969472?logs=lint#L849):
  ```
  src/qt/test/addressbooktests.cpp:185: wilcard ==> wildcard
  src/qt/test/addressbooktests.cpp:191: wilcard ==> wildcard
  src/test/miniscript_tests.cpp:227: nd ==> and, 2nd
  src/test/versionbits_tests.cpp:260: everytime ==> every time
  src/util/time.h:89: precicion ==> precision
  src/util/time.h:90: precicion ==> precision
  ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt
  ```

  ~~I left the 'nd' in miniscript_tests as-is, as it's valid miniscript,
  and I'm wary of whitelisting it.~~

ACKs for top commit:
  dunxen:
    ACK f565b28

Tree-SHA512: 501a426c5f6f9761e2c8f980d5d955611428a827321888f53e0ae9526b0fecd43f9d1fa845fc70ae2489d77be6dc0b5b371dff55c5146f4b39ed874f4a1ea917
@knst knst added this to the 23 milestone Sep 27, 2025
Copy link

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

Copy link

coderabbitai bot commented Sep 27, 2025

Walkthrough

The PR updates multiple source and test files to correct typos and adjust comment/help text formatting. Changes include spelling fixes in comments and docstrings, minor indentation/formatting adjustment in configure.ac without altering logic, reformatting of the getblockfrompeer RPC help text, and adding “nd” to the spelling ignore list. No code execution paths, control flow, or behavior are modified. No public APIs or signatures are changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Rationale: Many files touched but edits are homogeneous, text-only (comments/docstrings/help text) and a small ignore-word addition. No logic changes, no API updates, and minimal risk.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title explicitly states that this pull request backports three upstream Bitcoin spelling fixes and focuses on correcting spelling errors, which aligns directly with the content of the changeset. It concisely highlights the main change without extraneous detail and references the relevant upstream PR numbers for context.
Description Check ✅ Passed The pull request description clearly describes the issue of noisy spelling linter output, summarizes the backports and additional Dash-specific fixes performed, and notes how the changes were tested, which directly corresponds to the changes in the code. It provides relevant context and testing information without straying off topic.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4a9d82 and 00f1ceb.

📒 Files selected for processing (18)
  • configure.ac (2 hunks)
  • src/evo/netinfo.cpp (1 hunks)
  • src/masternode/payments.cpp (1 hunks)
  • src/net.cpp (1 hunks)
  • src/random.h (1 hunks)
  • src/rpc/blockchain.cpp (1 hunks)
  • src/rpc/rawtransaction_util.h (1 hunks)
  • src/sync.h (1 hunks)
  • src/test/coinjoin_queue_tests.cpp (1 hunks)
  • src/test/fuzz/tx_pool.cpp (1 hunks)
  • src/util/enumerate.h (1 hunks)
  • src/util/time.h (1 hunks)
  • src/validation.cpp (1 hunks)
  • src/wallet/coinselection.h (1 hunks)
  • test/functional/feature_llmq_singlenode.py (1 hunks)
  • test/functional/test_framework/test_framework.py (1 hunks)
  • test/functional/wallet_descriptor.py (1 hunks)
  • test/lint/spelling.ignore-words.txt (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
src/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit inference engine (CLAUDE.md)

src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction

Files:

  • src/evo/netinfo.cpp
  • src/wallet/coinselection.h
  • src/test/fuzz/tx_pool.cpp
  • src/util/time.h
  • src/random.h
  • src/masternode/payments.cpp
  • src/test/coinjoin_queue_tests.cpp
  • src/validation.cpp
  • src/net.cpp
  • src/sync.h
  • src/util/enumerate.h
  • src/rpc/blockchain.cpp
  • src/rpc/rawtransaction_util.h
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit inference engine (CLAUDE.md)

Masternode lists must use immutable data structures (Immer library) for thread safety

Files:

  • src/evo/netinfo.cpp
  • src/masternode/payments.cpp
test/functional/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Functional tests should be written in Python and placed in test/functional/

Files:

  • test/functional/feature_llmq_singlenode.py
  • test/functional/wallet_descriptor.py
  • test/functional/test_framework/test_framework.py
src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit inference engine (CLAUDE.md)

Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Files:

  • src/test/fuzz/tx_pool.cpp
  • src/test/coinjoin_queue_tests.cpp
🧠 Learnings (2)
📓 Common learnings
Learnt from: kwvg
PR: dashpay/dash#6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.

Applied to files:

  • src/masternode/payments.cpp
  • test/functional/test_framework/test_framework.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: linux64_ubsan-build / Build source
  • GitHub Check: linux64_sqlite-build / Build source
  • GitHub Check: linux64_fuzz-build / Build source
  • GitHub Check: linux64-build / Build source
  • GitHub Check: linux64_nowallet-build / Build source
  • GitHub Check: arm-linux-build / Build source
  • GitHub Check: win64-build / Build source
  • GitHub Check: mac-build / Build source
  • GitHub Check: linux64_tsan-build / Build source
  • GitHub Check: Lint / Run linters
🔇 Additional comments (2)
src/masternode/payments.cpp (1)

44-44: Spelling fix looks correct. Comment grammar is now accurate and clearer.

src/rpc/blockchain.cpp (1)

484-487: Help text formatting improvement LGTM. The adjusted paragraph spacing reads better without impacting behavior.

Comment on lines +15 to 16
nd
nin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid masking common typos in the spelling whitelist.
Adding nd to the ignore list will allow genuine mistakes like a dropped leading character in “and” or “end” to pass unnoticed. Please keep the linter catching those typos and instead whitelist the exact token that caused the warning (e.g., 2nd) or adjust the checker so digits aren’t stripped before validation.

-nd
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
nd
nin
nin
🤖 Prompt for AI Agents
In test/lint/spelling.ignore-words.txt around lines 15 to 16, the entry "nd" is
too generic and will mask common typos (e.g., dropped leading characters in
"and" or "end"); remove "nd" from the ignore list and either add the exact
token(s) that legitimately should be ignored (for example "2nd") or update the
spelling checker so it does not strip digits before validation (so numeric
suffixes like "2nd" are validated as-is) instead of whitelisting a bare "nd".

for (int i = 0; i < 2 * COINBASE_MATURITY; ++i) {
CTxIn in = MineBlock(g_setup->m_node, CScript() << OP_TRUE);
// Remember the txids to avoid expensive disk acess later on
// Remember the txids to avoid expensive disk access later on
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

21626: consider fixing invokable too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange, by some reason bitcoin core still have "invokable" there:;

bitcoin-master/contrib/guix/guix-verify:# Required non-builtin commands should be invokable
bitcoin-master/contrib/guix/guix-clean:# Required non-builtin commands should be invokable
bitcoin-master/contrib/guix/guix-attest:# Required non-builtin commands should be invokable

And here bitcoin-master/test/lint/spelling.ignore-words.txt too

...
incomin
invokable
lief
...

*
* @param prevTxsUnival Array of previous txns outputs that tx depends on but may not yet be in the block chain
* @param keystore A pointer to the temprorary keystore if there is one
* @param keystore A pointer to the temporary keystore if there is one
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

00f1ceb: not dash specific code but ok

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

original PR is already merged:

commit a097a25c78adbe5dc95c306e0130875333c36be0
Author: Vijay Das Manikpuri <[email protected]>
Date:   Tue Mar 22 09:53:10 2022 +0530

    Merge #17351: doc: Fix some misspellings



/** Chooose a random change target for each transaction to make it harder to fingerprint the Core
/** Choose a random change target for each transaction to make it harder to fingerprint the Core
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

00f1ceb: same

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, irrelevant,should be part of bitcoin#24796. I will fix it if there's any conflict or rebase will be needed

@knst knst requested a review from UdjinM6 September 29, 2025 17:50
Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 00f1ceb

@PastaPastaPasta PastaPastaPasta dismissed UdjinM6’s stale review September 30, 2025 14:04

We can do more changes later as needed, if we missed something here.

@PastaPastaPasta PastaPastaPasta merged commit 2d3e95f into dashpay:develop Sep 30, 2025
36 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants