Skip to content

Commit 4691eb7

Browse files
committed
chore(deps): update simplicity C backend to add op_return jets
Bumps the vendored simplicity C library to 85a432c, adds `output_null_get_bytes_{1,2,4,16,32,64}` jets for reading raw OP_RETURN push data, refactors opcode parsing to distinguish `OP_PUSHBYTES_*` variants from `OP_IMMEDIATE`, splits jet decode tables into separate bitcoin/core/elements `.inc` files, and removes the old monolithic `jets_wrapper.c` and `wrapper.c` in favour of the new structure. Also rewrites `vendor-simplicity.sh` to stage changes on a Linux tmpfs before copying back to NTFS.
1 parent b57dba2 commit 4691eb7

15 files changed

Lines changed: 1409 additions & 624 deletions

simplicity-sys/depend/jets_wrapper.c

Lines changed: 0 additions & 477 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file has been automatically generated.
2-
c6ab4dd8f17838506f92f0d829c40618168817cd
2+
85a432c87494ded51219470459629c0d93884be4
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/* This file has been automatically generated. */
2+
3+
{
4+
int32_t code;
5+
code = rustsimplicity_0_6_decodeUptoMaxInt(stream);
6+
if (code < 0) return (simplicity_err)code;
7+
switch (code) {
8+
case 1:
9+
code = rustsimplicity_0_6_decodeUptoMaxInt(stream);
10+
if (code < 0) return (simplicity_err)code;
11+
switch (code) {
12+
case 1: *result = SIG_ALL_HASH; return SIMPLICITY_NO_ERROR;
13+
case 2: *result = TX_HASH; return SIMPLICITY_NO_ERROR;
14+
case 3: *result = TAP_ENV_HASH; return SIMPLICITY_NO_ERROR;
15+
case 4: *result = OUTPUTS_HASH; return SIMPLICITY_NO_ERROR;
16+
case 5: *result = INPUTS_HASH; return SIMPLICITY_NO_ERROR;
17+
case 6: *result = INPUT_UTXOS_HASH; return SIMPLICITY_NO_ERROR;
18+
case 7: *result = OUTPUT_HASH; return SIMPLICITY_NO_ERROR;
19+
case 8: *result = OUTPUT_VALUES_HASH; return SIMPLICITY_NO_ERROR;
20+
case 9: *result = OUTPUT_SCRIPTS_HASH; return SIMPLICITY_NO_ERROR;
21+
case 10: *result = INPUT_HASH; return SIMPLICITY_NO_ERROR;
22+
case 11: *result = INPUT_OUTPOINTS_HASH; return SIMPLICITY_NO_ERROR;
23+
case 12: *result = INPUT_SEQUENCES_HASH; return SIMPLICITY_NO_ERROR;
24+
case 13: *result = INPUT_ANNEXES_HASH; return SIMPLICITY_NO_ERROR;
25+
case 14: *result = INPUT_SCRIPT_SIGS_HASH; return SIMPLICITY_NO_ERROR;
26+
case 15: *result = INPUT_UTXO_HASH; return SIMPLICITY_NO_ERROR;
27+
case 16: *result = INPUT_VALUES_HASH; return SIMPLICITY_NO_ERROR;
28+
case 17: *result = INPUT_SCRIPTS_HASH; return SIMPLICITY_NO_ERROR;
29+
case 18: *result = TAPLEAF_HASH; return SIMPLICITY_NO_ERROR;
30+
case 19: *result = TAPPATH_HASH; return SIMPLICITY_NO_ERROR;
31+
case 20: *result = OUTPOINT_HASH; return SIMPLICITY_NO_ERROR;
32+
case 21: *result = ANNEX_HASH; return SIMPLICITY_NO_ERROR;
33+
case 22: *result = BUILD_TAPLEAF_SIMPLICITY; return SIMPLICITY_NO_ERROR;
34+
case 23: *result = BUILD_TAPBRANCH; return SIMPLICITY_NO_ERROR;
35+
case 24: *result = BUILD_TAPTWEAK; return SIMPLICITY_NO_ERROR;
36+
}
37+
break;
38+
case 2:
39+
code = rustsimplicity_0_6_decodeUptoMaxInt(stream);
40+
if (code < 0) return (simplicity_err)code;
41+
switch (code) {
42+
case 1: *result = CHECK_LOCK_HEIGHT; return SIMPLICITY_NO_ERROR;
43+
case 2: *result = CHECK_LOCK_TIME; return SIMPLICITY_NO_ERROR;
44+
case 3: *result = CHECK_LOCK_DISTANCE; return SIMPLICITY_NO_ERROR;
45+
case 4: *result = CHECK_LOCK_DURATION; return SIMPLICITY_NO_ERROR;
46+
case 5: *result = TX_LOCK_HEIGHT; return SIMPLICITY_NO_ERROR;
47+
case 6: *result = TX_LOCK_TIME; return SIMPLICITY_NO_ERROR;
48+
case 7: *result = TX_LOCK_DISTANCE; return SIMPLICITY_NO_ERROR;
49+
case 8: *result = TX_LOCK_DURATION; return SIMPLICITY_NO_ERROR;
50+
case 9: *result = TX_IS_FINAL; return SIMPLICITY_NO_ERROR;
51+
}
52+
break;
53+
case 3:
54+
code = rustsimplicity_0_6_decodeUptoMaxInt(stream);
55+
if (code < 0) return (simplicity_err)code;
56+
switch (code) {
57+
case 1: *result = SCRIPT_CMR; return SIMPLICITY_NO_ERROR;
58+
case 2: *result = INTERNAL_KEY; return SIMPLICITY_NO_ERROR;
59+
case 3: *result = CURRENT_INDEX; return SIMPLICITY_NO_ERROR;
60+
case 4: *result = NUM_INPUTS; return SIMPLICITY_NO_ERROR;
61+
case 5: *result = NUM_OUTPUTS; return SIMPLICITY_NO_ERROR;
62+
case 6: *result = LOCK_TIME; return SIMPLICITY_NO_ERROR;
63+
case 7: *result = FEE; return SIMPLICITY_NO_ERROR;
64+
case 8: *result = OUTPUT_VALUE; return SIMPLICITY_NO_ERROR;
65+
case 9: *result = OUTPUT_SCRIPT_HASH; return SIMPLICITY_NO_ERROR;
66+
case 10: *result = TOTAL_OUTPUT_VALUE; return SIMPLICITY_NO_ERROR;
67+
case 11: *result = CURRENT_PREV_OUTPOINT; return SIMPLICITY_NO_ERROR;
68+
case 12: *result = CURRENT_VALUE; return SIMPLICITY_NO_ERROR;
69+
case 13: *result = CURRENT_SCRIPT_HASH; return SIMPLICITY_NO_ERROR;
70+
case 14: *result = CURRENT_SEQUENCE; return SIMPLICITY_NO_ERROR;
71+
case 15: *result = CURRENT_ANNEX_HASH; return SIMPLICITY_NO_ERROR;
72+
case 16: *result = CURRENT_SCRIPT_SIG_HASH; return SIMPLICITY_NO_ERROR;
73+
case 17: *result = INPUT_PREV_OUTPOINT; return SIMPLICITY_NO_ERROR;
74+
case 18: *result = INPUT_VALUE; return SIMPLICITY_NO_ERROR;
75+
case 19: *result = INPUT_SCRIPT_HASH; return SIMPLICITY_NO_ERROR;
76+
case 20: *result = INPUT_SEQUENCE; return SIMPLICITY_NO_ERROR;
77+
case 21: *result = INPUT_ANNEX_HASH; return SIMPLICITY_NO_ERROR;
78+
case 22: *result = INPUT_SCRIPT_SIG_HASH; return SIMPLICITY_NO_ERROR;
79+
case 23: *result = TOTAL_INPUT_VALUE; return SIMPLICITY_NO_ERROR;
80+
case 24: *result = TAPLEAF_VERSION; return SIMPLICITY_NO_ERROR;
81+
case 25: *result = TAPPATH; return SIMPLICITY_NO_ERROR;
82+
case 26: *result = VERSION; return SIMPLICITY_NO_ERROR;
83+
case 27: *result = TRANSACTION_ID; return SIMPLICITY_NO_ERROR;
84+
}
85+
break;
86+
}
87+
}

0 commit comments

Comments
 (0)