Managing a service

In order to register as an Actively Validated Service within our restaking protocol you can use the following command:

milkywayd tx services create [Your-service-name] \
  --description <Your service description> \
  --picture <The URL of the picture for your service> \
  --website <The URL of your website> \
  --from <key-name>
  --chain-id <chain-id>
  --gas auto --gas-prices 0.1umilk --gas-adjusment 1.5
  --node <RPC URL of the node> 

Where:

  • [Your-service-name] identifies the name of the service you want to register.

  • --description allows to set a brief description of the service you are registering (optional).

  • --picture allows you to set the URL of the picture that will be shown to users inside our AVSs explorer (optional).

  • --website allows to set the URL of your website (optional).

  • <key-name> is the name of the key that you are using to sing the transaction. The same account will be set as the admin of the service.

  • <chain-id> is the ID of the MilkyWay chain where you are broadcasting the transaction. You can find the various chain ids here.

  • <RPC URL of the node> is the URL of the RPC node to be used to broadcast the transaction. You can find the various chain RPCs here.

This command will run a transaction registering your service within the MilkyWay chain and assigning it a unique ID. Please note down this ID as it's going to be needed to run any transaction regarding your service.

Updating the details of a service

If you ever want to update some details about a service (e.g. the name, description, website, etc) you can do so with this command:

milkywayd tx services update [service-id] \
  --description <Your service description> \
  --picture <The URL of the picture for your service> \
  --website <The URL of your website> \
  --from <key-name>
  --chain-id <chain-id>
  --gas auto --gas-prices 0.1umilk --gas-adjusment 1.5
  --node <RPC URL of the node> 

Where:

  • [service-id] is the unique ID of your service.

  • --description is the new description (optional).

  • --picture is the new the URL of the picture (optional).

  • --website is the new URL of your website (optional).

  • <key-name> is the name of the key that you are using to sing the transaction. The same account will be set as the admin of the service.

  • <chain-id> is the ID of the MilkyWay chain where you are broadcasting the transaction. You can find the various chain ids here.

  • <RPC URL of the node> is the URL of the RPC node to be used to broadcast the transaction. You can find the various chain RPCs here.

Marking a service as active

Once you have successfully registered a service, the next thing you have to do is mark it as active. This will signal operators that they can join you on the MilkyWay chain, to start receiving rewards in exchange for running your binary file. To mark yourself as active you can run the following transaction:

milkywayd tx services activate [service-id] \
  --from <key-name>
  --chain-id <chain-id>
  --gas auto --gas-prices 0.1umilk --gas-adjusment 1.5
  --node <RPC URL of the node> 

Where:

  • [service-id] is the unique ID of your service.

  • <key-name> is the name of the key that you are using to sing the transaction. The same account will be set as the admin of the service.

  • <chain-id> is the ID of the MilkyWay chain where you are broadcasting the transaction. You can find the various chain ids here.

  • <RPC URL of the node> is the URL of the RPC node to be used to broadcast the transaction. You can find the various chain RPCs here.

Once the transaction is successfully executed, the service will be marked as ACTIVE inside the chain.

Deactivating a service

If you ever need to run maintainance on your service (e.g. updating the rewards distribution plan, or changing something) you can mark your service as INACTIVE. This will make sure that rewards are no longer distributing to operators or users. To do so, you can run the following transaction:

milkywayd tx services deactivate [service-id] \
  --from <key-name>
  --chain-id <chain-id>
  --gas auto --gas-prices 0.1umilk --gas-adjusment 1.5
  --node <RPC URL of the node> 

Where:

  • [service-id] is the unique ID of your service.

  • <key-name> is the name of the key that you are using to sing the transaction. The same account will be set as the admin of the service.

  • <chain-id> is the ID of the MilkyWay chain where you are broadcasting the transaction. You can find the various chain ids here.

  • <RPC URL of the node> is the URL of the RPC node to be used to broadcast the transaction. You can find the various chain RPCs here.

Once the service has been set as INACTIVE, you can reactivate it by following this guide: Marking a service as active.

Last updated