Skip to content

feat: pluggable signature schemes — generic chassis, ECDSA scheme, certificate taps - #185

Merged
bagelface merged 4 commits into
bagelface/integrate-aggregation-enginefrom
bagelface/genericize-scheme-chassis
Jul 13, 2026
Merged

bagelface merged 4 commits into
bagelface/integrate-aggregation-enginefrom
bagelface/genericize-scheme-chassis

Conversation

@bagelface

Copy link
Copy Markdown
Contributor

Summary

Stacked on #184. Makes the aggregation actor chassis generic over the certificate scheme and p2p identity, adds an ECDSA (secp256k1) scheme alongside BN254, and exposes the seams an application-side scheme needs to plug in — deliberately without shipping scheme-specific operational machinery in the library.

Informed by gas-killer/service#312 and gas-killer/service#314 (aggregate Schnorr): the library's job is to allow a variety of schemes, not to guarantee every scheme's tooling. Schemes that are pure single-shot certificate::Scheme implementations ship in core as batteries; anything needing infrastructure beside the engine (nonce registries, spend journals, completion rounds) stays in the application, consuming the generic hooks added here.

Changes

  • Chassis genericization: CertReporter<E, S> / CertifiedHeight<S> / NodeReporter<T, S> over S: certificate::Scheme; new CertIndex trait (get_tip/get) decoupling the sequencer from the concrete reporter — Sequencer<T, P, S, R: CertIndex, TS>; identity-generic ingest/TipReports<P>/recipients. Matches the trait shapes the service converged on, so its migration to the library stays mechanical.
  • ECDSA scheme (core::ecdsa): operator's Ethereum key = p2p identity (20-byte address) = signing key; canonical low-s 65-byte signatures enforced at decode; EcdsaCertificate = signer bitmap + per-signer signatures in participant order. EcdsaSubmitter + EcdsaVerificationHandler seam hand (operators[], signatures[]) to the application (e.g. ERC-1271 stake-registry verification). No new bindings needed.
  • Certificate taps: node-side CertificateObservation<S> opt-in channel (NodeReporter::with_certificate_tap), replay-deduplicated, carrying the opaque S::Certificate — the hook an application-side actor (e.g. a Schnorr completion round) consumes; router-side observation was already generic via CertifiedHeight<S>.
  • README: documents the pluggable-scheme architecture and the app-side extension path.

BN254 remains fully supported and is the counter example's scheme — the example needed only type-annotation changes, demonstrating the genericization is behavior-preserving.

Validation

cargo check --workspace --all-targets, 83 tests (workspace, all passing), clippy --workspace --all-targets --all-features -- -D warnings, cargo fmt --check — all clean. New test coverage: full EcdsaScheme suite (quorum boundaries, tampered certificates, codec, ordering), tap delivery/replay-dedupe/dropped-receiver tests on the deterministic runtime.

@bagelface
bagelface changed the base branch from bagelface/integrate-aggregation-engine to main July 10, 2026 16:43
@bagelface
bagelface changed the base branch from main to bagelface/integrate-aggregation-engine July 10, 2026 16:43
@bagelface
bagelface changed the base branch from bagelface/integrate-aggregation-engine to main July 10, 2026 16:44
@bagelface
bagelface force-pushed the bagelface/genericize-scheme-chassis branch from 30d0fdb to ee5a089 Compare July 12, 2026 23:03
@bagelface
bagelface changed the base branch from main to bagelface/integrate-aggregation-engine July 13, 2026 12:03
@bagelface
bagelface merged commit a3d0c59 into bagelface/integrate-aggregation-engine Jul 13, 2026
7 checks passed
@bagelface
bagelface deleted the bagelface/genericize-scheme-chassis branch July 14, 2026 11:30
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