Skip to content

Skate-Org/AVS

Repository files navigation

Skate AVS services

Built with target:


Quick start for operators

Hardware/Software requirements

Specification Details
Operating System Linux x86-64
vCPUs 2
Memory 8 GiB
Storage 256 GB
AWS EC2 Equivalent m5.large
Network requirements
+ Download Bandwidth Usage <20 Mbps
+ Upload Bandwidth Usage <20 Mbps

Onchain asset

Holesky testnet

Strategy Minimum staked
stETH 0.01 ETH

Key set up using CLI tool (Skate-KMS) [Optional]

NOTE: If you already have a geth compatible keystore file generated by any other methods, skip this part

Skate Key Management Service (KMS) is an utility tool to create and store encrypted private keys on your local machine.

Packages: https://github.com/orgs/Skate-Org/packages/container/package/skate-kms.

Pull using:

docker pull ghcr.io/skate-org/skate-kms:latest

Images is built from source code at ./kms, see tag for exact commit.

To run, run the docker process with desired keystore mounted to image's /keystore

docker run --rm -i -v [local_folder_of_keystore]:/keystore ghcr.io/skate-org/skate-kms:latest store \
-p [password to unlock keystore file] -k [hexstring of privatekey WITHOUT '0x' prefix] \
[OPTIONAL] [local_config_for_signer]:/configs/signer/[path_to_save] -s [path_to save]

Example for wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 with private key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

docker run --rm -i -v ./keystore:/keystore -v ./configs/signer:/configs/signer \
ghcr.io/skate-org/skate-kms:latest store \
-p hello_world -k ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
-s operator/1

WARNING ⚠️ - NEVER LEAK THE FILES IN ./keystore. Wallet provided below are known for public testing, don't use it public environments

Operator processes

Packages: https://github.com/orgs/Skate-Org/packages/container/package/skate-operator.

Pull using:

docker pull ghcr.io/skate-org/skate-operator:latest

Images is built from source code at ./operator, see tag for exact commit.

Set up

  1. Prepare a keystore folder contains geth compatible keystore file using "StandardScryptN" and "StandardScryptP" for encryption. Can be created by following this guideline or using skate-kms CLI tool (see above)

  2. Set up environment and signer: prepare a configs folder:

    • IMPORTANT: Copy the format of "./configs" folder in this repo (contains information for skate-testnet and directory structure for operator)
    • Create a YAML config for signer following this format
    # configs/signer/operator/1.yaml
    address: [your_operator_addres]
    passphrase: [passphrase_to_unlock_keystore]

Run the processes

Once set up, run the docker image with mounted keystore and configs folders using following format. Ensure that configs folder includes specs for Skate-AVS under configs/environment/*.yaml

docker run --rm -i -v [your_local_keystore]:/keystore -v [your_local_configs]:/configs \
ghcr.io/skate-org/skate-operator:latest [operator_cmd] [...options]

The following commands set [your_local_keystore]="./keystore" and [your_local_configs]="./configs" following the above set up (in step 1), i.e. command is invoked in the same directory with keystore and configs folder.

The signer is set to configs/signer/operator/1.yaml using format in the set up above.

NOTE: for customization, change according to your set up

1. Register operator with Eigenlayer

Following Eigenlayer guideline https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation#operator-configuration-and-registration.

Or using skate-operator image

docker run --rm -i -v ./keystore:/keystore -v ./configs:/configs \
ghcr.io/skate-org/skate-operator:latest register-el \
--signer-config 1

NOTE: This register an address to EigenLayer with no metadata, follow official guidelines to customize

2. Deposit stETH to EigenLayer Strategy manager

NOTE: Skip this step if your wallet already have stETH restaked in EigenLayer

  1. Get stETH, e.g. by calling submit from stETH contract. Minimum 0.01 stETH.

  2. Deposit with skate-operator image

docker run --rm -i -v ./keystore:/keystore -v ./configs:/configs \
ghcr.io/skate-org/skate-operator:latest deposit \
--signer-config 1

3. Register Operator with Skate-AVS

docker run --rm -i -v ./keystore:/keystore -v ./configs:/configs \
ghcr.io/skate-org/skate-operator:latest register-avs \
--signer-config 1

NOTE: Testnet - check the registration status by calling isOperator from Skate AVS contract on Holesky

4. Participate in monitoring tasks

docker run --rm -i -v ./keystore:/keystore -v ./configs:/configs \
ghcr.io/skate-org/skate-operator:latest monitor \
--signer-config 1

This will run the operator process that:

  1. Monitor all tasks that submitted to SkateApp
  2. Encoded them using Skate standard
  3. Sign the task
  4. Send the signatures to our relayer at relayer.skatechain.org

NOTE: Detailed logic for signing and broadcasting at operator/monitor/skateapp.go


From sources

CLI tools

All CLI tools come with help, if you are curious about how things work underneath. Try

go run <service>/main.go <action> -h

for example:

go run kms/main.go store -h

@For dev - entry point for each service is invoked from <service>/cmd/cmd.go, traceback logic from there

I. Configuring accounts

Key management service (kms) is an utility tool following the geth guideline

To run, start with:

go run kms/main.go store -p <passphrase> -k <account_private_key> [OPTIONAL] -s <save_path>

Key information will be dumped in ./keystore folders and used for subsequent services.

WARNING ⚠️ - NEVER LEAK THE FILES IN ./keystore

II. Register Operator to Skate AVS

Command for Operator onboarding

Step 1: Register with EigenLayer to become an operator

go run operator/main.go register-el -h

see ./operator/cmd/register.go:registerAvsCmd(..) for full logic and options.

Default run with:

  • environment: configs/environment/testnet.yaml
  • signer: configs/signer/operator/1.yaml

populate signer config for auto account import, else manually specify --signer-address and --passphrase

Step 2: Deposit into token strategy

  1. AVS required minimum shares/stakes allowance to opt-in. Skate AVS (holesky testnet) uses stETH as the underlying token strategy. Get stETH buy calling submit function (recommend amount: 0.01 ETH)

  2. Once stETH is obtained, deposit into EigenLayer StrategyManager.

go run operator/main.go deposit -h

Default value from config is the minimum required to participate in Skate AVS

Follow the same step to customize environments as in step 1

Step 3: Register with Skate AVS

go run operator/main.go register-avs -h

Default options is good, same environments configuration as in step 1.

NOTE: Default Operator details don't include any metadata URI. Other initialize params specified in operator/cmd/register.go:L126

III. Running Operator services

Operator will monitor Skate App (on Nollie testnet) activity and sign confirmation message then publish to relayer.

Cache is maintained locally on operator environments, db config in operator/db/**. By default an SQLite db will be created under data/operator/skateapp.db, files logs for schemas maintained in the same folder.

To participate (sign and publish task), run:

go run operator/monitor.go

NOTE: Follow default signer configs. if no signer provided, run with watch only-mode (no sign and publish to relayer)

IV. Running Relayer services

Relayer will collect operator signatures, aggregates and send over to AVS for confirmation (see SkateAVS.sol:submitData(...))

  1. Retrieve operator signatures for a task and store in database

    go run relayer/main.go retrieve
  2. Publish verified quorums to AVS and settle on Gateway contract

    go run relayer/main.go publish

To start all relayer service (retrieve and publish)

make start-relayer

Quick start

Make files ./Makefile contains shortcut to bootstrap pilot avs services. Please explore and config respective nodes using designated CLI tools

Prerequisites: 3 operator accounts registered with avs and 1 relayer

  1. Start all 3 operators:
make start-operators

Deployment info

Testnet

See configs/environment/testnet.yaml