Skip to main content

Community-to-dedicated migration

Goal​

Shyware deployments should be able to start on a shared community chain, then move to dedicated or self-hosted infrastructure without losing:

  • canonical integrity
  • attestation continuity
  • recovery/reconcile correctness
  • tenant namespace ownership

The invariant itself does not depend on who hosts the deployment. Migration is therefore a continuity problem, not a new trust model.

The same logic works in both directions:

  • community -> dedicated/self-hosted
  • dedicated/self-hosted -> community

as long as the tenant namespace, checkpoint lineage, and authority structure remain continuous.


Two migration types​

1. Service-layer migration​

The tenant takes over:

  • API hosting
  • private surface hosting
  • Cockroach or other off-canonical storage
  • reconcile/recovery service

But the canonical ledger remains on the same chain.

This is the easier path. The chain does not change; only the operator-facing service tier moves.

2. Ledger migration​

The tenant leaves a shared community chain and moves to:

  • a tenant-dedicated shyware-hosted chain, or
  • a fully self-hosted chain

This requires a formal cutover so the tenant can prove that the new chain continues from the old attested state rather than restarting from an unverifiable snapshot.


Integrity-preserving cutover​

An integrity-preserving ledger migration should follow this sequence:

  1. Freeze the tenant namespace on the source chain.
  2. Commit a final tenant-scoped checkpoint attestation on the source chain.
  3. Export tenant canonical state and tenant off-canonical service state.
  4. Bootstrap the destination deployment from that checkpoint.
  5. Publish a cutover record linking destination genesis to the source checkpoint attestation.

The migration proof is the pair:

  • source final checkpoint
  • destination bootstrap statement referencing that checkpoint

If both are signed and publicly available, third parties can verify that the tenant did not lose or rewrite canonical history during migration.


Required artifacts​

Source-side artifacts​

  • tenant identifier / namespace
  • final checkpoint height
  • final checkpoint time
  • final checkpoint attestation
  • tenant-scoped canonical record roots
  • tenant-scoped aggregate counters

Off-canonical export​

  • reconcile/recovery store
  • mailbox / dispatch / receipt state for messaging deployments
  • operator policy metadata
  • tenant manifest

These must be exported separately from canonical state. The migration should never imply that off-canonical recovery state was itself part of canonical consensus.

Destination bootstrap artifacts​

  • destination chain or namespace identifier
  • bootstrap timestamp
  • imported tenant manifest
  • imported tenant canonical roots / counters
  • bootstrap signature by the destination operator or validator set
  • explicit reference to the source checkpoint attestation

Tenant-scoped checkpoints​

For community-chain deployments, the checkpoint should be tenant-scoped rather than chain-global. That lets one tenant migrate without requiring whole-chain rotation for every other tenant.

The checkpoint should cover at least:

  • tenant namespace
  • first-canonical-record root
  • second-canonical-record root
  • tenant attestation schedule state
  • tenant aggregate counts or conservation counters

Messaging profiles such as shychat may also include:

  • mailbox commitment root
  • delivery-window close state
  • receipt continuity counters

What is implemented today​

Today the repo supports:

  • deployment posture in shyconfig
  • community vs dedicated vs self-hosted manifest modeling
  • Cockroach-backed Scytale mailbox / dispatch / receipt state
  • tenant-scoped checkpoint generation
  • signed export bundles
  • import tooling for destination restores
  • bundle verification against checkpoint digests and signatures

The operator tooling is currently exposed through:

node scripts/shyware-migration.js checkpoint --tenant TENANT --out checkpoint.json
node scripts/shyware-migration.js export --tenant TENANT --out bundle.json
node scripts/shyware-migration.js bootstrap --in bundle.json --out bootstrap.json
node scripts/shyware-migration.js verify --in bundle.json
node scripts/shyware-migration.js verify-cutover --bundle bundle.json --bootstrap bootstrap.json
node scripts/shyware-migration.js import --in bundle.json --tenant TENANT

The bootstrap statement binds a destination deployment to a source tenant checkpoint, and the cutover verifier checks that the published destination bootstrap material is consistent with the signed source export bundle. That gives the migration path a formal continuity layer rather than a bare data copy.


For community tenants​

  • launch on community.shyware.fyi
  • get a tenant manifest and tenant subdomain
  • keep tenant off-canonical state isolated from other tenants

For growth-stage tenants​

  • move service hosting first
  • then migrate ledger tenancy if needed
  • if economics or staffing change later, move back to community with the same tenant-scoped checkpoint/export/import ceremony

For regulated tenants​

  • prefer hosted_dedicated or self_hosted
  • use a signed cutover ceremony rather than ad hoc export/import

Bring Your Own Ledger (self-hosted)​

Running your own ledger — what you run, how you get it (ShywareLLC/core is not published; access is a commercial license through console.shyware.fyi), and the operator-separation requirement that applies regardless of which chain you pick — is covered in full on its own page: Self-hosting.

Migrating back to shared community hosting from a self-hosted deployment uses the same checkpoint/export/import ceremony described above — Bring Your Own Ledger does not lock you in.


Design principle​

Migration should preserve the invariant by preserving:

  • the tenant's canonical roots
  • the tenant's attestation continuity
  • the tenant's authority structure

It should not depend on trusting the source operator's database alone.