Title: id(attestation): compute_state never checks the two players are distinct — players=[A,A] attests Agreed from one key's single genesis + single claim · Issue #2863 · developing-today/code · GitHub
Open Graph Title: id(attestation): compute_state never checks the two players are distinct — players=[A,A] attests Agreed from one key's single genesis + single claim · Issue #2863 · developing-today/code
X Title: id(attestation): compute_state never checks the two players are distinct — players=[A,A] attests Agreed from one key's single genesis + single claim · Issue #2863 · developing-today/code
Description: id(attestation): compute_state never checks the two players are distinct — an agreement with players = [A, A] attests Agreed from one key's single genesis + single claim Evidence (main 07448571, merged today in PR #2854 for #2248) pkgs/i...
Open Graph Description: id(attestation): compute_state never checks the two players are distinct — an agreement with players = [A, A] attests Agreed from one key's single genesis + single claim Evidence (main 07448571, me...
X Description: id(attestation): compute_state never checks the two players are distinct — an agreement with players = [A, A] attests Agreed from one key's single genesis + single claim Evidence (main 07448571...
Opengraph URL: https://github.com/developing-today/code/issues/2863
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(attestation): compute_state never checks the two players are distinct — players=[A,A] attests Agreed from one key's single genesis + single claim","articleBody":"# id(attestation): `compute_state` never checks the two players are distinct — an agreement with `players = [A, A]` attests `Agreed` from one key's single genesis + single claim\n\n## Evidence (main `07448571`, merged today in PR #2854 for #2248)\n\n`pkgs/id/src/attestation.rs` (md5 `530fcdf45da5d8688dc0e4e319b641b2`) implements the mutual-concession viewer:\n\n- `GenesisAgreement.players: [PlayerId; 2]` (:56-62) — \"Both players, in seat order.\" Nothing in `sign_genesis`, `GenesisAgreement`, or `compute_state` requires the two seats to be **different** keys.\n- `compute_state` (:223) checks the genesis pair with `agreement.players.iter().all(|player| genesis.iter().any(|(author, signed)| author == player && signed == agreement))` (:228-232). With `players = [A, A]`, **one** genesis event from A satisfies both seats, because `any` is re-evaluated per seat against the same entry.\n- The claim phase (:239-250) enumerates the seats and, for each seat, scans the claims for that player. With `[A, A]`, A's **single** claim fills `per_player[0]` and `per_player[1]` both — the `(Some(a), Some(b))` arm (:251) then compares A's claim with itself, so outcome and final-state hash trivially \"concur\" and the state is `Agreed`.\n\nThe module's own contract says the opposite: \"`Proposed` until both players have signed the same genesis and concurred\" (module doc), \"`two claims (one per player)` that concur … are `Agreed`\" (`compute_state` doc, :216-221).\n\n### Verified (laptop probe, verbatim `compute_state` + object types, real p2panda-core `Hash` at the pinned rev `da80c05b`)\n\nProbe: `~/git/fleet/probe-2026-10-30-laneB-attdup/` on the laptop (`src/main.rs` md5 `83aab30df89c89f1549f314d795f6fde`; the extracted types/`compute_state` are byte-identical copies from `attestation.rs` — only the chain-signing helpers are omitted, because `compute_state` consumes pre-decoded author/object pairs exactly as the shipped tests call it, e.g. `one_claim_only_stays_proposed` in `tests/attestation_poc.rs:202`):\n\n- `players=[A,A]`, genesis = `[ (A, agreement) ]` (one event), claims = `[ (A, claim) ]` (one event) → **`Agreed`** ← the bug: a single key attested a \"mutual\" result entirely alone\n- `players=[A,A]`, genesis = `[ (A, agreement) ]`, claims = `[]` → `Proposed` (control: the claim is what completes it)\n- `players=[A,B]`, both genesis, both claims concur → `Agreed` (control: normal path unchanged)\n- `players=[A,B]`, both genesis, A's claim only → `Proposed` (control: the existing one-claim test's expectation)\n\nThe shipped tests (`tests/attestation_poc.rs`) cover the distinct-player happy path, the wrong-winner dispute, and the one-claim case — no duplicate-seat case.\n\n## Why it matters\n\n- The entire point of the attestation shape (#2037/#2248) is that a result is only `Agreed` when **two independent players** concede it. A self-match agreement collapses that to one signature set: anyone can mint an \"agreed\" match result naming themselves as both seats (and, with the outcome string naming themselves the winner, a one-sided \"conceded\" win) with no second party ever involved.\n- It is a PoC today, but the module doc says production API may be built on these object shapes after the #2056 review round — this is exactly the class of invariant that review (and #2039, the v1 design) needs pinned **in the viewer**, because agreements arrive as signed objects from peers: a viewer that trusts `players` without checking distinctness will accept self-attestations from anyone, not just from local callers.\n- A genesis-signing guard alone would not fix it: `compute_state` is the component that faces untrusted, already-signed objects, so the distinctness check belongs there (and, defensively, at signing time too).\n\n## Acceptance criteria\n\n- [ ] `compute_state` never returns `Agreed` (or `Disputed`) for an agreement whose two player seats are the same key: a `[A, A]` agreement with any genesis/claim set from A computes `Proposed` (or the chosen explicit invalid-agreement result — triage pins which), because there is no second player.\n- [ ] The distinct-player behavior is unchanged: `[A, B]` with both genesis + concurring claims → `Agreed`; differing claims → `Disputed`; one claim → `Proposed`.\n- [ ] A regression test covers the probe matrix: `[A,A]` with one genesis + one claim, `[A,A]` with two distinct claims from A, and the distinct-player controls.\n- [ ] Triage also pins whether `sign_genesis` should refuse to sign a duplicate-seat agreement (defense in depth) or whether the viewer check alone is the intended invariant — either way the viewer must not attest a self-match.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-30T23:25:10Z","url":"https://github.com/developing-today/code/issues/2863"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:362b4c9c-906a-2e6d-3e4b-da88f963113d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9304:39ABD:6CB73E:91A913:6B062D77 |
| html-safe-nonce | 1d480f110fecf6f21627713ebbf15fcf22958d9280a79841d94b57cf33704b3f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzA0OjM5QUJEOjZDQjczRTo5MUE5MTM6NkIwNjJENzciLCJ2aXNpdG9yX2lkIjoiMjc4NTgwNDMzOTMyMTkwODU5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7f61c03cad2d6399647dfdf10af6fc2f7492e243f7731a5dbbdb7a296d38fa9 |
| hovercard-subject-tag | issue:6128528096 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2863/issue_layout |
| twitter:image | https://opengraph.githubassets.com/524a9951983921841ba69299ee33a9df233a23a5830a8d73db73106bf20a8d0b/developing-today/code/issues/2863 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/524a9951983921841ba69299ee33a9df233a23a5830a8d73db73106bf20a8d0b/developing-today/code/issues/2863 |
| og:image:alt | id(attestation): compute_state never checks the two players are distinct — an agreement with players = [A, A] attests Agreed from one key's single genesis + single claim Evidence (main 07448571, me... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width