Skip to content

Commit 0a2af1b

Browse files
committed
Add missing OP_CAT warning and update FAQ
1 parent 38bbfd0 commit 0a2af1b

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

src/lib/utils/bitcoin/script/interpreter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,10 @@ export const evalScript = (
439439
return setError(SCRIPT_ERR_DISABLED_OPCODE) // Disabled opcodes (CVE-2010-5137).
440440
}
441441

442+
if (opcode === OP_CAT) {
443+
warnings.add(ScriptWarning.cat)
444+
}
445+
442446
if (opcode >= 1 && opcode <= OP_PUSHDATA4) {
443447
let pushBytes: number
444448

src/routes/faq/+page.svelte

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,29 @@
1414
Where do I find the source code?
1515
</dt>
1616
<dd>
17-
In the <a
18-
target="_blank"
19-
rel="noreferrer"
20-
href="https://github.com/vostrnad/bitcoinutils.dev">GitHub repository</a
21-
>.
17+
<p>
18+
In the <a
19+
target="_blank"
20+
rel="noreferrer"
21+
href="https://github.com/vostrnad/bitcoinutils.dev">GitHub repository</a
22+
>.
23+
</p>
2224
</dd>
2325

2426
<dt>
2527
<PageAnchor id="debugger-initial-stack" />
2628
How do I add an initial stack to a script?
2729
</dt>
28-
<dd>You can push the required stack items at the beginning of a script.</dd>
30+
<dd>
31+
<p>You can push the required stack items at the beginning of a script.</p>
32+
</dd>
2933

3034
<dt>
3135
<PageAnchor id="debugger-bitcoin-core-difference" />
3236
How does the script debugger differ from Bitcoin Core's script interpreter?
3337
</dt>
3438
<dd>
35-
Here is a non-exhaustive list of differences:
39+
<p>Here is a non-exhaustive list of differences:</p>
3640
<ul>
3741
<li>
3842
Because we're executing scripts without knowing the rest of the
@@ -53,6 +57,14 @@
5357
Both OP_CHECKMULTISIG and OP_CHECKSIGADD are implemented and can be used
5458
in the same script, which wouldn't normally be possible.
5559
</li>
60+
<li>
61+
OP_CAT (<a
62+
target="_blank"
63+
rel="noreferrer"
64+
href="https://github.com/bitcoin/bips/blob/master/bip-0347.mediawiki"
65+
>BIP 347</a
66+
>) is implemented, even though it's currently only available on signet.
67+
</li>
5668
<li>
5769
Standardness rules are not enforced, though some are implemented as
5870
warnings.

0 commit comments

Comments
 (0)