Skip to content

chore: tally decoding updated to only sum up the correct coefficients#951

Merged
ctrlc03 merged 4 commits into
devfrom
chore/tally-decoding
Nov 5, 2025
Merged

chore: tally decoding updated to only sum up the correct coefficients#951
ctrlc03 merged 4 commits into
devfrom
chore/tally-decoding

Conversation

@ctrlc03

@ctrlc03 ctrlc03 commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

Decode plaintext output on CRISP program contract

fix #948

Summary by CodeRabbit

  • New Features

    • Added tally decoding to extract yes/no vote totals from encrypted results.
  • Chores

    • Added a mock enclave and expanded tests to validate tally decoding.
    • Updated package scripts and testing dependencies.
    • Standardized SDK voting constants used for tally calculations.

@ctrlc03 ctrlc03 requested a review from cedoor November 4, 2025 14:53
@ctrlc03 ctrlc03 self-assigned this Nov 4, 2025
@vercel

vercel Bot commented Nov 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
crisp Skipped Skipped Nov 5, 2025 4:32pm
enclave-docs Skipped Skipped Nov 5, 2025 4:32pm

@coderabbitai

coderabbitai Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds on-chain tally decoding: a public decodeTally in CRISPProgram, a test MockEnclave, SDK constant exposure HALF_LARGEST_MINIMUM_DEGREE, updates to vote-decoding logic in the SDK, and corresponding tests and package changes.

Changes

Cohort / File(s) Summary
Smart Contract Modifications
examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol
Added HALF_LARGEST_MINIMUM_DEGREE constant and public decodeTally(uint256) that fetches E3, ABI-decodes plaintextOutput to uint256[], computes start indices, and converts segments into weighted yes/no tallies. Minor require and signature formatting changes.
Mock Contract
examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
New MockEnclave contract with bytes public plaintextOutput, setPlaintextOutput(uint256[] memory) to store encoded plaintext, and getE3(uint256) returning a populated E3 struct exposing plaintextOutput.
Tests
examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
Switched to Mocha/Chai (chai.expect), updated deployment assertions, added "decode tally" tests that deploy MockEnclave, set plaintext tallies, and assert decoded BigInt yes/no results.
Package Config
examples/CRISP/packages/crisp-contracts/package.json
Updated test script to "hardhat test mocha", added dependency "@crisp-e3/sdk": "workspace:*", and devDependency "chai": "^6.2.0".
SDK Constants
examples/CRISP/packages/crisp-sdk/src/constants.ts
Exported HALF_LARGEST_MINIMUM_DEGREE = 28 and changed MAXIMUM_VOTE_VALUE to BigInt(Math.pow(2, HALF_LARGEST_MINIMUM_DEGREE)).
Vote Decoding Logic (SDK)
examples/CRISP/packages/crisp-sdk/src/vote.ts
Refactored decoding to use START_INDEX_Y / START_INDEX_N based on HALF_LARGEST_MINIMUM_DEGREE, slice targeted segments for yes/no, recompute weights, and iterate over those subsets.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant CRISPProgram
    participant Enclave

    Caller->>CRISPProgram: decodeTally(e3Id)
    CRISPProgram->>Enclave: getE3(e3Id)
    Enclave-->>CRISPProgram: E3 { plaintextOutput, ... }

    rect rgb(220,245,220)
    Note over CRISPProgram: Decode & tally extraction
    CRISPProgram->>CRISPProgram: ABI-decode plaintextOutput -> uint256[] tally
    CRISPProgram->>CRISPProgram: compute START_INDEX_Y / START_INDEX_N
    CRISPProgram->>CRISPProgram: extract slices, apply decreasing bit-weights
    CRISPProgram->>CRISPProgram: accumulate yes and no totals
    end

    CRISPProgram-->>Caller: (yes, no)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to bit-weight arithmetic and index calculations in decodeTally.
  • Verify MockEnclave.getE3 populates E3 fields correctly for tests.
  • Confirm SDK HALF_LARGEST_MINIMUM_DEGREE usage matches on-chain value and test expectations.

Possibly related PRs

Suggested reviewers

  • cedoor
  • 0xjei

Poem

🐰✨ I hopped through bytes and counted each peep,
Sliced the plaintext tallies, no secrets to keep,
Half-largest degrees set the start just right,
Weighing bits downwards through day and night,
MockEnclave cheered — tallies now take flight!

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the PR: updating tally decoding logic to sum only the correct coefficients for on-chain governance tally results.
Linked Issues check ✅ Passed The PR successfully implements on-chain tally decoding [#948] by adding decodeTally() function and supporting infrastructure to convert plaintext bytes into yes/no vote values.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the tally decoding objective; package.json and test updates support the core functionality without introducing unrelated modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/tally-decoding

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0dfcf2f and 085eb06.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol (5 hunks)
  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol (1 hunks)
  • examples/CRISP/packages/crisp-contracts/package.json (2 hunks)
  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts (2 hunks)
  • examples/CRISP/packages/crisp-sdk/src/constants.ts (1 hunks)
  • examples/CRISP/packages/crisp-sdk/src/vote.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
  • examples/CRISP/packages/crisp-contracts/package.json
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-11-05T14:12:57.791Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.791Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol
📚 Learning: 2025-09-19T11:16:53.825Z
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 752
File: packages/enclave-contracts/contracts/Enclave.sol:15-17
Timestamp: 2025-09-19T11:16:53.825Z
Learning: The Enclave contract in the gnosisguild/enclave repository has not been deployed yet as of September 2025, so storage layout considerations for upgradeable contracts don't apply to current changes.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
📚 Learning: 2024-10-01T02:51:17.718Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 119
File: packages/evm/contracts/test/MockE3Program.sol:15-17
Timestamp: 2024-10-01T02:51:17.718Z
Learning: In mock contracts used for testing, it's acceptable for functions to lack access control since they do not pose security risks.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
🧬 Code graph analysis (1)
examples/CRISP/packages/crisp-sdk/src/vote.ts (1)
examples/CRISP/packages/crisp-sdk/src/constants.ts (1)
  • HALF_LARGEST_MINIMUM_DEGREE (17-17)
🪛 Biome (2.1.2)
examples/CRISP/packages/crisp-sdk/src/vote.ts

[error] 100-100: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 101-101: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 102-102: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 105-105: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 106-106: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 108-108: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 109-109: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build_sdk
  • GitHub Check: rust_integration
  • GitHub Check: test_contracts
  • GitHub Check: build_enclave_cli
  • GitHub Check: integration_prebuild
  • GitHub Check: test_net
  • GitHub Check: rust_unit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ctrlc03 ctrlc03 linked an issue Nov 4, 2025 that may be closed by this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol (1)

28-145: Preserve the top bit when decoding tallies

MAXIMUM_VOTE_VALUE is 2^28, so a valid tally can legitimately set the 29th bit. By only summing the last 28 coefficients you zero out that MSB, leading to incorrect yes/no totals at the advertised limit. Please widen the window (and the initial weight) so every significant bit survives decoding; otherwise tallies at the limit regress.

Apply this diff:

-    /// @notice Half of the largest minimum degree used to fit votes
-    /// inside the plaintext polynomial
-    uint256 public constant HALF_LARGEST_MINIMUM_DEGREE = 28;
+    /// @notice Half of the largest minimum degree used to fit votes
+    /// inside the plaintext polynomial (supports MAXIMUM_VOTE_VALUE = 2^28)
+    uint256 public constant HALF_LARGEST_MINIMUM_DEGREE = 29;

@@
-        uint256 weight = 2 ** (HALF_LARGEST_MINIMUM_DEGREE - 1);
+        uint256 weight = 1 << (HALF_LARGEST_MINIMUM_DEGREE - 1);
@@
-            weight /= 2; // Right shift equivalent
+            weight >>= 1; // Right shift equivalent
@@
-        weight = 2 ** (HALF_LARGEST_MINIMUM_DEGREE - 1);
+        weight = 1 << (HALF_LARGEST_MINIMUM_DEGREE - 1);
@@
-            weight /= 2;
+            weight >>= 1;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 281b34d and 6bf76a9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol (5 hunks)
  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol (1 hunks)
  • examples/CRISP/packages/crisp-contracts/package.json (3 hunks)
  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts (2 hunks)
  • examples/CRISP/packages/crisp-sdk/package.json (2 hunks)
  • examples/CRISP/packages/crisp-sdk/src/constants.ts (1 hunks)
  • examples/CRISP/packages/crisp-sdk/src/vote.ts (2 hunks)
  • examples/CRISP/packages/crisp-zk-inputs/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2024-10-01T02:51:17.718Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 119
File: packages/evm/contracts/test/MockE3Program.sol:15-17
Timestamp: 2024-10-01T02:51:17.718Z
Learning: In mock contracts used for testing, it's acceptable for functions to lack access control since they do not pose security risks.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
📚 Learning: 2025-09-11T12:56:39.601Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/test/Enclave.spec.ts:804-807
Timestamp: 2025-09-11T12:56:39.601Z
Learning: In Hardhat v3, the chai matchers syntax changed to support multiple network connections: `.to.not.be.revert(ethers)` is the correct new syntax, replacing the old `.to.not.be.reverted` (without parameters). The ethers object must be passed as a parameter to the revert/reverted matchers in Hardhat v3. Similarly, `.revertedWithoutReason(ethers)` replaces `.revertedWithoutReason`.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
📚 Learning: 2025-10-03T08:38:36.786Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 781
File: examples/CRISP/test/governanceCircuit.test.ts:15-50
Timestamp: 2025-10-03T08:38:36.786Z
Learning: Hardhat v3 supports Node.js's native test runner (node:test) including importing describe and it from 'node:test'. Tests using this interface are compatible with Hardhat v3's test task.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
🧬 Code graph analysis (1)
examples/CRISP/packages/crisp-sdk/src/vote.ts (1)
examples/CRISP/packages/crisp-sdk/src/constants.ts (1)
  • HALF_LARGEST_MINIMUM_DEGREE (24-24)
🪛 Biome (2.1.2)
examples/CRISP/packages/crisp-sdk/src/vote.ts

[error] 100-100: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 101-101: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 102-102: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 105-105: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 106-106: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 108-108: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 109-109: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: integration_prebuild
  • GitHub Check: build_sdk
  • GitHub Check: test_net
  • GitHub Check: build_enclave_cli
  • GitHub Check: test_contracts
  • GitHub Check: rust_integration
  • GitHub Check: rust_unit

Comment thread examples/CRISP/packages/crisp-sdk/package.json
Comment thread examples/CRISP/packages/crisp-sdk/src/constants.ts
Comment thread examples/CRISP/packages/crisp-sdk/src/vote.ts Outdated
Comment thread examples/CRISP/packages/crisp-sdk/src/vote.ts
Comment thread examples/CRISP/packages/crisp-sdk/src/constants.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf76a9 and 0dfcf2f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol (5 hunks)
  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol (1 hunks)
  • examples/CRISP/packages/crisp-contracts/package.json (3 hunks)
  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts (2 hunks)
  • examples/CRISP/packages/crisp-sdk/package.json (2 hunks)
  • examples/CRISP/packages/crisp-sdk/src/constants.ts (1 hunks)
  • examples/CRISP/packages/crisp-sdk/src/vote.ts (2 hunks)
  • examples/CRISP/packages/crisp-sdk/tests/vote.test.ts (1 hunks)
  • examples/CRISP/packages/crisp-zk-inputs/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • examples/CRISP/packages/crisp-zk-inputs/package.json
  • examples/CRISP/packages/crisp-sdk/package.json
  • examples/CRISP/packages/crisp-contracts/package.json
  • examples/CRISP/packages/crisp-sdk/src/constants.ts
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/tests/crisp.contracts.test.ts
📚 Learning: 2024-10-01T02:51:17.718Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 119
File: packages/evm/contracts/test/MockE3Program.sol:15-17
Timestamp: 2024-10-01T02:51:17.718Z
Learning: In mock contracts used for testing, it's acceptable for functions to lack access control since they do not pose security risks.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockEnclave.sol
🧬 Code graph analysis (1)
examples/CRISP/packages/crisp-sdk/src/vote.ts (1)
examples/CRISP/packages/crisp-sdk/src/constants.ts (1)
  • HALF_LARGEST_MINIMUM_DEGREE (17-17)
🪛 Biome (2.1.2)
examples/CRISP/packages/crisp-sdk/src/vote.ts

[error] 100-100: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 101-101: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 102-102: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 105-105: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 106-106: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 108-108: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)


[error] 109-109: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: test_contracts
  • GitHub Check: rust_integration
  • GitHub Check: build_enclave_cli
  • GitHub Check: rust_unit
  • GitHub Check: test_net
  • GitHub Check: integration_prebuild
  • GitHub Check: build_sdk

Comment thread examples/CRISP/packages/crisp-sdk/src/vote.ts
@ctrlc03 ctrlc03 force-pushed the chore/tally-decoding branch from bf9f152 to 085eb06 Compare November 5, 2025 16:31
@vercel vercel Bot temporarily deployed to Preview – enclave-docs November 5, 2025 16:32 Inactive
@vercel vercel Bot temporarily deployed to Preview – crisp November 5, 2025 16:32 Inactive

@cedoor cedoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ctrlc03 ctrlc03 merged commit 2bddd29 into dev Nov 5, 2025
23 checks passed
@ctrlc03 ctrlc03 deleted the chore/tally-decoding branch November 5, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRISP Onchain tally decoding

2 participants