Skip to content

feat: support multiple signers per oracle instance - #46

Open
Maikol wants to merge 2 commits into
mainfrom
feat/multiple-signers
Open

Maikol wants to merge 2 commits into
mainfrom
feat/multiple-signers

Conversation

@Maikol

@Maikol Maikol commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Allows a single oracle instance to vote on the SubgraphAvailabilityManager with multiple signers, each registered at its own oracle index.

  • ORACLE_SIGNING_KEY / --signing-key and ORACLE_INDEX / --oracle-index accept comma separated lists, paired by position. Spaces around commas are ignored. Existing single key / single index configs work unchanged.
  • Each signer posts its own config to DataEdge (the monitoring subgraph only accepts a config from the address registered for its index).
  • New MultiStateManager submits the same votes through every signer, concurrently.
  • Configuration errors fail at startup, before any transaction is sent: mismatched key/index counts, duplicate keys or indexes, invalid keys (errors report the position, never the key). --dry-run validates them when keys are given. RewardsManager mode rejects more than one signing key.
  • Runtime failures of a single signer (DataEdge post, reverted vote, RPC, insufficient funds) are logged with its oracle_index and don't stop the other signers. A run fails only if every signer fails. A vote that didn't land is retried on the next run anyway, since each run compares deployments against their on-chain deny status.
  • Per-signer metrics: signer_votes_total{oracle_index} and signer_vote_failures_total{oracle_index}. denied_subgraphs_total counts each change once, regardless of the number of signers.
  • Bumps the version to 1.6.0. Since the version is part of the posted config, every signer posts a new config to DataEdge on its first 1.6.0 startup.
ORACLE_SIGNING_KEY=<key-a>,<key-b>
ORACLE_INDEX=<index-a>,<index-b>

Testing

  • Unit tests for signer parsing (single signer, pairing, mismatched counts, duplicates, no key leak in errors), RewardsManager rejecting multiple keys, and MultiStateManager (all signers called, partial failure is ok, all signers failing reports every cause, signers vote concurrently).
  • Arbitrum Sepolia with indexes 0,3:
    • Unfunded index 3: index 0 config unchanged, index 3 DataEdge post failed with insufficient funds. This ran on an earlier revision where a posting failure aborted startup; it's now logged and the other signers continue.
    • Funded: index 3 posted its first config (tx 0x69eb1769dc8f71bf0a0f0b5b829d0ef06a70f721625af1c881ca667c4cf4d00e), both indexes voted on two deployments with unavailable files, and together with index 2 reached the execution threshold, flipping isDenied on the RewardsManager. Ran 55 passes with no errors.

🤖 Generated with Claude Code

Maikol added 2 commits October 6, 2026 10:12
ORACLE_SIGNING_KEY and ORACLE_INDEX now accept comma separated lists,
paired by position, so a single instance can vote on the
SubgraphAvailabilityManager with several registered oracle addresses.
A single key and index behave as before.

- Static config errors (unparsable keys or indexes, count mismatch,
  duplicates, invalid contract mode) fail at startup before any
  transaction
- Each signer posts its own config to DataEdge; a failing signer is
  logged and doesn't stop the others
- Signers vote concurrently; a run fails only if every signer fails
- A voteMany revert during gas estimation is reported as an error
  instead of being counted as success
- Signers share one RPC provider and their logs carry oracle_index
- New signer_votes_total and signer_vote_failures_total metrics labeled
  by oracle_index; denied_subgraphs_total still counts each change once
- RewardsManager mode rejects more than one signing key
@Maikol
Maikol force-pushed the feat/multiple-signers branch from 3d74ec4 to 15cb7a6 Compare October 6, 2026 13:12
@Maikol
Maikol requested review from MoonBoi9001 and tmigone and a balanced review from Copilot October 12, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

DataEdge failures do not abort startup, and partial signer failures are not propagated as described.

2 open findings
What changed in this PR

Adds multi-signer voting support for SubgraphAvailabilityManager instances.

Changes:

  • Parses and validates paired signer keys and oracle indexes.
  • Adds concurrent multi-signer voting with per-signer metrics.
  • Posts signer-specific DataEdge configurations and bumps the version.
File Description
README.md Documents multi-signer configuration and behavior.
crates/​common/​src/​prelude.rs Exports structured logging support.
Cargo.lock Records version 1.6.0.
availability-oracle/​src/​main.rs Configures signers and DataEdge startup posting.
availability-oracle/​src/​data_edge.rs Reuses shared providers for signer-specific posts.
availability-oracle/​src/​contract.rs Implements concurrent multi-signer voting and metrics.
availability-oracle/​Cargo.toml Bumps the package version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread availability-oracle/src/contract.rs
Comment thread availability-oracle/src/main.rs

This branch has not been deployed

No deployments
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.

2 participants