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

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.

Under using the selected account, select the account that owns the farm, choose tfgridModule from the dropdown menu submit the following extrinsic, then select updateFarm(id, name, pricingPolicyId). Then under name: Bytes, write the new farm name. Finally, click on the bottom Submit Transaction at the bottom right of the screen.

How can I delete a farm on polkadot.js?

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

Under using the selected account, select the account that owns the farm, choose tfgridModule from the dropdown menu submit the following extrinsic, then select deleteFarm(id). Then under id: u32, write the ID of the Threefold farm you want to delete. Finally, click on the bottom Submit Transaction at the bottom right of the screen.

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.

Under using the selected account, select the account that owns the farm, choose tfgridModule from the dropdown menu submit the following extrinsic, then select deleteNodeFarm(nodeId). Then under id: u32, write the ID of the 3node you want to delete. 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.