A pallet that serves as a registry for all the users, nodes, farmers on the Threefold Grid.
The Tfgrid module provides functions for:
- Creating / Updating / a twin (digital representation of a physical person)
- Creating / Updating / a farm
- Creating / Updating a ZOS node
- Certifying nodes and adding / removing allowed certfiers
- Reporting node uptime
- Managing pricing policies
- Managing farming policies
- Setting the global ZOS version
- Twin: a digital representation of a physical person. A twin is linked to a user's keypair. A twin is unique per keypair.
- Farm: a digital representation of a physical farm. A farm is linked to a twins keypair. A farm is unique per twin. A farm can have a list of Public IPS which are routable on the internet.
- Node: a digital representation of a physical ZOS node (a machine running ZOS). Nodes are linked to a farm and a farm can have multiple nodes.
- Certification: A node can be marked as certified, meaning it's hardware is certified by a trusted party. This pallet allows for the certification of nodes. This node earns more farming rewards.
- Pricing Policy: A pricing policy is a set of prices for the usage of resources on a node. A pricing policy is linked to a farm. By default, a farm will have the in genesis configured pricing policy.
- Farming Policy: A farming policy is a set of rules that determine how much a farmer earns for farming (being online). A farming policy is linked to a farm. By default, a farm will have the in genesis configured farming policy.
- Entity: An entity is a digital representation of a physical entity (a company, a foundation, ...). An entity can have multiple twins.
- Farm Certification: A farm can be marked as certified, meaning it's adhering to a set of rules defined by Threefold. This farm earns more farming rewards.
For more information browse our manual
su_price_value
: The SU price value in mUSD/hour, this is the price of 1 SU in mUSD per hoursu_price_unit
: The unit of 1 SU (e.g. GB, TB, ...)nu_price_value
: The NU price value in mUSD/hour, this is the price of 1 NU in mUSD per hournu_price_unit
: The unit of 1 NU (e.g. GB, TB, ...)ipu_price_value
: The IPU price value in mUSD/hour, this is the price of 1 IPU in mUSD per houripu_price_unit
: The unit of 1 IPU (e.g. GB, TB, ...)cu_price_value
: The CU price value in mUSD/hour, this is the price of 1 CU in mUSD per hourcu_price_unit
: The unit of 1 CU (e.g. GB, TB, ...)domain_name_price_value
: The price of a domain name in mUSD per hourunique_name_price_value
: The price of a unique name in mUSD per hourfoundation_account_id
: The account id of the foundation account, this account will receive all the fees paid by userssales_account_id
: The account id of the sales account, this account will receive all the fees paid by usersdiscount_for_dedication_node
: The discount in % for prices for a dedicated nodefarming_policy_diy_cu
: The amount of CU a DIY farmer earns per hour for being onlinefarming_policy_diy_nu
: The amount of NU a DIY farmer earns per hour for being onlinefarming_policy_diy_su
: The amount of SU a DIY farmer earns per hour for being onlinefarming_policy_diy_ipu
: The amount of IPU a DIY farmer earns per hour for being onlinefarming_policy_minimal_uptime
: The minimal uptime a DIY farmer needs to have to earn farming rewardsfarming_policy_certified_cu
: The amount of CU a certified farmer earns per hour for being onlinefarming_policy_certified_nu
: The amount of NU a certified farmer earns per hour for being onlinefarming_policy_certified_su
: The amount of SU a certified farmer earns per hour for being onlinefarming_policy_certified_ipu
: The amount of IPU a certified farmer earns per hour for being onlinefarming_policy_minimal_uptime
: The minimal uptime a certified farmer needs to have to earn farming rewardsconnection_price
: The price of TFT when connecting a node
Dispatchable functions of this pallet.
set_storage_version
: Set the storage version, only callable by a configurable origin.create_farm
: Create a farmupdate_farm
: Update a farmadd_stellar_payout_v2address
: Add a stellar payout address to a farmset_farm_certification
: Set the certification of a farm, only callable by a configurable origin.add_farm_ip
: Add an Public IP to a farmremove_farm_ip
: Remove a Public IP from a farmcreate_node
: Creates a nodeupdate_node
: Updates a nodeset_node_certification
: Set the certification of a node, only callable by a configurable origin or allowed Node Certifiers.report_uptime
: Report uptime for a nodeadd_node_public_config
: Add a public network config to a nodedelete_node
: Delete a nodecreate_entity
: Create an entityupdate_entity
: Update an entitydelete_entity
: Delete an entitycreate_twin
: Create a twinupdate_twin
: Update a twinadd_twin_entity
: Add an entity to a twindelete_twin_entity
: Delete an entity from a twincreate_pricing_policy
: Create a pricing policyupdate_pricing_policy
: Update a pricing policycreate_farming_policy
: Create a farming policyuser_accept_tc
: Accept the terms and conditions (must be called before creating a twin)delete_node_farmer
: Delete a node with farmer's keyforce_reset_farm_ip
: Force reset a farm's public IP, can only be called by a configurable origin.set_connection_price
: Set the connection price, can only be called by a configurable origin.add_node_certifier
: Add a node certifier, can only be called by a configurable origin.remove_node_certifier
: Remove a node certifier, can only be called by a configurable origin.update_farming_policy
: Update a farming policy, can only be called by a configurable origin.attach_policy_to_farm
: Attaches a farming policy to a farm, can only be called by a configurable origin.set_zos_version
: Set the global ZOS version, can only be called by a configurable origin.change_power_state
: Change the power state of a node, can only be called by the node.change_power_target
: Change the power target of a node, can only be called by the node.bond_twin_account
: Bond an account to a twin.report_uptime_v2
: Report uptime for a node, v2 version.