Skip to content

Add CLI registration steps for Hosts #259

Description

@johnnymatthews

Pick one:

  • Bug Report
  • Feature Request

Description

In #258 we've revamped the whole Hosts section. However, steps to register a Host client via the terminal aren't included because I've got a few questions.

The register() call requires values that we don't explain how to produce.

cast send "0x0000000000000000000000000000000000000211" \
  "register(bytes,bytes,bytes,bytes,bytes,uint8)" \
  "<public_key>" \
  "<public_key_signedMessage>" \
  "<peer_id>" \
  "<peer_id_signedMessage>" \
  "<signed_message>" \
  "1" \
  --rpc-url "http://rpc.devnet.shinzo.network:8545" \
  --from "<your_address>" \
  --private-key "<your_private_key>" \
  --gas-limit 100000

I know that <peer_id> comes from the Host's health endpoint: curl -s http://<host>:8080/health | jq -r '.p2p.self.id'. Dead easy And wallet-side signing in general is possible using cast wallet sign --private-key "<key>" "<message>", but only if a given field is meant to be signed with the wallet key.

Here's what I'm missing:

  1. <public_key>. This is the Host's libp2p public key, not the wallet's. Does the Host expose it via /health, another endpoint, or a host CLI subcommand?
  2. The three signed-message fields. Super unclear which key signs which. public_key_signedMessage and peer_id_signedMessage sound like they should be signed by the node identity key, and signed_message may be the wallet-side signature. If any of these 3 need the node identity key, cast can't make them.
  3. The register() call hardcodes the role argument to "1". Just need to know if 1 is Host and not Indexer in the role enum (the GUI hides this behind a picker).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Required for testnetSSmall piece of workresearchRequires digging around a bit first.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions