How to use Polkadot.js to update/delete a farm or a 3node

Hi TFarmers,

The question comes up often on how to delete a 3node or a farm, or change a farm’s name, with polkadot.js instead of the Threefold Portal. This will be included in the FAQ, but here are some Q+A concerning this subject.

Can I change the name of my farm on polkadot.js?

It’s possible to rename farms through the Polkadot UI. For mainnet, use this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftfchain.grid.tf#/extrinsics.

  1. Under using the selected account, select the account that owns the farm
  2. Choose tfgridModule from the dropdown menu submit the following extrinsic,
  3. Select updateFarm(id, name, pricingPolicyId)
  4. Under name: Bytes, write the new farm name
  5. Finally, click on the bottom Submit Transaction at the bottom right of the screen

How can I delete a farm on polkadot.js?

The ability to delete a farm was removed from TF Chain due to concerns that nodes could be left without a farm and thus cause problems with billing.

I try to delete a node on the TF Portal, but it doesn’t work. Is there any other way to proceed that could work?

It’s possible to delete nodes through the Polkadot UI. For mainnet, use this link: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftfchain.grid.tf#/extrinsics.

  1. Under using the selected account, select the account that owns the farm,
  2. Choose tfgridModule from the dropdown menu submit the following extrinsic
  3. Select deleteNodeFarm(nodeId)
  4. Under id: u32, write the ID of the 3node you want to delete
  5. Finally, click on the bottom Submit Transaction at the bottom right of the screen
8 Likes

I came here to write a post on this, and then found yours :slight_smile: Thanks!

1 Like

I try to delete some nodes, and I don’t get any errors, but the nodes are still showing on the portal and in the capacity finder…

@Mik : Are you sure you need to use deleteNodeFarm(nodeId) to delete a Node? It looks like this command would delete the complete farm containing this node ID?

Some farmers did use deleteNode(id) and it didn’t work to delete 1 node while deleteNodeFarm(nodeId) did delete only one specific node, without deleting the farm. So it looks like it does work.

If we can have more precision on this it would be great.

Good question @TFFarmer

Indeed, deletenodefarm works for a single node, whereas deletenode does nothing…

1 Like

Alright. thanks a lot @TFFarmer for this confirmation.

Just heard from one of our farmer that this method is not working anymore. I’ll report back when there’s more to share on how to delete and modify farms and nodes going forward.

Thanks Scott. I’ll write it of as OUTDATED for now.

1 Like

Hi,

“deletenode” is a function that can only be called by the node itself.

“deletenodefarm” is a function to delete a node on a farm, this call needs to be signed with the key of the farm.

Thanks @dylanv

And what about deleteFarm(id). Is it still working?

The last feedback we had was a farmer trying to delete an unused farm.

I just tested deleteNodeFarm and it works. Deleting a farm is not currently supported due to potential hazards if nodes are left hanging without a farm. I’ll update the original post to reflect this.

1 Like

OK! Thanks for the clarifications.

I updated the FAQ on Github and rebooted the FAQ bot so those changes are updated.
Should be online on the TF Library soon then.