Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to CP V0.5.0 #89

Open
Normalnoise opened this issue Jun 13, 2024 · 3 comments
Open

Upgrade to CP V0.5.0 #89

Normalnoise opened this issue Jun 13, 2024 · 3 comments

Comments

@Normalnoise
Copy link
Collaborator

Normalnoise commented Jun 13, 2024

Steps to Upgrade to CP Version 0.5.0:

As an ECP:

  1. Export and back up your private key:

    export CP_PATH="<YOUR_CP_PATH>"
    computing-provider wallet export <YOUR_WALLET_ADDRESS> 
  2. Back up the config.toml file in the $CP_PATH directory as config.toml.bak.

    mv config.toml config.toml.bak
    
  3. Follow the Deployment DOC to start.


As an FCP:

  1. Withdraw your previous staked Swan-ETH:

    computing-provider collateral withdraw <YOUR_WALLET_ADDRESS> <AMOUNT>
  2. Back up and export the private key:

    export CP_PATH="<YOUR_CP_PATH>"
    computing-provider wallet export <YOUR_WALLET_ADDRESS>
  3. Modify the config.toml file in the $CP_PATH directory:

    [CONTRACT]
    SWAN_CONTRACT = "0x91B25A65b295F0405552A4bbB77879ab5e38166c"              # Swan token's contract address
    SWAN_COLLATERAL_CONTRACT = "0xC7980d5a69e8AA9797934aCf18e483EB4C986e01"   # Swan's collateral address
    REGISTER_CP_CONTRACT = "0x6EDf891B53ba2c6Fade6Ae373682ED48dEa5AF48"       # The CP registration contract address
    ZK_COLLATERAL_CONTRACT = "0x1d2557C9d14882D9eE291BB66eaC6c1C4a587054"     # The ZK task's collateral contract address
  4. Follow the Deployment DOC to start.

Note: If you found too many resource are used, you can release your CP resources by running

kubectl get namespaces | awk '/^ns-/{print $1}' | xargs kubectl delete namespace
  1. Check your CP version
    the minimal CP version should be v0.5.0
computing-provider -v
@stefdeblessed
Copy link

LFG best project ever

@hilmanraz
Copy link

good to be here

@ThomasBlock
Copy link

ThomasBlock commented Jun 14, 2024

Thank you for the docs.
Here a summary for ECP:

  1. backup
    computing-provider wallet export 0xA
  2. update computing-provider:
  3. Modify config.toml
SWAN_COLLATERAL_CONTRACT
REGISTER_CP_CONTRACT
ZK_COLLATERAL_CONTRACT
  1. run
restart
computing-provider wallet import 0xA
computing-provider wallet list
computing-provider init --multi-address="..." --port 1234 --node-name="..."
computing-provider account create --ownerAddress 0xB --workerAddress 0xA --beneficiaryAddress 0xB --task-types 1,2,4
computing-provider collateral add --ecp --from 0xA --account 0xC 1
computing-provider info
restart

result:

computing-provider info
CP Account Info:           	                                                                                                                                   
   CP Account Address(2.0):	0xC                                                                                        	
   Name:                   	Test123                                                                                                              	
   Owner:                  	0xB                                                                                        	
   Node ID:                	04d03fcd36b...
   Domain:                 	<YOUR CP Domain>                                                                                                                  	
   Multi-Address:          	/ip4/1.2.3.4/tcp/3456                                                                                                      	
   Worker Address:         	0xA                                                                                        	
   Beneficiary Address:    	0xB                                                                                        	
                           	
Capabilities:              	
   Task Types:             	Fil-C2-512M,Aleo,Fil-C2-32G                                                                                                       	
   Applications:           	0                                                                                                                                 	
                           	
Owner Balance(sETH):       	0.728                                                                                                                             	
Worker Balance(sETH):      	0.728                                                                                                                             	
                           	
ECP Balance(sETH):         	
   Collateral:             	1.000                                                                                                                             	
   Escrow:                 	0.000                                                                                                                             	
FCP Balance(sETH):         	
   Collateral:             	0.000                                                                                                                             	
   Escrow:                 	0.000                    

For FCP it's quite the same. just change:

computing-provider account create --ownerAddress 0xB --workerAddress 0xA --beneficiaryAddress 0xB --task-types 3
computing-provider collateral add --fcp --from 0xA --account 0xC 1
computing-provider info
...
Capabilities:              	
   Task Types:             	AI                                                                                                                                	
   Applications:           	31                                                                                                                                	
                           	
Owner Balance(sETH):       	0.698                                                                                                                             	
Worker Balance(sETH):      	0.698                                                                                                                             	
                           	
ECP Balance(sETH):         	
   Collateral:             	0.000                                                                                                                             	
   Escrow:                 	0.000                                                                                                                             	
FCP Balance(sETH):         	
   Collateral:             	0.500                                                                                                                             	
   Escrow:                 	0.000   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants