From c331076719a7854424c6a1c85711315875792c60 Mon Sep 17 00:00:00 2001 From: thomaslavaur Date: Thu, 14 Aug 2025 13:43:30 +0200 Subject: [PATCH] fix forgotten check that selector is indeed a bit --- circom_circuits/Mantle/proof_of_claim.circom | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/circom_circuits/Mantle/proof_of_claim.circom b/circom_circuits/Mantle/proof_of_claim.circom index 050bdfc..1fe7ea8 100644 --- a/circom_circuits/Mantle/proof_of_claim.circom +++ b/circom_circuits/Mantle/proof_of_claim.circom @@ -42,7 +42,12 @@ template proof_of_claim(){ component reward_voucher = derive_reward_voucher(); reward_voucher.secret_voucher <== secret_voucher; - //verify reward voucher membership + //Check reward voucher membership + //First check selectors are indeed bits + for(var i = 0; i < 32; i++){ + selectors[i] * (1 - selectors[i]) === 0; + } + //Then check the proof of membership component reward_membership = proof_of_membership(32); for(var i = 0; i < 32; i++){ reward_membership.nodes[i] <== merkle_nodes[i];