From d9a6aa5abcdc6833fc386139a880602a1ee00e5d Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 2 Jul 2026 16:55:29 +0200 Subject: [PATCH 1/3] wip --- src/simplicity/dag.c | 9 +++++++-- src/simplicity/eval.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/simplicity/dag.c b/src/simplicity/dag.c index d09cd2740cb..62688a2a41b 100644 --- a/src/simplicity/dag.c +++ b/src/simplicity/dag.c @@ -116,6 +116,7 @@ sha256_midstate simplicity_computeWordCMR(const bitstring* value, size_t n) { case 0: i = getBit(value, 0); break; case 1: i = 2 + ((1U * getBit(value, 0) << 1) | getBit(value, 1)); break; case 2: i = 6 + ((1U * getBit(value, 0) << 3) | (1U * getBit(value, 1) << 2) | (1U * getBit(value, 2) << 1) | getBit(value, 3)); break; + default: SIMPLICITY_UNREACHABLE; } memcpy(stack_ptr, &word_cmr[i], sizeof(uint32_t[8])); } else { @@ -174,7 +175,7 @@ void simplicity_computeCommitmentMerkleRoot(dag_node* dag, const uint_fast32_t i case PAIR: memcpy(block + j, dag[dag[i].child[1]].cmr.s, sizeof(uint32_t[8])); j = 0; - /*@fallthrough@*/ + __attribute__((fallthrough)); case DISCONNECT: /* Only the first child is used in the CMR. */ case INJL: case INJR: @@ -182,6 +183,7 @@ void simplicity_computeCommitmentMerkleRoot(dag_node* dag, const uint_fast32_t i case DROP: memcpy(block + j, dag[dag[i].child[0]].cmr.s, sizeof(uint32_t[8])); simplicity_sha256_compression(dag[i].cmr.s, block); + __attribute__((fallthrough)); case IDEN: case UNIT: case WITNESS: @@ -224,13 +226,14 @@ static void computeIdentityHashRoots(sha256_midstate* ihr, const dag_node* dag, case DISCONNECT: memcpy(block + j, ihr[dag[i].child[1]].s, sizeof(uint32_t[8])); j = 0; - /*@fallthrough@*/ + __attribute__((fallthrough)); case INJL: case INJR: case TAKE: case DROP: memcpy(block + j, ihr[dag[i].child[0]].s, sizeof(uint32_t[8])); simplicity_sha256_compression(ihr[i].s, block); + __attribute__((fallthrough)); case IDEN: case UNIT: case HIDDEN: @@ -420,6 +423,7 @@ simplicity_err simplicity_verifyCanonicalOrder(dag_node* dag, const uint_fast32_ continue; } if (bottom == child) bottom++; + __attribute__((fallthrough)); case IDEN: case UNIT: case WITNESS: @@ -444,6 +448,7 @@ simplicity_err simplicity_verifyCanonicalOrder(dag_node* dag, const uint_fast32_ continue; } if (bottom == child) bottom++; + __attribute__((fallthrough)); case INJL: case INJR: case TAKE: diff --git a/src/simplicity/eval.c b/src/simplicity/eval.c index 6c9e9dc05e8..5b6aba494c2 100644 --- a/src/simplicity/eval.c +++ b/src/simplicity/eval.c @@ -462,7 +462,7 @@ static simplicity_err runTCO(evalState state, call* stack, const dag_node* dag, skip(state.activeWriteFrame, pad( INJR == dag[pc].tag , type_dag[INJ_B(dag, type_dag, pc)].bitSize , type_dag[INJ_C(dag, type_dag, pc)].bitSize)); - /*@fallthrough@*/ + __attribute__((fallthrough)); case TAKE: simplicity_debug_assert(calling); /* TAIL_CALL(dag[pc].child[0], SAME_TCO); */ @@ -496,7 +496,7 @@ static simplicity_err runTCO(evalState state, call* stack, const dag_node* dag, } else { writeValue(state.activeWriteFrame, &dag[pc].compactValue, dag[pc].targetType, type_dag); } - /*@fallthrough@*/ + __attribute__((fallthrough)); case UNIT: simplicity_debug_assert(calling); if (get_tco_flag(&stack[pc])) { From 5b9f3b7db395bb90e16e2b03cb264d33a98a3379 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 2 Jul 2026 17:09:01 +0200 Subject: [PATCH 2/3] temp: removeme --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88835964eb7..507ed56ec9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: test-each-commit: name: 'test each commit' runs-on: ubuntu-24.04 - if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1 + if: github.event_name == 'pull_request' # && github.event.pull_request.commits != 1 timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below. env: MAX_COUNT: 6 From 0b02b902abd813612f9cde1f2eb76c961b0b23b6 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Fri, 3 Jul 2026 08:31:39 +0200 Subject: [PATCH 3/3] test: fix interface_zmq.py --- test/functional/test_framework/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 5d037620e0b..d4591b0a279 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -980,7 +980,7 @@ def calc_witness_hash(self): def is_valid(self): self.calc_sha256() for tout in self.vout: - if tout.nValue < 0 or tout.nValue > 21000000 * COIN: + if tout.nValue.getAmount() < 0 or tout.nValue.getAmount() > 21000000 * COIN: # ELEMENTS return False return True