-
Notifications
You must be signed in to change notification settings - Fork 6
fix: SignatureAggregatorRequest sends signingSubnetId instead of signingSubnet — breaks L1 validator operations #345
Description
Bug Summary
SignatureAggregatorRequest in chainkit/src/models/components/signatureaggregatorrequest.ts sends the field signingSubnetId in the request body to the Glacier signature aggregator API (/v1/signatureAggregator/{network}/aggregateSignatures), but the API expects signingSubnet (without "Id"). This causes a 500 error for any L1 subnet validator operation.
Impact
- 189 errors tracked in PostHog
- 32 unique users affected
- Blocks all L1 validator management (add/remove/change-weight operations)
- Primary network operations are unaffected (API has special handling)
Proof
# ❌ signingSubnetId + L1 subnet → 500
curl -X POST "https://glacier-api.avax.network/v1/signatureAggregator/fuji/aggregateSignatures/2hJPUn7GZEBBXrVLMqXhMiXBCnMi8sRbkr1gK4DP12SEuXGpJL" \
-H "Content-Type: application/json" \
-d '{"message":"0x...","signingSubnetId":"<L1_SUBNET_ID>"}'
# Returns 500
# ✅ signingSubnet + L1 subnet → 200
curl -X POST "https://glacier-api.avax.network/v1/signatureAggregator/fuji/aggregateSignatures/2hJPUn7GZEBBXrVLMqXhMiXBCnMi8sRbkr1gK4DP12SEuXGpJL" \
-H "Content-Type: application/json" \
-d '{"message":"0x...","signingSubnet":"<L1_SUBNET_ID>"}'
# Returns 200
# ✅ signingSubnetId + primary network → 200 (masks the bug)
# ✅ no field at all → 200 (auto-detects)Timeline
- Working: March 18-19 (initializeValidatorSet flow uses primary network signing — always worked)
- Broken by: March 25 (users reaching add/remove validator steps hit the L1 subnet code path)
- Bug may have existed since November but was masked because
initializeValidatorSetsigns with the primary network
Root Cause
The Speakeasy-generated SDK schema uses signingSubnetId but the Glacier API expects signingSubnet for L1 subnets. Either:
- The API spec fed to Speakeasy has the wrong field name, or
- The Glacier API changed the expected field name without updating the spec
Fix
One-file change in chainkit/src/models/components/signatureaggregatorrequest.ts: rename signingSubnetId → signingSubnet in all type definitions and Zod schemas.
The deprecated avacloud-sdk-typescript has the same bug in src/models/components/signatureaggregatorrequest.ts.
Workaround
Bypass the SDK and call the Glacier API directly with the correct field name signingSubnet.