Newton uses two-phase consensus to handle data variance when operators independently fetch time-sensitive data (e.g., prices from external APIs). All operators end up signing the same message despite receiving slightly different values.
Prepare phase: Gateway sends newt_fetchPolicyData to operators. Each operator fetches external data independently and returns unsigned responses.
Consensus computation: Gateway computes median values across all operator responses and verifies tolerance (default 10%).
Commit phase: Gateway broadcasts the canonical consensus data via newt_evaluateAndSign. Operators evaluate the policy using identical data and BLS-sign the result.
Aggregation: Gateway collects BLS signatures until quorum is reached and produces the aggregate proof.
Newton uses the alt_bn128 curve (EIP-196/EIP-197) for BLS signature aggregation. This is the curve supported by Ethereum’s pairing precompiled contracts, enabling efficient on-chain verification.
BLS aggregation requires all operators to sign the exact same message. However, each operator generates a unique ECDSA attestation. Newton solves this with two digest types:
Digest Type
Used For
Attestations
Consensus Digest
BLS signing and verification
Excluded (zeroed out)
Full Digest
Contract storage and challenge verification
Included
Operators BLS-sign the consensus digest (which is identical across all operators). The full digest (with unique attestations) is stored on-chain for challenge verification.