Skip to content

Be stricter with side effects in VERIFY#1485

Open
real-or-random wants to merge 1 commit intobitcoin-core:masterfrom
real-or-random:202401-i-side-effect
Open

Be stricter with side effects in VERIFY#1485
real-or-random wants to merge 1 commit intobitcoin-core:masterfrom
real-or-random:202401-i-side-effect

Conversation

@real-or-random
Copy link
Copy Markdown
Contributor

Adds a rule to CONTRIBUTING.md and makes the code adhere to it.

@real-or-random real-or-random added assurance tweak/refactor meta/development processes, conventions, developer documentation, etc. labels Jan 17, 2024
@real-or-random
Copy link
Copy Markdown
Contributor Author

cc @theStack because you worked on #1393

Comment thread src/group_impl.h
SECP256K1_GE_VERIFY(&r[i_ver]);
}
}
#endif
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These loops caught my attention initially. Here we set i inside VERIFY block, but we also use it outside. I think this should be avoided out of an abundance of caution.

Copy link
Copy Markdown
Contributor

@theStack theStack 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

Comment thread CONTRIBUTING.md Outdated
Copy link
Copy Markdown
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

Code-review ACK f65f1a4

@real-or-random
Copy link
Copy Markdown
Contributor Author

thanks, rebased.

Copy link
Copy Markdown
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

re-ACK f3b91f0

Comment thread src/modules/ellswift/main_impl.h Outdated
Comment thread src/modules/ellswift/main_impl.h Outdated
Adds a rule to CONTRIBUTING.md and makes the code adhere to it.
Copy link
Copy Markdown
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

re-ACK ee7083f
(only whitespace fixes since my previous ACK)

@bitcoin-core bitcoin-core deleted a comment from 88woods88 Aug 5, 2024
@bitcoin-core bitcoin-core deleted a comment from 88woods88 Aug 5, 2024
Copy link
Copy Markdown
Contributor

@stratospher stratospher left a comment

Choose a reason for hiding this comment

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

ACK ee7083f. if you retouch - few more places in the musig module needs to be updated with this pattern too.

real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Aug 19, 2025
This is slightly more pedantic because it avoids suppressing the warning
value when not necessary, and I find it more readable. And it matches our
current conventions, see for example
secp256k1_ellswift_xswiftec_inv_var and see also my PR
bitcoin-core#1485
(which I should rebase...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assurance meta/development processes, conventions, developer documentation, etc. tweak/refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants