docs: document v2 integration and the v1/v2 migration runbook - #90
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #73: consumer bindings documentation and the v1/v2 migration runbook.
docs/src/INTEGRATION.md: a new "Tholos v2" section, since everything in this doc before it is implicitly v1. Covers the v2 function-by-function lifecycle (assert_outcomethroughwithdraw,set_paused_v2,cancel_round), why an assertion's identity is now(contract_id, assertion_id)rather than a bareid(v1 and v2 each have their own independentNextIdcounter, so both can issue id0), and three explicit known gaps: no canonical v2 testnet deployment yet,packages/tholos-sdktargets v1's wasm only, anddemos/freelance-escrowstill talks to v1 directly.docs/src/V2_MIGRATION.md(new): the coexistence runbook. Explains why there's no automated migration (v1 has no upgrade entry point, no state importer, and a bond locked in an open v1 dispute can't move contracts without changing who's liable for it), then walks through inventorying an existing v1 deployment (v1 exposes no config/version/NextIdgetter, so this means reconstructing state from deployment transactions and event history), deploying v2 fresh without copying v1's records or pooled balance, cutting new traffic over from a recorded point, and draining v1's remaining open assertions to completion. Explicitly calls out not pausing v1 during drain, sinceset_pausedblocksdispute/resolvetogether while leavingfinalizecallable, which is exactly the "pause as an unsafe migration switch" riskDEPLOYMENT.md's existing admin runbook section already warns about.Not in scope here, per the issue's own "or note as a follow-up" allowance:
demos/freelance-escrowisn't touched, since it's a separate follow-up once v2 is actually live (noted explicitly in both new docs rather than left implicit).One process note: issue #72 (TTL policy, also listed as a dependency-adjacent v2 issue) already had an unanswered assignment request from an external contributor, so I assigned it to them and picked this issue up instead rather than taking it myself.
Test plan
mdbook build docspasses locally, including the newV2_MIGRATION.mdpage and itsSUMMARY.mdentrycargo fmt --check/cargo clippy/cargo test— not applicable, this PR touches onlydocs/src/*.md, no RustCONTRACT.mdupdated if the public interface changed — not applicable, no interface changes;tholos-v2still isn't documented inCONTRACT.md(tracked separately, as noted in prior v2 PRs)scripts/testnet-smoke.sh— not applicable, docs-onlyINTEGRATION.md#tholos-v2,DEPLOYMENT.md#pausing-during-an-incident, etc.) resolves to a real heading, and confirmed issue [Feature] Migrate demo app to the generated Tholos TS SDK bindings #63 (demo-app SDK migration) is actually about the v1 TS SDK, not a v1-to-v2 migration, so it isn't miscited as the demo-app follow-up here.