ECP Setup
Source link: https://github.com/swanchain/go-computing-provider/blob/releases/ubi/README.md Please refer to the above link for up-to-date information.
ECP (Edge Computing Provider) specializes in processing data at the source of data generation, using minimal latency setups ideal for real-time applications. This provider handles specific, localized tasks directly on devices at the network’s edge, such as IoT devices.
At the current stage, ECP supports the generation of ZK-Snark proof of Filecoin network, and more ZK proof types will be gradually endorsed, such as Aleo, Scroll, starkNet, etc
Prerequisites
Need to map the ECP service port of the intranet to the public network, the default port is
9085
:
Running the
setup.sh
Download the v28 parameters for
ZK-FIL
task:
Install ECP and Init CP Account
Download
computing-provider
Initialize ECP repo
Generate a new wallet address and deposit the
SwanETH
, refer here:
Output:
[OPTIONAL] You can also import your own wallet by private key
Note:
By default, the CP's repo is
~/.swan/computing
, you can configure it byexport CP_PATH="<YOUR_CP_PATH>"
private.key
is a file that contains the private key
Initialize ECP Account
Note: --task-types
: Supports 5 task types (1: Fil-C2, 2: Mining, 3: AI, 4: Inference, 5: NodePort), separated by commas. For ECP, it needs to be set to 1,2,4.
Collateral
SWANU
for ECP
If you want to withdraw
SWANU
from ECP
Deposit
SwanETH
to Sequencer Account
If you want to Withdraw
SwanETH
from Sequencer Account
Note: the gas cost is decided by the Dynamic Pricing Strategy
Config resource price
Pricing: Indicating acceptance of smart pricing orders, which may include orders priced lower than self-determined pricing. default "true"
Configure it in the $CP_PATH/price.toml
:
Generate the pricing config with default values(Located at
$CP_PATH/price.toml
):
Customize your resource prices, adjust resource prices based on how many swans are configured per hour
example:
View the configured price information:
CP Hardware Price Info: TARGET_CPU: 0.2 SWAN/thread-hour TARGET_MEMORY: 0.1 SWAN/GB-hour TARGET_HD_EPHEMERAL: 0.005 SWAN/GB-hour TARGET_GPU_DEFAULT: 1.6 SWAN/Default GPU unit a hour TARGET_GPU_3080: SWAN/GPU unit a hour
Start ECP service
Note:
<FIL_PROOFS_PARAMETER_CACHE>
is your parameters directory,RUST_GPU_TOOLS_CUSTOM_GPU
is your GPU model and cores, you should update it to your own GPU model. More examples can be found here<YOUR_PUBLIC_IP>
,<YOUR_PORT>
are your public IP and port ,<YOUR_NODE_NAME>
is your CP name which will show in the dashboard, If not specified, the default ishostname
.
About Sequencer
Why need Sequencer?
In past tests, we discovered that due to the frequent interactions required by ECP (Ethereum Compliance Proof) to submit proofs to the blockchain, ECP incurs significant gas costs. To reduce these gas costs, the Sequencer has emerged as a Layer 3 solution.
The ECP can submit proofs to the Sequencer service, which will then package and submit all proofs from the entire network over a period of time (currently 24 hours) in a single transaction. This way, ECP only needs to pay a minimal gas fee to the Sequencer (currently, the gas is decided by the Dynamic Pricing Strategy). For more detailed information, see here.
How to Set it?
We strongly recommend enabling the Sequencer feature (enabled by default). The steps to enable it are as follows:
Modify the
config.toml
file.
Deposit SwanETH into the Sequencer account.
Restart the ECP
Last updated