Skip to content

Commit

Permalink
Merge pull request #6 from mangata-finance/feature/update-v0.2
Browse files Browse the repository at this point in the history
update to v0.2
  • Loading branch information
vanderian authored Feb 29, 2024
2 parents c83b893 + 0e8f5b2 commit e4705b7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 24 deletions.
33 changes: 22 additions & 11 deletions .env
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
MAIN_SERVICE_IMAGE=mangatasolutions/operator:81e0a3189fd9c3fef96db0f16ef017e0eab6d97c
CLI_SERVICE_IMAGE=mangatasolutions/avs-cli:81e0a3189fd9c3fef96db0f16ef017e0eab6d97c
MAIN_SERVICE_NAME=mangata-finalizer-node
MAIN_SERVICE_IMAGE=mangatasolutions/avs-finalizer:80ac399c2c2f103dd8de1be62c114d5090cd11cd
MAIN_SERVICE_NAME=avs-finalizer-node

# Goerli contracts deployment
BLS_PUBLIC_KEY_COMPENDIUM=0xc81d3963087Fe09316cd1E032457989C7aC91b19
BLS_OPERATOR_STATE_RETRIEVER=0x737Dd62816a9392e84Fa21C531aF77C00816A3a3
AVS_SERVICE_MANAGER=0xD2333E11ea617E30fb97900f6ac9782A85f233e7
AVS_REGISTRY_COORDINATOR_ADDR=0x5620cDb94BaAaD10c20483bd8705DA711b2Bc0a3

# Mangata Finalizer Service Manager RPC
AGGREGATOR_RPC_URL=eigen-aggregator-rpc-goerli.mangata.online:8090
# Finalizer Service Manager RPC
AVS_RPC_URL=https://avs-aggregator-testnet.mangata.online/
# register with AVS when the node starts
OPT_IN_AT_STARTUP=true

RUST_LOG=avs=info

###############################################################################
####### TODO: Operators please update below values for your node ##############
###############################################################################

# TODO: Operators need to update this to provide connection to ETH & Mangata network nodes
# TODO: Operators need to update this to provide connection to ETH & network nodes
CHAIN_ID=5
ETH_RPC_URL=
ETH_WS_URL=
SUBSTRATE_RPC_URL=wss://kusama-archive.mangata.online
SUBSTRATE_RPC_URL=wss://collator-01-ws-rollup-testnet.mangata.online:443

# TODO: Operators need to update this to their own keys
# TODO: Operators need to update this to their own keys, either use files or encoded JSON
# this is where your keys are stored on local storage
ECDSA_KEY_FILE_HOST=~/.eigenlayer/operator_keys/ecdsa.key.json
BLS_KEY_FILE_HOST=~/.eigenlayer/operator_keys/bls.key.json

# this is where the node binary finds the keys in the docker container
ECDSA_KEY_FILE=/app/operator_keys/ecdsa_key.json
BLS_KEY_FILE=/app/operator_keys/bls_key.json

# it is possible to pass the encoded json key directly with these env flags
# comment above both ECDSA_KEY_FILE & BLS_KEY_FILE if used
# ECDSA_KEY_JSON=
# BLS_KEY_JSON=

# TODO: Operators need to add password to decrypt the above keys
ECDSA_KEY_PASSWORD=
BLS_KEY_PASSWORD=
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Installation of Mangata Finalizer Operator using docker
## Installation of Finalizer Operator using docker

AVS Service Contract: [0xD2333E11ea617E30fb97900f6ac9782A85f233e7](https://goerli.etherscan.io/address/0xD2333E11ea617E30fb97900f6ac9782A85f233e7)
AVS Registry Contract: [0x5620cDb94BaAaD10c20483bd8705DA711b2Bc0a3](https://goerli.etherscan.io/address/0x5620cDb94BaAaD10c20483bd8705DA711b2Bc0a3)

### Prerequisites:
* Docker installed
Expand All @@ -11,7 +11,7 @@ AVS Service Contract: [0xD2333E11ea617E30fb97900f6ac9782A85f233e7](https://goerl
### Core operations
* Register your operator to eigenlayer using [Eigenlayer CLI](https://github.com/Layr-Labs/eigenlayer-cli)
* Deposit your stake at [Eigenlayer App](https://goerli.eigenlayer.xyz/), see [Eigenlayer stake guide](https://docs.eigenlayer.xyz/restaking-guides/restaking-user-guide) for more info\
Mangata AVS currently supports rETH & stETH as LSTs, with minimum of `0.000001` ETH for operator registration
AVS supports all tokens provided by EigenLayer, with minimum of `1 ETH` stake for operator registration

### Setup Operator
The easiest way to set up is to clone the repo and follow the instructions below.
Expand All @@ -25,12 +25,12 @@ chmod +x run.sh
```
Update the `TODO` sections in the `.env` file given in the root directory of the repository with your own details:

### Opt-in into Mangata AVS
### Opt-in into AVS
```bash
./run.sh opt-in
```

### Run MangataFinalizer Operator
### Run Finalizer Operator
Execute the following command to start the docker containers:
```
docker compose up -d
Expand All @@ -43,13 +43,13 @@ Tear down container
```bash
docker compose down
```
### Opt-out into Mangata AVS
### Opt-out into AVS
```bash
./run.sh opt-out
```
### Upgrade your node

Upgrade the AVS software for your Mangata Finalizer service setup by following the steps below:
Upgrade the AVS software for your Finalizer service setup by following the steps below:

**Step 1:** Pull the latest repo

Expand Down
12 changes: 6 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ optIn() {
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${CLI_SERVICE_IMAGE} \
register-operator-with-avs
${MAIN_SERVICE_IMAGE} \
opt-in-avs
}

optOut() {
docker run --env-file .env \
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${CLI_SERVICE_IMAGE} \
deregister-operator-with-avs
${MAIN_SERVICE_IMAGE} \
opt-out-avs
}

status() {
docker run --env-file .env \
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${CLI_SERVICE_IMAGE} \
print-operator-status
${MAIN_SERVICE_IMAGE} \
print-status
}

if [ "$1" = "opt-in" ]; then
Expand Down

0 comments on commit e4705b7

Please sign in to comment.