paritytech / paritytech/host-rust-core

truapi-host: derive the product id from the product manifest

Open
#521 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
10
Forks
3
Avg merge
1d 10h
Merged PRs (30d)
148

Description

Part of #517.

Context

localhost:3000 is the wrong default for most real work. A product usually wants the dotNS identity it ships under, peopl.<tld> for the network being targeted, so that accounts, storage and permissions match the deployed product rather than a local origin.

The manifest already carries that identity: LocalProductConfig.productName is the product's dotNS base name (see docs/rfcs/product-manifest.md). The CLI should read it instead of making the developer repeat it on the command line.

Required behavior

  • The CLI reads the product's local manifest config from the working directory and uses productName as the product id.
  • The top-level domain follows the selected --network, so one manifest serves .dot, .paseo and .test runs.
  • --product-id still overrides the manifest.
  • The local-origin default applies only when no manifest is found.
  • Startup output names the product id and where it came from: manifest, flag, or origin default.

Related: #515, which asks for the same thing from the host side ("i can open localhost:3000 from any host and it is peopl.dot for truapi").

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CLI entry point and read docs/rfcs/product-manifest.md for LocalProductConfig.productName and manifest behavior. Trace how --network and --product-id are handled, then verify that the manifest, flag, and origin-default sources are reported correctly in startup output and that the local-origin fallback remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.