Skip to content

feat: crash-tolerant dkg [skip-line-limit] - #1939

Merged
hmzakhalid merged 75 commits into
mainfrom
feat/dkg-omission-recovery
Sep 16, 2026
Merged

hmzakhalid merged 75 commits into
mainfrom
feat/dkg-omission-recovery

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Scope

  • Recover DKG documents and proof work after a restart.
  • Let the elected DKG aggregator collect readiness reports and announce one canonical H-member roster when early DKG members are absent. Reuse the existing aggregator failover path instead of adding a second leader system.
  • Verify the selected roster in the recursive proof. Index selected proof rows by original party ID, retain the required N-wide C3 witness slots when a C0 recipient is absent, and build valid C4 witnesses for nodes outside the selected roster.
  • Persist commitment checks, C4 collection, and node-fold state so a restart resumes from durable inputs.
  • Change Small to N=19, H=14, T=9 and rebuild all affected circuits and verifiers.
  • Give CRISP proposals fixed voting start and end dates, followed by a separate Avail finalization window.
  • Fix the Faucet token binding, deterministic bonded-voter census, late replay handling, large work-plan persistence, and process, RPC, and peer-liveness defects found during the Sepolia rehearsals.

Verification

  • All checks pass at e96c8cd4c, including Rust unit and integration tests, contract tests, the full six-pair circuit release matrix, zk-prover tests, SDK tests, and CRISP end-to-end tests.
  • A previous Sepolia Small N=19/H=10 round completed end to end: DKG published the key, Avail finalized the ballot, Boundless fulfilled the computation, the committee decrypted the result, and CRISP reported Finished with tally 1-0.
  • A fresh Sepolia Small N=19/H=14 round is running on 21 dedicated hosts with the exact candidate binary and circuit archive. The selected 19 formed a complete transport and GossipSub mesh, received all 19 C0 keys, and entered proof generation with zero process restarts.
  • A local insecure Small omission run disconnected party 0 after C0. The remaining nodes selected a non-prefix roster, published one key, and recovered the expected plaintext with real C0-C7 leaf proofs.
  • A clean local Minimum run restarted a selected member during C4 with the production aggregator timeout. It published the key and recovered the expected tallies 15, 14, and 9.
  • All Minimum, Micro, and Small circuit pairs for insecure-512 and secure-8192 were rebuilt. Both generated verifier types match each pair.

Hygiene

  • The committed diff contains no workstation paths, server addresses, credentials, branch or PR references, debug markers, rehearsal logs, or one-off deployment helpers.
  • Fault controls remain in the integration harness. Production binaries reject proof skipping. Synthetic DKG timing is available only with the test-helper feature.
  • Fixed values are named protocol or safety bounds. Generated verifier constants and deployment addresses remain in their canonical generated or configuration files.
  • CI paths are repository-local or runner-local scratch paths and do not depend on a developer machine.
  • The title keeps the repository [skip-line-limit] marker because this is the requested consolidated change.

Launch constraints

Small is now N=19, H=14, T=9. DKG can omit up to five members before the roster is accepted, and threshold decryption can lose up to four of the 14 key holders after key generation. The launch flow does not replace an accepted roster member who disappears permanently before sending C4; it relies on the implemented crash-and-restart recovery for that stage.

This is the trusted-operator launch design, not a Byzantine-safe asynchronous DKG agreement protocol. Protocol v4 is intentionally not backward compatible with persisted v3 state; test nodes must clear protocol-scoped state before starting this binary.

Coordinated companion PRs

Deploy a new CRISPProgram first. Then deploy the plugin and DAO, followed by the app. Promote all six circuit pairs to circuit-artifacts immediately before or with the merge.

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
crisp Ready Ready Preview Sep 16, 2026 7:13pm UTC
interfold-dashboard Ready Ready Preview Sep 16, 2026 7:13pm UTC
interfold-docs Ready Ready Preview Sep 16, 2026 7:13pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 220 files, which is 120 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 097e63ea-ee45-4b7e-a4ee-0834c4d0de24

📥 Commits

Reviewing files that changed from the base of the PR and between d4e1054 and 0881dc9.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (220)
  • .github/workflows/ci.yml
  • agent/ARCHITECTURE.md
  • agent/CONTEXT.md
  • agent/CRATES_ARCHITECTURE.md
  • agent/INVARIANTS.md
  • agent/flow-trace/00_INDEX.md
  • agent/flow-trace/03_E3_REQUEST_AND_COMMITTEE.md
  • agent/flow-trace/04_DKG_AND_COMPUTATION.md
  • agent/flow-trace/06_DEACTIVATION_AND_COMPLETION.md
  • agent/flow-trace/07_UPGRADES.md
  • agent/flow-trace/08_DATA_AVAILABILITY.md
  • circuits/benchmarks/README.md
  • circuits/bin/recursive_aggregation/dkg_aggregator/src/main.nr
  • circuits/lib/src/configs/committee/small/mod.nr
  • circuits/lib/src/configs/secure/threshold.nr
  • crates/aggregator/src/plaintext_aggregation/effects/verify_decryption_shares.rs
  • crates/aggregator/src/plaintext_aggregation/tests/mod.rs
  • crates/aggregator/src/public_key_aggregation/actor.rs
  • crates/aggregator/src/public_key_aggregation/effects/aggregate_dkg_proofs.rs
  • crates/aggregator/src/public_key_aggregation/effects/aggregate_public_key.rs
  • crates/aggregator/src/public_key_aggregation/effects/mod.rs
  • crates/aggregator/src/public_key_aggregation/effects/publish_result.rs
  • crates/aggregator/src/public_key_aggregation/effects/recovery.rs
  • crates/aggregator/src/public_key_aggregation/effects/verify_key_proofs.rs
  • crates/aggregator/src/public_key_aggregation/handlers.rs
  • crates/aggregator/src/public_key_aggregation/state.rs
  • crates/aggregator/src/public_key_aggregation/tests/attestations.rs
  • crates/aggregator/src/public_key_aggregation/tests/mod.rs
  • crates/aggregator/src/public_key_aggregation/transitions.rs
  • crates/aggregator/src/public_key_aggregation/workflow_tests.rs
  • crates/ciphernode-builder/src/ciphernode.rs
  • crates/ciphernode-builder/src/ciphernode_builder.rs
  • crates/ciphernode-builder/src/event_system.rs
  • crates/cli/src/start.rs
  • crates/config/protocol-release.toml
  • crates/dashboard/src/projection.rs
  • crates/data/Cargo.toml
  • crates/data/src/commit_log_event_log.rs
  • crates/data/src/event_blob.rs
  • crates/data/src/lib.rs
  • crates/entrypoint/src/nodes/client.rs
  • crates/entrypoint/src/nodes/nodes.rs
  • crates/entrypoint/src/nodes/process_manager.rs
  • crates/entrypoint/src/validate.rs
  • crates/events/src/eventbus.rs
  • crates/events/src/events.rs
  • crates/events/src/eventstore.rs
  • crates/events/src/eventstore_router.rs
  • crates/events/src/interfold_event/aggregation_inputs_ready.rs
  • crates/events/src/interfold_event/aggregator_changed.rs
  • crates/events/src/interfold_event/commitment_roster_selected.rs
  • crates/events/src/interfold_event/compute_request/zk.rs
  • crates/events/src/interfold_event/dkg_coordination.rs
  • crates/events/src/interfold_event/mod.rs
  • crates/events/src/interfold_event/publish_document/mod.rs
  • crates/events/src/interfold_event/signed_proof.rs
  • crates/events/src/interfold_event/threshold_share_pending.rs
  • crates/events/src/store_keys.rs
  • crates/events/src/traits.rs
  • crates/evm/src/chain_gateway/actor.rs
  • crates/evm/src/chain_gateway/tests.rs
  • crates/evm/src/dkg_timing.rs
  • crates/evm/src/interfold_writing/effects.rs
  • crates/evm/src/interfold_writing/handlers.rs
  • crates/evm/src/lib.rs
  • crates/evm/src/randomness_provider/actor.rs
  • crates/keyshare/src/actors.rs
  • crates/keyshare/src/domain.rs
  • crates/keyshare/src/ext.rs
  • crates/keyshare/src/lib.rs
  • crates/keyshare/src/repo.rs
  • crates/keyshare/src/threshold_keyshare/actor.rs
  • crates/keyshare/src/threshold_keyshare/collect_encryption_keys.rs
  • crates/keyshare/src/threshold_keyshare/collect_threshold_shares.rs
  • crates/keyshare/src/threshold_keyshare/derive_decryption_key.rs
  • crates/keyshare/src/threshold_keyshare/effects/calculate_decryption_key.rs
  • crates/keyshare/src/threshold_keyshare/effects/coordinate_collectors.rs
  • crates/keyshare/src/threshold_keyshare/effects/coordinate_roster.rs
  • crates/keyshare/src/threshold_keyshare/effects/create_decryption_share.rs
  • crates/keyshare/src/threshold_keyshare/effects/generate_threshold_share.rs
  • crates/keyshare/src/threshold_keyshare/effects/initialize_dkg.rs
  • crates/keyshare/src/threshold_keyshare/effects/mod.rs
  • crates/keyshare/src/threshold_keyshare/effects/recovery.rs
  • crates/keyshare/src/threshold_keyshare/effects/route_events.rs
  • crates/keyshare/src/threshold_keyshare/effects/track_proofs.rs
  • crates/keyshare/src/threshold_keyshare/effects/verify_threshold_shares.rs
  • crates/keyshare/src/threshold_keyshare/encryption_key_collector.rs
  • crates/keyshare/src/threshold_keyshare/generate_shares.rs
  • crates/keyshare/src/threshold_keyshare/handlers.rs
  • crates/keyshare/src/threshold_keyshare/recovery_payloads.rs
  • crates/keyshare/src/threshold_keyshare/recovery_state.rs
  • crates/keyshare/src/threshold_keyshare/roster.rs
  • crates/keyshare/src/threshold_keyshare/state.rs
  • crates/keyshare/src/threshold_keyshare/state_tests.rs
  • crates/keyshare/src/threshold_keyshare/tests.rs
  • crates/keyshare/src/threshold_keyshare/threshold_share_collector.rs
  • crates/keyshare/src/threshold_keyshare/timeout_policy.rs
  • crates/multithread/src/effect_gate.rs
  • crates/multithread/src/multithread.rs
  • crates/multithread/src/pool.rs
  • crates/net/src/actors.rs
  • crates/net/src/bin/p2p_test.rs
  • crates/net/src/dialer.rs
  • crates/net/src/document_publishing/actor.rs
  • crates/net/src/document_publishing/effects.rs
  • crates/net/src/document_publishing/handlers.rs
  • crates/net/src/document_publishing/recovery.rs
  • crates/net/src/document_publishing/tests/notifications.rs
  • crates/net/src/document_publishing/tests/publishing.rs
  • crates/net/src/event_translation/actor.rs
  • crates/net/src/event_translation/workflow.rs
  • crates/net/src/events.rs
  • crates/net/src/lib.rs
  • crates/net/src/net_interface.rs
  • crates/net/src/network.rs
  • crates/net/src/network_status.rs
  • crates/net/src/network_sync/actor.rs
  • crates/net/src/network_sync/effects/readiness.rs
  • crates/net/src/network_sync/effects/rebroadcast.rs
  • crates/net/src/network_sync/handlers.rs
  • crates/net/src/network_sync/tests.rs
  • crates/net/src/network_sync/wire.rs
  • crates/net/src/peer_admission.rs
  • crates/net/tests/configured_peer_reconnect.rs
  • crates/net/tests/peer_id_mismatch.rs
  • crates/slashing/Cargo.toml
  • crates/slashing/src/accusation_manager_ext.rs
  • crates/slashing/src/commitment_consistency/actor.rs
  • crates/slashing/src/commitment_consistency/workflow.rs
  • crates/slashing/src/commitment_consistency/workflow_tests.rs
  • crates/slashing/src/commitment_consistency_checker_ext.rs
  • crates/slashing/src/lib.rs
  • crates/slashing/src/repo.rs
  • crates/sortition/Readme.md
  • crates/sortition/src/ciphernode_selection/actor.rs
  • crates/sortition/src/ciphernode_selection/handlers.rs
  • crates/sortition/src/failover.rs
  • crates/sortition/src/sortition/actor.rs
  • crates/sortition/src/sortition/handlers/committee.rs
  • crates/sortition/src/sortition/handlers/envelope.rs
  • crates/sortition/src/sortition/handlers/lifecycle.rs
  • crates/sortition/src/sortition/handlers/request.rs
  • crates/sortition/src/sortition/node_registry.rs
  • crates/sortition/src/sortition/node_registry_tests.rs
  • crates/sortition/src/sortition/selection_backend.rs
  • crates/support-scripts/ctl/container
  • crates/support-scripts/tests/container.sh
  • crates/support/README.md
  • crates/support/host/src/lib.rs
  • crates/sync/src/replay_spool.rs
  • crates/sync/src/sync/schema_version.rs
  • crates/test-helpers/src/ciphernode_system.rs
  • crates/test-helpers/src/lib.rs
  • crates/test-helpers/src/libp2p_mock.rs
  • crates/tests/tests/integration.rs
  • crates/tests/tests/large_work_plan_recovery.rs
  • crates/zk-helpers/src/ciphernodes_committee.rs
  • crates/zk-helpers/src/circuits/dkg/share_decryption/computation.rs
  • crates/zk-helpers/src/circuits/threshold/pk_generation/sample.rs
  • crates/zk-prover/build.rs
  • crates/zk-prover/src/actor_system.rs
  • crates/zk-prover/src/circuits/aggregation/node_dkg_fold.rs
  • crates/zk-prover/src/commitment_links/c2_to_c4/mod.rs
  • crates/zk-prover/src/node_proof_aggregation/actor.rs
  • crates/zk-prover/src/node_proof_aggregation/effects.rs
  • crates/zk-prover/src/node_proof_aggregation/handlers.rs
  • crates/zk-prover/src/node_proof_aggregation/recovery.rs
  • crates/zk-prover/src/node_proof_aggregation/workflow.rs
  • crates/zk-prover/src/proof_request/actor_tests.rs
  • crates/zk-prover/src/proof_request/effects/dkg_proofs.rs
  • crates/zk-prover/src/proof_request/effects/publish_threshold_shares.rs
  • crates/zk-prover/src/proof_request/workflow_tests.rs
  • crates/zk-prover/tests/integration_tests.rs
  • dappnode/docker-compose.yml
  • dappnode/tests/test-hardening.sh
  • deploy/docker-compose.yml
  • examples/CRISP/crates/evm_helpers/src/lib.rs
  • examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol
  • examples/CRISP/packages/crisp-contracts/contracts/Mocks/MockInterfold.sol
  • examples/CRISP/packages/crisp-contracts/deployed_contracts.json
  • examples/CRISP/packages/crisp-contracts/hardhat.config.ts
  • examples/CRISP/packages/crisp-contracts/tests/input-availability-flow.test.ts
  • examples/CRISP/server/.env.example
  • examples/CRISP/server/src/cli/commands.rs
  • examples/CRISP/server/src/config.rs
  • examples/CRISP/server/src/cron/main.rs
  • examples/CRISP/server/src/server/data_availability.rs
  • examples/CRISP/server/src/server/indexer.rs
  • examples/CRISP/server/src/server/routes/rounds.rs
  • examples/CRISP/server/src/server/token_holders/etherscan.rs
  • packages/interfold-contracts/contracts/lib/ActiveCryptoConfig.sol
  • packages/interfold-contracts/contracts/test/Faucet.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/insecure-512/micro/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/insecure-512/small/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/secure-8192/micro/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/secure-8192/minimum/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/contracts/verifiers/bfv/honk/secure-8192/small/DkgAggregatorVerifier.sol
  • packages/interfold-contracts/deploy/protocol/example.protocol.config.json
  • packages/interfold-contracts/deploy/protocol/mainnet-protocol.config.json
  • packages/interfold-contracts/scripts/deployAndSave/verifiers.ts
  • packages/interfold-contracts/scripts/deployFaucet.ts
  • packages/interfold-contracts/scripts/deployInterfold.ts
  • packages/interfold-contracts/scripts/protocol/prepareRehearsal.ts
  • packages/interfold-contracts/scripts/utils.ts
  • packages/interfold-contracts/test/BfvVkBindingIntegration.spec.ts
  • packages/interfold-contracts/test/Deployment/VerifierArtifactSelection.spec.ts
  • packages/interfold-contracts/test/Faucet.spec.ts
  • packages/interfold-contracts/test/Interfold.spec.ts
  • packages/interfold-contracts/test/Pricing/Pricing.spec.ts
  • packages/interfold-contracts/test/fixtures/bfv_vk_binding/folded_artifacts.json
  • packages/interfold-contracts/test/fixtures/constants.ts
  • scripts/README.md
  • scripts/build-circuits.ts
  • scripts/check-invariants.sh
  • scripts/circuit-artifacts.test.ts
  • scripts/circuit-constants.ts
  • scripts/test-circuits.sh
  • tests/integration/base.sh
  • tests/integration/lib/prebuild.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@hmzakhalid hmzakhalid changed the title Crash-tolerant DKG rosters feat: DKG roster [skip-line-limit] Sep 14, 2026
@hmzakhalid hmzakhalid changed the title feat: DKG roster [skip-line-limit] feat: crash-tolerant dkg [skip-line-limit] Sep 14, 2026
hmzakhalid and others added 30 commits September 15, 2026 16:56
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.

1 participant