You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three legitimate findings from round-4 review addressed in this commit.
(D) packages/cli/src/daemon/routes/context-graph.ts
The previous round-2 fix tried to preserve backward compatibility by
stripping `participantIdentityIds` / `requiredSignatures` from request
bodies and warning. Round-4 (and the project owner) made clear that
silent stripping lets callers believe they created a roster-constrained
CG when those constraints were actually discarded. We now reject
outright any request body that carries either deprecated field — code
`DEPRECATED_CONTEXT_GRAPH_FIELDS`, structured `deprecatedFields` array,
HTTP 400. No backward-compat strip path.
(C) packages/publisher/src/verify-collector.ts
`VerifyCollector.collect` used to silently default `requiredSignatures`
to 1 when the caller omitted it and the `getMinimumRequiredSignatures`
probe failed (missing probe / RPC outage / garbage value). Since
`chain.verify()` does NOT submit collected signatures on-chain, the
local quorum check is the only enforcement; defaulting to 1 lets the
proposer self-approve and pass. Now all three failure modes throw
with actionable errors pointing at the explicit `requiredSignatures`
override knob. 4 new unit tests pin the behaviour.
(B) packages/chain/src/{chain-adapter,evm-adapter,mock-adapter}.ts
+ packages/agent/src/dkg-agent.ts
SPEC_CG_MEMORY_MODEL §4.3 promises that only sharding-table members
can ACK a VM publish, but the post-LU2 verify path counted every
resolved signer regardless of membership. Added an optional
`isShardingTableMember(identityId)` to the ChainAdapter interface,
wired EVMChainAdapter to `ShardingTableStorage.nodeExists(uint72)`,
and made the mock return true for any non-zero identityId (mocks
don't model the sharding table). The agent verify path now probes
membership for every resolved signer (including the proposer) and
drops approvals from non-members with a fail-closed per-signer log.
Results are cached per batch to avoid hammering the RPC.
Tests:
- cli/test/daemon-http-behavior-extra.test.ts: replace round-2 strip-
tolerance tests with reject tests covering every deprecated-field
combination (with and without id/name).
- publisher/test/verify-collector.test.ts: four new tests covering
missing-probe / probe-throws / probe-returns-garbage / probe-honoured
paths.
- chain/test/mock-adapter-parity.test.ts: extend the parity manifest
+ add a direct positive/negative assertion for the new method.
All targeted suites pass locally:
✓ publisher/verify-collector (10/10)
✓ chain/mock-adapter-parity (13/13)
✓ chain/abi-pinning (13/13)
✓ cli/daemon-http-behavior-extra (5/5 in-scope subset)
✓ agent/{e2e-publish-protocol,
e2e-context-graph,
v10-ack-provider,
swm-ack-quorum,
swm-ack-quorum-integration} (73/73)
Holds the line on round-4 Bug A (`KnowledgeAssetsLib.sol:71` packed-
struct layout): ContextGraphStorage is not behind an upgradeable proxy;
the deploy pattern is "deploy fresh + register in Hub by name". File
itself states `// Storage layout — fresh design (no prior deployments
to preserve)`. V10 is brand-new on-chain (only testnet artifact:
base_sepolia_v10_contracts.json). No storage-slot reservation needed.
Co-authored-by: Cursor <cursoragent@cursor.com>
'The multisig-only POST /api/context-graph/create flow (participantIdentityIds without id/name) was removed in SPEC_CG_MEMORY_MODEL. Per-CG hosting committees and per-CG quorum overrides no longer exist. Send a regular `{ id, name, accessPolicy?, publishPolicy? }` body and (if you want chain registration) follow up with POST /api/context-graph/register.',
452
-
code: 'DEPRECATED_MULTISIG_CREATE_FLOW',
453
-
});
454
-
}
455
-
console.warn(
456
-
'[DKG-Daemon] WARN: POST /api/context-graph/create — `participantIdentityIds` and `requiredSignatures` are deprecated and ignored; per-CG hosting committees and quorums were removed in SPEC_CG_MEMORY_MODEL.',
457
-
);
458
-
deleteparsed.participantIdentityIds;
459
-
deleteparsed.requiredSignatures;
441
+
returnjsonResponse(res,400,{
442
+
error:
443
+
'`participantIdentityIds` and `requiredSignatures` were removed in SPEC_CG_MEMORY_MODEL. Per-CG hosting committees and per-CG quorum overrides no longer exist on-chain — every CG uses the system-wide ACK quorum (parametersStorage.minimumRequiredSignatures()) and the network sharding table for hosting. Remove these fields from the request body and use `{ id, name, accessPolicy?, publishPolicy?, allowedAgents? }` instead.',
0 commit comments