Skip to content

Conversation

brunoerg
Copy link
Contributor

@brunoerg brunoerg commented Jan 29, 2022

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

Got it by linter, other ones are false positives.

@DrahtBot DrahtBot added the Docs label Jan 29, 2022
@brunoerg brunoerg changed the title doc: Fix typo in random.h doc: Fix typo in random.h and chacha_poly_aead.cpp Jan 29, 2022
@brunoerg brunoerg force-pushed the 2022-fix-typo-randomh branch from 094fc29 to 9255261 Compare January 29, 2022 23:08
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 30, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #23813 (Add test and docs for getblockfrompeer with pruning by fjahr)
  • #23441 (fuzz: Differential fuzzing for ChaCha20Forward4064-Poly1305@bitcoin cipher suite by stratospher)
  • #23233 (BIP324: Add encrypted p2p transport {de}serializer by dhruv)
  • #20962 (Alter the ChaCha20Poly1305@Bitcoin AEAD to the new specification by jonasschnelli)

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.

Copy link
Contributor

@prusnak prusnak left a comment

Choose a reason for hiding this comment

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

utACK 9255261

Copy link
Contributor

@shaavan shaavan left a comment

Choose a reason for hiding this comment

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

Concept ACK

I agree with @jonatack suggestion. This PR's scope should be broadened to correct all the lint spelling check instances, either by fixing the typo or marking the instances as false positive.

After the recent update of the PR. There are still three instances in the lint-spelling.sh test that needs to be addressed:

  • nWe
  • creat
  • ba

Screenshot from 2022-01-30 16-15-04

I would also suggest renaming the PR heading to better to infer the new general goal of this PR.

@prusnak
Copy link
Contributor

prusnak commented Jan 30, 2022

  • nWe
  • creat
  • ba

These are all three false positives. Suggestion for fixing the nWe one:

--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -790,10 +790,10 @@ static RPCHelpMan getblockfrompeer()
 {
     return RPCHelpMan{
         "getblockfrompeer",
-        "Attempt to fetch block from a given peer.\n"
-        "\nWe must have the header for this block, e.g. using submitheader.\n"
-        "Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n"
-        "\nReturns an empty JSON object if the request was successfully scheduled.",
+        "Attempt to fetch block from a given peer.\n\n"
+        "We must have the header for this block, e.g. using submitheader.\n"
+        "Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
+        "Returns an empty JSON object if the request was successfully scheduled.",
         {
             {"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
             {"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},

@brunoerg
Copy link
Contributor Author

Nice suggestion @prusnak for nWe. Going to address it.

@brunoerg brunoerg changed the title doc: Fix typo in random.h and chacha_poly_aead.cpp doc: Fix typos pointed by lint-spelling Jan 30, 2022
@brunoerg brunoerg changed the title doc: Fix typos pointed by lint-spelling doc: Fix typos pointed out by lint-spelling Jan 30, 2022
@brunoerg brunoerg force-pushed the 2022-fix-typo-randomh branch from 9255261 to 80045cf Compare January 30, 2022 11:45
@brunoerg brunoerg force-pushed the 2022-fix-typo-randomh branch from 80045cf to bad0e7f Compare January 30, 2022 11:59
@brunoerg
Copy link
Contributor Author

force-pushed addressing @prusnak's comments

Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

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

ACK bad0e7f

@jonatack
Copy link
Member

test/lint/lint-spelling.sh still returns:

src/util/syscall_sandbox.cpp:128: creat ==> create
test/functional/data/rpc_decodescript.json:81: ba ==> by, be
test/functional/data/rpc_decodescript.json:84: ba ==> by, be

Suggestion

--- a/test/lint/lint-spelling.ignore-words.txt
+++ b/test/lint/lint-spelling.ignore-words.txt
@@ -1,6 +1,9 @@
 asend
+ba
 blockin
 cachable
+creat
 fo
 fpr
 hights

(creat is a valid linux syscall)

@katesalazar
Copy link
Contributor

Concept ACK

@brunoerg
Copy link
Contributor Author

force-pushed addressing @jonatack's comments. Thank you for the reviews!

Copy link
Contributor

@prusnak prusnak left a comment

Choose a reason for hiding this comment

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

ACK 58ccc88

tested that ./test/lint/lint-spelling.sh returns no errors

Copy link
Contributor

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK, it's good to fix this. The changes make sense, I did not validate that the linter output is clean now.

@maflcko maflcko merged commit af7b077 into bitcoin:master Jan 31, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 1, 2022
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
@bitcoin bitcoin locked and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants