BLS Attestation Protocol
Newton Protocol uses two complementary signature schemes: BLS (Boneh-Lynn-Shacham) signatures for aggregatable operator consensus, and ECDSA signatures for individual data attestations. The combination provides both compact multi-party proofs and individually attributable data provenance.BLS Signature Scheme
Newton uses BLS signatures on the BN254 (alt_bn128) elliptic curve, chosen for its compatibility with Ethereum’s precompiled contracts at addresses 0x06 (EIP-196: addition and scalar multiplication) and 0x08 (EIP-197: pairing check). Operators hold BLS private keys and register their corresponding public keys in the BLS APK registry contract. The curve provides two groups: G1 (signatures, 32 bytes compressed) and G2 (public keys, 64 bytes compressed). The bilinear pairing functione: G1 x G2 -> GT enables signature aggregation: given individual signatures sigma_1, ..., sigma_n over the same message, the aggregate signature sigma = sigma_1 + ... + sigma_n can be verified against the aggregate public key apk = pk_1 + ... + pk_n with a single pairing check.
The on-chain verification equation is:
sigma is the aggregated BLS signature (G1 point), G2 is the generator of the G2 group, H(m) is the message hash mapped to G1 (the consensus digest), and apkG2 is the aggregated public key in G2 queried from the BLS APK registry at the task’s reference block.
For multi-quorum verification, a gamma randomization factor prevents rogue public key attacks:
Two-Digest System
BLS signature aggregation requires all operators to sign the exact same message. However, operators independently generate unique ECDSA attestations over the policy data they fetched (each operator signs with their own ECDSA key, producing a different signature). This creates a fundamental conflict: the task response includes attestation fields that differ per operator, so the hash of the full response differs. The Two-Digest System resolves this by computing two distinct digests from the same task response:| Digest Type | Computation | Attestation Fields | Used For |
|---|---|---|---|
| Consensus Digest | Consensus digest hash | Zeroed out (empty bytes) | BLS signing and on-chain BLS verification |
| Full Digest | Full digest hash | Included | Contract storage, challenge verification |
- Clone the task response.
- For each policy data entry, set the attestation field to empty bytes.
- ABI-encode the modified response.
- Compute keccak256 over the encoded bytes.
BLS Aggregation Algorithm
The aggregation process proceeds as follows:- Individual verification. Each operator’s BLS signature is verified against their registered public key before being accepted for aggregation. This prevents rogue key attacks where a malicious operator submits a crafted signature.
-
Quorum check. The aggregator computes the total stake of signing operators and compares it against the per-task quorum threshold percentage (0-100). The quorum check is:
signed_stake >= total_stake * quorum_threshold / 100. The aggregator returns early once quorum is met to minimize latency. - Signature aggregation. Once quorum is reached, the BLS aggregation layer produces the aggregate signature along with non-signer stakes and signature data needed for on-chain verification.