-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor: Testnet4 - Replace uint256S("str") -> uint256{"str"} #30721
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
refactor: Testnet4 - Replace uint256S("str") -> uint256{"str"} #30721
Conversation
Ran scripted-diff from 2d9d752. Follow-up to bitcoin#29775 which overlapped with work on bitcoin#30560 (the latter includes the scripted-diff commit).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
review-ACK 49f9b64 🐮 Show signatureSignature:
|
ACK 49f9b64 For the future: you could have made the commit here an actual scripted diff too. |
Good point, thanks, still getting the hang of scripted diffs. Makes sense in case new stuff using |
A scripted-diff won't help here, because it is applied on top of the commit it is based on, which won't change when master is changed, unless you rebase on every push to master. Moreover, I think scripted-diffs should only be used when it makes sense. As a rule of thumb, I think when the script is larger than the diff, they do not make sense, because:
It seems easier for reviewers who like |
Couldn't CI at least run scripted diffs when the PR they belong to gets merged into master - so it could be caught post-merge? |
When a commit from a pull request (which may contain a scripted-diff) is merged into another branch, the commit itself does not change, so it won't affect the execution or the result of the scripted-diff in that commit. In theory, the commits could be rebased/cherry-picked instead of merged. However, that'd make auditing harder, because it makes it easier to inject malicious code accidentally or intentionally. Also, it wouldn't help here, because then the scripted diff check may permanently fail on the rebased/cherry-picked commits. (It could only be fixed up in a follow-up, which seems easier to do as-is done today). |
#29775 was merged into master as da083d4, and #30560 was merged into master as 21c2879. I'm thinking CI running on 21c2879 upon merge, could detect a new scripted-diff, re-run it on 21c2879 and in theory detect issues with #29775 if it had been merged into master earlier (wouldn't have caught this case though, as da083d4 was merged later). Is that mental model of Git correct? Are you concerned that scripted-diffs should only be run on the tree of their own commit, and might cause issues when run on merge-commits when PRs include later commits after their scripted-diff that happen to introduce text that would be replaced? What I'm after is less reliance on having to remember to re-run scripted-diffs. |
Needs backport to 28.x branch |
Unless this fixes a bug that I'm missing, refactors generally are not candidates for backport. |
Ran scripted-diff from 2d9d752:
Follow-up to Testnet4 introduction #29775 which overlapped with work on
uint256
consteval
ctor #30560 (the latter includes the scripted-diff commit).Going forward
uint256{}
should be used for constants instead ofuint256S()
.