|
2526 | 2526 | ["0", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME", "CSV fails if stack top bit 1 << 31 is set and the tx version < 2"],
|
2527 | 2527 | ["0x050000000001", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME",
|
2528 | 2528 | "CSV fails if stack top bit 1 << 31 is not set, and tx version < 2"],
|
2529 |
| - |
2530 |
| -["OP_CAT tests"], |
| 2529 | +["OP_CAT (and related) script verify flag tests"], |
2531 | 2530 | [
|
2532 | 2531 | [
|
2533 | 2532 | "#SCRIPT# CAT",
|
|
2538 | 2537 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2539 | 2538 | "P2SH,WITNESS,TAPROOT",
|
2540 | 2539 | "OK",
|
2541 |
| - "TAPSCRIPT (CAT) Test of OP_CAT flag by calling CAT on an empty stack. This does not error because no TAPSCRIPT_OP_CAT flag is set so CAT is OP_SUCCESS" |
| 2540 | + "TAPSCRIPT CAT test of OP_CAT flag by calling CAT on an empty stack. This does not error because no OP_CAT verify flag is set so CAT is OP_SUCCESS" |
| 2541 | +], |
| 2542 | +[ |
| 2543 | + [ |
| 2544 | + "aa", |
| 2545 | + "bb", |
| 2546 | + "#SCRIPT# CAT", |
| 2547 | + "#CONTROLBLOCK#", |
| 2548 | + 0.00000001 |
| 2549 | + ], |
| 2550 | + "", |
| 2551 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2552 | + "P2SH,WITNESS,TAPROOT,DISCOURAGE_OP_CAT,OP_CAT", |
| 2553 | + "DISCOURAGE_OP_CAT", |
| 2554 | + "TAPSCRIPT test of DISCOURAGE_OP_CAT flag by calling CAT on two elements. OP_CAT verify flag is set however OP_CAT is not executed due to DISCOURAGE_OP_CAT." |
| 2555 | +], |
| 2556 | +[ |
| 2557 | + [ |
| 2558 | + "aa", |
| 2559 | + "bb", |
| 2560 | + "#SCRIPT# CAT", |
| 2561 | + "#CONTROLBLOCK#", |
| 2562 | + 0.00000001 |
| 2563 | + ], |
| 2564 | + "", |
| 2565 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2566 | + "P2SH,WITNESS,TAPROOT,DISCOURAGE_OP_CAT", |
| 2567 | + "DISCOURAGE_OP_CAT", |
| 2568 | + "TAPSCRIPT test of DISCOURAGE_OP_CAT flag by calling CAT on two elements. OP_CAT verify flag is not set and OP_CAT is not executed due to DISCOURAGE_OP_CAT." |
| 2569 | +], |
| 2570 | +[ |
| 2571 | + [ |
| 2572 | + "#SCRIPT# CAT", |
| 2573 | + "#CONTROLBLOCK#", |
| 2574 | + 0.00000001 |
| 2575 | + ], |
| 2576 | + "", |
| 2577 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2578 | + "P2SH,WITNESS,TAPROOT,DISCOURAGE_OP_CAT", |
| 2579 | + "DISCOURAGE_OP_CAT", |
| 2580 | + "TAPSCRIPT test of DISCOURAGE_OP_CAT flag by calling CAT on a empty stack. Ordinarily this would be INVALID_STACK_OPERATION however due to DISCOURAGE_OP_CAT the script will throw before execution." |
| 2581 | +], |
| 2582 | +[ |
| 2583 | + [ |
| 2584 | + "#SCRIPT# 1", |
| 2585 | + "#CONTROLBLOCK#", |
| 2586 | + 0.00000001 |
| 2587 | + ], |
| 2588 | + "", |
| 2589 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2590 | + "P2SH,WITNESS,TAPROOT,DISCOURAGE_OP_CAT", |
| 2591 | + "OK", |
| 2592 | + "TAPSCRIPT test of a valid script executed with DISCOURAGE_OP_CAT. This tests demonstrates that DISCOURAGE_OP_CAT has no affect when CAT is not used." |
| 2593 | +], |
| 2594 | +[ |
| 2595 | + [ |
| 2596 | + "#SCRIPT# CAT", |
| 2597 | + "#CONTROLBLOCK#", |
| 2598 | + 0.00000001 |
| 2599 | + ], |
| 2600 | + "", |
| 2601 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2602 | + "P2SH,WITNESS,TAPROOT,DISCOURAGE_OP_CAT,DISCOURAGE_OP_SUCCESS", |
| 2603 | + "DISCOURAGE_OP_CAT", |
| 2604 | + "TAPSCRIPT test of a invalid script (CAT called with empty stack) executed with DISCOURAGE_OP_CAT and DISCOURAGE_OP_SUCCESS flags enabled. This tests demonstrates that DISCOURAGE_OP_CAT will take priority over the OP_SUCCESS discourage flag and OP_CAT is never exectuted" |
| 2605 | +], |
| 2606 | +[ |
| 2607 | + [ |
| 2608 | + "#SCRIPT# CAT", |
| 2609 | + "#CONTROLBLOCK#", |
| 2610 | + 0.00000001 |
| 2611 | + ], |
| 2612 | + "", |
| 2613 | + "0x51 0x20 #TAPROOTOUTPUT#", |
| 2614 | + "P2SH,WITNESS,TAPROOT,OP_CAT,DISCOURAGE_OP_SUCCESS", |
| 2615 | + "INVALID_STACK_OPERATION", |
| 2616 | + "TAPSCRIPT CAT on no stack elements with DISCOURAGE_OP_SUCCESS and OP_CAT script verify flags enabled. This test demonstrates that OP_CAT is no longer considered OP_SUCCESS when OP_CAT verify flag is set" |
2542 | 2617 | ],
|
| 2618 | +["OP_CAT functionality tests"], |
2543 | 2619 | [
|
2544 | 2620 | [
|
2545 | 2621 | "#SCRIPT# CAT",
|
|
2550 | 2626 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2551 | 2627 | "P2SH,WITNESS,TAPROOT,OP_CAT",
|
2552 | 2628 | "INVALID_STACK_OPERATION",
|
2553 |
| - "TAPSCRIPT Test of OP_CAT flag by calling CAT on an empty stack. This throws an error because TAPSCRIPT_OP_CAT flag is set so CAT is executed" |
| 2629 | + "TAPSCRIPT Test of OP_CAT flag by calling CAT on an empty stack. This throws an error because OP_CAT verify flag is set so CAT is executed" |
2554 | 2630 | ],
|
2555 | 2631 | [
|
2556 | 2632 | [
|
|
2564 | 2640 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2565 | 2641 | "P2SH,WITNESS,TAPROOT,OP_CAT",
|
2566 | 2642 | "OK",
|
2567 |
| - "TAPSCRIPT Test of OP_CAT flag by calling CAT on two elements. TAPSCRIPT_OP_CAT flag is set so CAT is executed." |
| 2643 | + "TAPSCRIPT Test of OP_CAT flag by calling CAT on two elements. OP_CAT verify flag is set so CAT is executed." |
2568 | 2644 | ],
|
2569 | 2645 | [
|
2570 | 2646 | [
|
|
2594 | 2670 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2595 | 2671 | "P2SH,WITNESS,TAPROOT",
|
2596 | 2672 | "OK",
|
2597 |
| - "TAPSCRIPT Test of OP_CAT flag, CATs 78a11a1260 and c1101260 together and checks it is EQUAL to stack element 78a11a1260c1101260. No TAPSCRIPT_OP_CAT set so CAT should be OP_SUCCESS." |
| 2673 | + "TAPSCRIPT Test of OP_CAT flag, CATs 78a11a1260 and c1101260 together and checks it is EQUAL to stack element 78a11a1260c1101260. No OP_CAT verify flag set so CAT should be OP_SUCCESS." |
2598 | 2674 | ],
|
2599 | 2675 | [
|
2600 | 2676 | [
|
|
2740 | 2816 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2741 | 2817 | "P2SH,WITNESS,TAPROOT,OP_CAT",
|
2742 | 2818 | "OK",
|
2743 |
| - "TAPSCRIPT Runs DUP CAT seven times on 1a1a" |
| 2819 | + "TAPSCRIPT Runs DUP CAT seven times on 1a1a" |
2744 | 2820 | ],
|
2745 | 2821 | [
|
2746 | 2822 | [
|
|
2820 | 2896 | "0x51 0x20 #TAPROOTOUTPUT#",
|
2821 | 2897 | "P2SH,WITNESS,TAPROOT,OP_CAT",
|
2822 | 2898 | "OK",
|
2823 |
| - "TAPSCRIPT ([512 byte element, 09ca7009ca7009ca7009ca7009ca70], CAT) Tests edge case where concatenated value is exactly max stack element size (520 bytes)" |
| 2899 | + "TAPSCRIPT ([512 byte element, 09ca7009ca7009ca7009ca7009ca70], CAT) Tests edge case where concatenated value is exactly max stack element size (520 bytes)" |
2824 | 2900 | ],
|
2825 | 2901 | [
|
2826 | 2902 | [
|
|
0 commit comments