Skip to content

Commit

Permalink
Merge pull request #241 from dappnode/diego/update-readme
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
dsimog01 authored May 11, 2023
2 parents 14c834a + 5e34b8a commit 693e8da
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# StakingBrain

The StakingBrain is the main logical component for Staking in DAppNode. It includes both a UI and a lauchpad API to allow manual and automatic keystore management, not only for solo stakers, but also for DVT/LSD technologies.
Staking Brain is a critical logical component for Staking in DAppNode. It provides a user interface and a Launchpad API that allow manual and automatic keystore management. Designed to support not only solo stakers, but also DVT/LSD technologies, Staking Brain streamlines the staking process for all users.

This StakingBrain will be included inside the Web3Signer Packages available in DAppNode, so the 3 services that make up each of these packages are:
Within the Dappnode environment, Staking Brain is incorporated into the Web3Signer packages (gnosis, mainnet, and prater). It ensures that user configurations for validators are reliably maintained. Please note that Staking Brain does not store keystores itself, but ensures their storage in the web3signer. It also maintains consistency between the validator service and web3signer service, as the validator must recognize all the pubkeys of validators whose keystores have been imported into the signer.

Each Web3Signer package includes four services:

1. ConsenSys Web3Signer

2. DB (postgres)

3. Staking brain
3. Staking Brain

4. Flyway (runs only once when the package starts and then stops)

The new functionalities that the StakingBrain brings are:

1. Individual management of fee recipients

2. Management of validator tags (e.g., "solo", "obol", "rocketpool")

3. New UX features, such as an advanced mode for detailed validator status and a light/dark mode switch

1. Managing fee recipients individually

2. Managing validator tags (e.g. "solo", "obol", "rocketpool"...)

3. New UX features, like advanced mode for deeper information about validator status or light/dark mode switch
## Development Guide

Follow these steps to develop with Staking Brain:

## To develop
1. Connect to your DAppNode (which should be running an instance of web3signer and validator in a network, e.g., Prater).

1. Connect to your DAppNode (which needs to be running an instance of web3signer and validator in a network (e.g. Prater))
2. Clone the repository:

2. Clone the repo
```
git clone https://github.com/dappnode/StakingBrain
```
Expand All @@ -34,7 +41,7 @@ _DAPPNODE_GLOBAL_EXECUTION_CLIENT_PRATER="goerli-erigon.dnp.dappnode.eth"
_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_PRATER="prysm-prater.dnp.dappnode.eth"
```

### Local development
### A) Local development
4. Build and start development mode
```
yarn
Expand All @@ -47,7 +54,7 @@ yarn start:dev
http://localhost/?network=prater&signerUrl=http://web3signer.web3signer-prater.dappnode:9000/
```

### Docker development
### B) Docker development

4. Build and start docker development mode
```
Expand All @@ -58,7 +65,7 @@ docker-compose -f docker-compose-dev.yml up -d
docker logs -f brain (To watch status)
```

5. Look for container IP
5. Find the container IP
```
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' brain
```
Expand All @@ -68,18 +75,18 @@ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' brai
http://<obtainedIP>
```

### Recomendations for developing
### Development Recommendations

1. Access your dappnode using SSH and stop the brain container of your prater web3signer:
1. Connect to your DAppNode using SSH and stop the brain container of your Prater web3signer:

```
docker ps | grep brain
docker stop <brainContainerName>
```

_Note: If you don't stop the brain container the cron will remove your keystores every minute._
_Note: If you do not stop the brain container, the cron will remove your keystores every minute._

2. Download the SSH plugin in Visual Studio to develop in real time.
2. Install the SSH plugin in Visual Studio to develop in real time.

_Note: You'll need to install your VS plugins in the dappnode to use them._

0 comments on commit 693e8da

Please sign in to comment.