CheckDefaultCheckTemplateVerifyHash()
to BIP-119 specification in the obvious way. Even though it is trivial, it should be included to dissolve any doubts.
Define BIP-119 CheckDefaultCheckTemplateVerifyHash #1226
pull OrfeasLitos wants to merge 4 commits into bitcoin:master from OrfeasLitos:define-check-119 changing 1 files +6 −0-
OrfeasLitos commented at 9:40 pm on November 2, 2021: contributorAdds pseudocode definition of
-
Define BIP-119 CheckDefaultCheckTemplateVerifyHash 1cab3e87f3
-
luke-jr commented at 11:05 pm on November 4, 2021: member
-
luke-jr added the label Proposed BIP modification on Nov 4, 2021
-
JeremyRubin commented at 2:04 pm on November 5, 2021: contributorack – i’m not sure that it compile though because the type of stack.back() is vector and the checker takes a hash but maybe theres a constructor that does that coercion? Otherwise should use std::equal_range or something…
-
OrfeasLitos commented at 2:53 pm on November 5, 2021: contributorI suspect that a
uint256()
around thestack.back()
that is passed toCheckDefaultCheckTemplateVerifyHash
would do the trick in a clean way. -
Cast 8-vector of u32 to u256 897e6458ce
-
Fix typo 1839f43779
-
in bip-0119.mediawiki:148 in 897e6458ce outdated
144@@ -145,7 +145,7 @@ specification for the semantics of OP_CHECKTEMPLATEVERIFY. 145 // If the argument was not 32 bytes, treat as OP_NOP4: 146 switch (stack.back().size()) { 147 case 32: 148- if (!checker.CheckDefaultCheckTemplateVerifyHash(stack.back())) { 149+ if (!checker.CheckDefaultCheckTemplateVerifyHash(u256(stack.back()))) {
JeremyRubin commented at 4:57 pm on November 11, 2021:typoJeremyRubin commented at 10:40 pm on November 11, 2021: contributorseems reasonable to me now – note that this differs from https://github.com/bitcoin/bitcoin/pull/21702/files#diff-a0337ffd7259e8c7c9a7786d6dbd420c80abfa1afdb34ebae3261109d9ae3c19R1910-R1918, the actual implementation.
small preference to keep the interface of the checker the same.
Convert inside CheckDefaultCheckTemplateVerifyHash 3ff4a4ce9dOrfeasLitos commented at 11:16 am on November 21, 2021: contributorPTALJeremyRubin commented at 8:58 pm on November 21, 2021: contributorLooks good to me!luke-jr merged this on Dec 15, 2021luke-jr closed this on Dec 15, 2021
OrfeasLitos deleted the branch on Mar 31, 2024
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 18:10 UTC
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 18:10 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me