Skip to content

fix: record mod lineage on-chain + migrate to current meta-registry#229

Merged
UtkarshBhardwaj007 merged 2 commits into
mainfrom
fix/mod-lineage-onchain-registry-migration
May 29, 2026
Merged

fix: record mod lineage on-chain + migrate to current meta-registry#229
UtkarshBhardwaj007 merged 2 commits into
mainfrom
fix/mod-lineage-onchain-registry-migration

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Summary

Two related fixes so dot deploy --playground actually records mod lineage that playground-app and playground-constellation can display.

1. Record mod lineage on-chain

The modded_from argument to the registry publish() call was read from options.moddedFrom — an option no caller ever sets — so the contract always received "" and never recorded a lineage edge or awarded the source owner the "your app is modded" XP. The value dot mod captures in dot.json (read via readModdedFrom) was only used for the off-chain Bulletin metadata blob, not the on-chain argument.

Fix: route the captured dot.json value into the publish call, keeping the explicit option as a fallback. Adds a test that writes a real dot.json and asserts the source domain reaches publish().

2. Migrate to the current CDM meta-registry

playground-app and playground-constellation migrated to a freshly deployed meta-registry (0xf62c2ece…, target b7a87bf…) where @w3s/playground-registry was redeployed at v0 with additive lineage methods (getLineage/getLineageCount). The CLI was still resolving live contract addresses from the old meta-registry (0xa7ae171c…), so it published to a stale registry the app no longer reads from — and the contract's source-exists check (Storage::info().contains(&modded_from)) would silently drop every lineage edge.

Fix: regenerate cdm.json against the new registry + latest ABI (byte-identical to app/constellation), drop the stale target, and bump @dotdm/env to 2.0.2 so dot contract fallback defaults match. The publish() signature is unchanged.

Both fixes are required: #1 passes the value, #2 ensures the source app exists on the registry the CLI publishes to.

Verification

  • Three-way cdm.json check: CLI, app, and constellation agree on target b7a87bf…, registry 0xf62c…, contract 0x1C12456f… v0, and a byte-identical @w3s/playground-registry ABI (incl. getLineage/getLineageCount).
  • Traced the full path: dot mod writes moddedFrom → publish passes modded_from → contract records LineageEdge { child, source } (registry/lib.rs:755) → constellation reads it via getLineage (reads.ts:loadLineage).
  • pnpm format:check, pnpm lint:license, pnpm build, pnpm test (594 passed, 1 skipped) all green.

Notes

  • Lineage is single-hop: dot mod B to create C sets moddedFrom=B (immediate parent), not A. Constellation reconstructs the full tree from individual edges.
  • Only deploys after this change record on-chain edges; historical lineage would need the contract's import_lineage admin backfill.

The modded_from argument to the registry publish() call was read from
options.moddedFrom, an option no caller sets, so the contract always
received "" and never recorded a lineage edge or awarded the source
owner the "your app is modded" XP. Route the value dot mod captures in
dot.json (via readModdedFrom) into the publish call instead, with the
explicit option kept as a fallback. Adds a test that writes a real
dot.json and asserts the captured source domain reaches publish().
playground-app and playground-constellation migrated to a freshly
deployed CDM meta-registry (0xf62c, target b7a87bf) where
@w3s/playground-registry was redeployed at v0 with additive lineage
methods (getLineage/getLineageCount). The CLI was still resolving live
addresses from the old meta-registry (0xa7ae), so it published to a
stale registry the app no longer reads from. Regenerate cdm.json against
the new registry + latest ABI (byte-identical to app/constellation),
drop the stale target, and bump @dotdm/env to 2.0.2 so dot contract
defaults match. The publish() signature is unchanged, so mod lineage
flows through modded_from end-to-end.
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​dotdm/​cdm@​0.6.15741006796100
Addednpm/​@​dotdm/​env@​2.0.2721006896100
Addednpm/​@​dotdm/​contracts@​3.1.2751007396100

View full report

@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit 9c908b2 into main May 29, 2026
17 of 19 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/fix/mod-lineage-onchain-registry-migration bash

@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the fix/mod-lineage-onchain-registry-migration branch May 29, 2026 13:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

E2E Test Pass · ❌ FAIL

Tag: e2e-ci-pr · Branch: fix/mod-lineage-onchain-registry-migration · Commit: f30c4da · Run logs

Cell Result Time
pr-deploy-frontend ❌ FAIL 2m35s
pr-install ✅ PASS 0m51s
${{ matrix.cell }} ⏭️ SKIP -11m-22s
pr-mod ❌ FAIL 2m15s
pr-deploy-foundry ✅ PASS 0m44s
pr-preflight ✅ PASS 0m59s
pr-init-session ✅ PASS 1m54s
pr-deploy-cdm ✅ PASS 4m04s
${{ matrix.cell }} ⏭️ SKIP -11m-31s

Sentry traces: view spans for this run

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