CP_Operations_EN #199
Normalnoise
started this conversation in
Knowledge
Replies: 2 comments 3 replies
-
if any new knowledge about CP want to know, please leave here |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Computing Provider (CP) Operations Guide
Introduction
This guide provides comprehensive instructions for setting up and managing Computing Providers in the Swan network. Computing Providers are essential infrastructure components that offer computing resources to users, coming in two types: Fog Computing Providers (FCP) and Edge Computing Providers (ECP). Each type serves different use cases and has specific requirements.
Before proceeding with any operations, it's important to understand that:
Table of Contents
Understanding CP Types
Fog Computing Provider (FCP)
FCP (Fog Computing Provider) Offers a layered network that extends cloud capabilities to the edge of the network, providing services such as AI model training and deployment. FCPs are designed for AI model inference API services and higher-end computing tasks requiring more sophisticated infrastructure
Minimum Requirements:
Edge Computing Provider (ECP)
Edge Computing Provider (ECP) is specialized for processing data at the source of data generation, optimizing for minimal latency in real-time applications.
ECPs are primary focus on generation of ZK-Snark proof for Filecoin network, mining services and simpler deployment and management
Minimum Requirements:
Common Account Operations
1.Account System Overview
The CP system uses a three-address architecture for security and operational efficiency:
Owner Address:
The Owner Address serves as the administrator of the CP Account, holding exclusive rights to modify critical account settings such as
multi-address
configuration,worker address
, andbeneficiary address
changes. For security purposes, the owner's private key should not be stored on the CP server except when performing administrative operations.Worker Address:
The Worker Address handles all operational tasks, including proof submission (submitProof) to the network, and requires a balance of sETH for gas fees.
Beneficiary Address:
The Beneficiary Address receives all earnings and rewards generated by the CP Account, including UBI rewards and application deployment compensation.
2.General CP Operations (Common to Both ECP and FCP)
This section covers the basic operations that all CPs, whether ECP or FCP, must know. These tasks include managing account information, updating addresses, and adjusting task settings.
2.1 Change Owner Address
To change the
owner address
of your CP account, use the following command:Note: The
YOUR_NEW_OWNER_ADDRESS
does not need to be on the CP machine, but the owner’s private key is required for this operation.2.2 Change Worker Address
To change the
worker address
, run:Note: The
YOUR_NEW_WORKER_ADDRESS
must be stored on the CP machine for two essential purposes:2.3 Change Beneficiary Address
Update the
beneficiary address
with:Note: The beneficiary address is for receiving rewards, and no private key is required on the CP machine.
2.4 Change Task Types
CP currently supports five task types, each corresponding to different workloads and associated rewards. The more task types you set, the more diverse tasks your CP can accept.
There are two CP roles: FCP and ECP.
You can set the task types using the following command:
Note: Separate task types with commas. The full list of task types can be found in the Swan Chain documentation here.
Task Types:
2.5 Change Multi-Address
MultiAddress defines how your CP is accessible on the network.
config.toml
file:ECP Setup and Operations
Edge Computing Providers (ECPs) are typically smaller-scale CPs that may run more specialized tasks, such as data storage or computation on the edge of the network. The following operations are specifically for ECPs.
1. Initial Setup
1.1 Repository Initialization
The first step in setting up an ECP is initializing the repository. This creates a
config.toml
file containing essential configuration settings and defines data storage parameters.1.2 Account Creation
In the Swan network, each CP exists as a contract address. The CP account serves as your unique identifier for all operations, including task distribution, reward collection, and collateral management. It represents your primary token of identity within the Swan network.
2.Collateral Management
2.1 Adding Collateral
To participate in the Swan network and receive tasks, ECPs must stake SWAN tokens as collateral. This stake serves as a security mechanism - if service availability falls below acceptable levels, penalties may be applied against this collateral.
check details about collateral here.
2.2 Withdrawing Collateral
There are two methods for withdrawing collateral, each with different processing times:
Direct Withdrawal from
Collateral Balance
Note: Funds are transferred immediately to the owner address.
Withdrawal from
Escrow Balance
This process requires a waiting period and multiple steps:
Note: After submitting the withdrawal request, there is a mandatory 7-day waiting period before confirmation can be processed. Use the command
withdraw-view
to monitor the withdrawal status.3. Sequencer Management
3.1 Understanding Sequencer
The sequencer system provides an efficient solution for submitting UBI task proofs while minimizing gas costs. Instead of direct chain submission, the UBI sequencer service batches messages according to L2 protocol timing, significantly reducing gas fees. Each message processed consumes from your sequencer balance, so maintaining adequate ETH in your sequencer account is essential.
Learn more about the Sequencer here.
3.2 Managing Sequencer Balance
Adding Funds to Sequencer
Withdrawing from Sequencer
FCP Setup and Operations
Fog Computing Providers (FCPs) are larger-scale CPs with the capability to handle more extensive computational tasks, typically requiring more resources such as GPUs and high-performance hardware. The following operations are specific to FCPs.
1. Initial Setup
1.1 Repository Initialization
The first step in setting up an FCP is initializing the repository. This creates a
config.toml
file that contains essential configuration settings and defines data storage parameters.1.2 Account Creation
In the Swan network, each CP exists as a contract address, with the CP account serving as the unique identifier for all operations. This account handles task distribution, reward collection, and collateral management. It's your primary token of identity within the Swan network.
2. Collateral Management
2.1 Adding Collateral
To participate in the Swan network and receive tasks, FCPs must stake SWAN tokens as collateral. This stake serves as a security mechanism - if service availability falls below acceptable levels, penalties may be applied against this collateral.
check details about collateral here.
2.2 Withdrawing Collateral
There are two methods for withdrawing collateral, each with different processing times:
Direct Withdrawal from
Collateral Balance
Note: Funds are transferred immediately to the owner address.
Withdrawal from
Escrow Balance
This process requires a waiting period and multiple steps:
Note: After submitting the withdrawal request, there is a mandatory 7-day waiting period before confirmation can be processed. Use the view command to monitor the withdrawal status.
FAQ
1. What is the difference between ECP and FCP, and what are the minimum configuration requirements?
FCP:
*.example.com
)ECP:
2. What do the
Owner
,Worker
, andBeneficiary
addresses represent, and what are the differences?cpAccount
. Only the owner has permission to change account details, such asmulti-address
,worker address
,beneficiary address
, etc. The owner's private key should not appear on the server under normal circumstances.submitProof
). A certain amount of sETH is required for gas fees.cpAccount
are paid. This address is only used to receive funds, so its private key should not be stored on the server for security reasons. The purpose of these three address types is to ensure the security of thecpAccount
. Typically, the server should only need to maintain the private key for the worker address, not the owner or beneficiary addresses.3. What should I do if my server's public IP changes?
Follow the instructions in the CP Common Account Operations section to change the
multiAddress
.4. How can I check how much collateral my CP needs, and is my collateral sufficient?
cpAccount
and find the CU value.cu * base_collateral
. Currently,base_collateral = 3533
. It’s recommended to add 10% extra for safety.5. What is the current slashing mechanism for CP?
When you deploy an application to CP, the CP runs the service, and the SWAN monitoring system will penalize the CP if the service's availability is deemed poor. For more details, refer to the Slashing Mechanism.
6. How to verify if FCP is running properly?
Ensure that the sum of
Collateral
andEscrow
under theFCP Balance
is greater than the calculated collateral amount for proper staking.Verify the CP version by checking the commit number in the official go-computing-provider repository to confirm if your version is up-to-date or the recommended stable version.
Verify the version of
resource-exporter
by checking the required version in the official repository.In the Provider Dashboard, locate your CP using the
cpAccount
. Check that the status isOnline
, and ensure collateral is sufficient (as shown in the example). If so, your CP is running properly.7. How to verify if ECP is running properly?
Ensure that the sum of
Collateral
andEscrow
under theECP Balance
is greater than the calculated collateral amount for proper staking.Verify the CP version by checking the commit number in the official go-computing-provider repository to confirm if your version is up-to-date or the recommended stable version.
Verify the version of
resource-exporter
by checking the required version in the official repository.In the Provider Dashboard, locate your CP using the
cpAccount
. Check that the status isOnline
, and ensure collateral is sufficient (as shown in the example). If so, your CP is running properly.Beta Was this translation helpful? Give feedback.
All reactions