Skip to content

next: cloud-copy join returns the log URL and genesis item - #630

Merged
callumalpass merged 1 commit into
mainfrom
next/join-genesis
Oct 6, 2026
Merged

callumalpass merged 1 commit into
mainfrom
next/join-genesis

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

A device joining a cloud copy has to pin the collection's genesis (sync.json genesis_hash) before it trusts the log. The create answer already returns the genesis; this makes the join answer (POST /v1/next/collections/:id/devices) carry it too, as log_url and genesis: {seq: 1, item}. Those are the exact appended seq-1 bytes. They are candidate bytes only: the daemon verifies them against its trust pins.

  • The postgres test asserts that the returned item equals the appended batch's bytes. The cloud-copy bootstrap suite passes (23/23) on a local disposable Postgres. Typecheck is clean.
  • A changelog fragment is added.
  • The same change for the private-enrol answer follows after next: private collection create and device enrol #621 lands.

…item

A joining device must pin the collection's genesis (sync.json genesis_hash)
before trusting the log; the answer now returns the exact appended seq-1 bytes
(candidate bytes the device verifies against its trust pins), as create does.
@callumalpass
callumalpass enabled auto-merge October 6, 2026 05:45
@callumalpass
callumalpass added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 6, 2026
@callumalpass
callumalpass added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit c5ddbb0 Oct 6, 2026
14 checks passed
@callumalpass
callumalpass deleted the next/join-genesis branch October 6, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant