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

develop -> goerli #163

Merged
merged 63 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
18ff9bb
Move lido linters to checks.yml
ptqa Oct 19, 2023
2896930
Merge pull request #151 from lidofinance/feature/sre-698-checks-consi…
br3d Oct 30, 2023
849d33a
feat: duplicated vetted keys checks
Amuhar Nov 28, 2023
74ad736
feat: grafana and dev env
eddort Dec 5, 2023
c8b3d25
fix: stop deposits only for modules with duplicates; fix tests
Amuhar Dec 5, 2023
c14bc1e
fix: added more tests, fixed e2e
Amuhar Dec 6, 2023
4e73aad
fix: mocks
Amuhar Dec 6, 2023
8822aff
fix: added logs
Amuhar Dec 6, 2023
fe634ba
fix: added logs
Amuhar Dec 6, 2023
3ed5b4d
fix: added logs
Amuhar Dec 6, 2023
1476592
fix: operators e2e mock
Amuhar Dec 6, 2023
63be41d
fix: remove extra logs
Amuhar Dec 6, 2023
cab9f00
fix: mock
Amuhar Dec 6, 2023
ed95407
fix: rpc url in developer doc
eddort Dec 6, 2023
cfdb713
Merge pull request #154 from lidofinance/feat/VAL-460-add-grafana
eddort Dec 6, 2023
63c374a
fix: simplify duplicates search
Amuhar Dec 7, 2023
4831c7a
fix: invert condition
Amuhar Dec 8, 2023
66c5dc5
fix: made more readable checks
Amuhar Dec 8, 2023
1da8b70
feat: e2e test for new checks, fixed existing tests
Amuhar Dec 12, 2023
2bff312
fix: unit tests
Amuhar Dec 12, 2023
28e299a
feat: added keys-validation library and validation method
Amuhar Dec 13, 2023
3bdb364
fix: added validation check in guards checks
Amuhar Dec 13, 2023
c082cfd
fix: unit tests
Amuhar Dec 13, 2023
4b95c7f
fix: added cache
Amuhar Dec 14, 2023
409f7ab
fix: put valid deposits filter in separate check, added prom metrics
Amuhar Dec 14, 2023
1d49518
Merge branch 'feat/val-456-vetted-key-duplicates' into feat/val-462-e2e
Amuhar Dec 14, 2023
7339e39
Merge branch 'feat/val-462-e2e' into feat/val-457-keys-validation-mul…
Amuhar Dec 14, 2023
907f7cb
Merge branch 'feat/val-457-keys-validation-multithread' into feat/val…
Amuhar Dec 14, 2023
c09abd1
fix: added metric
Amuhar Dec 14, 2023
1b05072
Merge branch 'feat/val-495-add-validation-check' into feat/val-500-lr…
Amuhar Dec 14, 2023
fac284a
fix: cache
Amuhar Dec 14, 2023
9fce10b
fix: filter deposits
Amuhar Dec 14, 2023
faa2ec9
fix: cache and tests
Amuhar Dec 15, 2023
e57d74e
fix: isSameStakingModuleContractState check
Amuhar Dec 18, 2023
78ef859
Merge branch 'feat/val-495-add-validation-check' into feat/val-500-lr…
Amuhar Dec 18, 2023
8d260fd
fix: small fixes
Amuhar Dec 18, 2023
7c6f9dd
fix: tests & refactoring
Amuhar Dec 19, 2023
0ba171a
fix: refact
Amuhar Dec 19, 2023
cc051ec
Merge branch 'feat/val-495-add-validation-check' into feat/val-500-lr…
Amuhar Dec 19, 2023
8758649
fix: simple refactoring
Amuhar Dec 19, 2023
2e71f33
Merge branch 'feat/val-456-vetted-key-duplicates' into feat/val-462-e2e
Amuhar Dec 19, 2023
f290821
Merge pull request #155 from lidofinance/feat/val-462-e2e
Amuhar Dec 19, 2023
b7d7742
Merge pull request #158 from lidofinance/feat/val-500-lru-cache
Amuhar Dec 19, 2023
bdb8231
Merge pull request #157 from lidofinance/feat/val-495-add-validation-…
Amuhar Dec 19, 2023
898593f
fix: refactoring
Amuhar Dec 19, 2023
64b82e5
fix: simple refactoring
Amuhar Dec 19, 2023
b283465
fix: refactoring
Amuhar Dec 19, 2023
5af2277
Merge branch 'feat/val-456-vetted-key-duplicates' into feat/val-457-k…
Amuhar Dec 19, 2023
ac14b8d
fix: use of lastChangedBlockHash
Amuhar Dec 22, 2023
7ceb98c
Merge branch 'develop' into feat/val-456-vetted-key-duplicates
Amuhar Dec 22, 2023
f8e839f
Merge branch 'feat/val-456-vetted-key-duplicates' into feat/val-457-k…
Amuhar Dec 22, 2023
799194b
Merge branch 'feat/val-457-keys-validation-multithread' into feat/val…
Amuhar Dec 22, 2023
a0e457d
fix: build
Amuhar Dec 22, 2023
5256e5f
Merge pull request #160 from lidofinance/feat/val-497-kapi-reorg-fix
Amuhar Dec 22, 2023
8184154
Merge pull request #156 from lidofinance/feat/val-457-keys-validation…
Amuhar Dec 22, 2023
74bbee0
fix: refactoring and tests
Amuhar Dec 24, 2023
e4bddab
fix: condition for running invalid keys chek and tests
Amuhar Dec 25, 2023
483f6f4
fix: remov
Amuhar Dec 25, 2023
d8e7dfb
Merge pull request #152 from lidofinance/feat/val-456-vetted-key-dupl…
Amuhar Dec 26, 2023
bbdc745
fix: tests, invalid keys improvemnt
Amuhar Dec 27, 2023
c5a4e9d
fix: fixtures
Amuhar Dec 27, 2023
c773541
fix: added logs
Amuhar Dec 27, 2023
5b7c702
Merge pull request #162 from lidofinance/feat/invalid-keys-improvement
Amuhar Dec 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Tests and Checks

on: push

jobs:
security:
uses: lidofinance/linters/.github/workflows/security.yml@master
permissions:
security-events: write
contents: read
docker:
uses: lidofinance/linters/.github/workflows/docker.yml@master
actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master
12 changes: 0 additions & 12 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,3 @@ jobs:
env:
RPC_URL: ${{ secrets.RPC_URL }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}

security:
uses: lidofinance/linters/.github/workflows/security.yml@master
permissions:
security-events: write
contents: read

docker:
uses: lidofinance/linters/.github/workflows/docker.yml@master

actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,30 @@ info: New staking router state cycle end

## Development

### Copy env file for development and print your RPC_URL

```bash
cp develop.env ./.env
```

```diff
- RPC_URL=%NODE_URL%
+ RPC_URL=https://mainnet.infura.io/v3/***
```

### Starting the development environment (PostgreSQL, KAPI, Grafana, Prometheus, RabbitMQ)

```bash
docker-compose -f ./docker-compose.dev.yml up -d
```

### Run Council Daemon

```bash
# development
$ yarn start

# watch mode
# development watch mode
$ yarn start:dev
```

Expand Down Expand Up @@ -275,6 +294,8 @@ $ yarn test:e2e
$ yarn test:cov
```

To run e2e tests, ensure the RPC_URL environment variable is set to the Goerli provider's endpoint, and generate private keys, which should be subsequently set in the WALLET_PRIVATE_KEY variable.

## Release flow

To create a new release:
Expand Down
41 changes: 41 additions & 0 deletions develop.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# env from guide
# App
PORT=3003

# Log level: debug, info, notice, warning or error
LOG_LEVEL=info

# Log format: simple or json
LOG_FORMAT=simple

# Pubsub (default: rabbitmq)
PUBSUB_SERVICE=rabbitmq

# RabbitMQ

RABBITMQ_URL=ws://127.0.0.1:15674/ws
RABBITMQ_LOGIN=guest
RABBITMQ_PASSCODE=guest


# Private key
# Used to sign transactions and stop the protocol.
# Make sure there are enough ETH on the balance to send a transaction to stop the protocol
WALLET_PRIVATE_KEY="0x0000000000000000000000000000000000000000000000000000000000000001"

KEYS_API_HOST=http://127.0.0.1

# Keys API
KEYS_API_PORT=3002

# chain id
# for mainnet 1
CHAIN_ID=1
RPC_URL=%NODE_URL%

# KeysAPI DB config
KEYS_API_DB_NAME=keys_service_db
KEYS_API_DB_PORT=5453
KEYS_API_DB_HOST=localhost
KEYS_API_DB_USER=postgres
KEYS_API_DB_PASSWORD=postgres
52 changes: 29 additions & 23 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
version: '3.7'

services:
council_daemon_prometheus:
image: prom/prometheus:v2.44.0
container_name: council_daemon_prometheus
ports:
- 9090:9090
volumes:
- ./prometheus/:/etc/prometheus/
command: --config.file=/etc/prometheus/prometheus.yml --enable-feature=remote-write-receiver

council_daemon_grafana:
image: grafana/grafana-oss:9.1.5
container_name: council_daemon_grafana
restart: unless-stopped
ports:
- 8001:3000
volumes:
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
depends_on:
- council_daemon_prometheus

keys_api_service_db:
image: postgres:14-alpine
platform: linux/arm64/v8
Expand All @@ -16,7 +36,7 @@ services:
- ./.volumes/pgdata-${CHAIN_ID}/:/var/lib/postgresql/data

keys_api_service_api:
image: lidofinance/lido-keys-api:dev
image: lidofinance/lido-keys-api:0.10.1
platform: linux/amd64
container_name: keys_api_service_api
ports:
Expand All @@ -35,26 +55,12 @@ services:
- DB_PASSWORD=${KEYS_API_DB_PASSWORD}
depends_on:
- keys_api_service_db

council_daemon:
image: lidofinance/lido-council-daemon:dev
platform: linux/amd64
rabbitmq:
build:
context: .
dockerfile: Dockerfile.test.yml
container_name: 'rabbitmq'
ports:
- "${PORT}:3000" # port is used for prometheus metrics
environment:
- PORT=${PORT}
- LOG_LEVEL=debug
- LOG_FORMAT=json
- RPC_URL=${RPC_URL}
- WALLET_PRIVATE_KEY=${WALLET_PRIVATE_KEY}
- KEYS_API_HOST=http://keys_api_service_api
- KEYS_API_PORT=3001
- PUBSUB_SERVICE=rabbitmq
- RABBITMQ_URL=${RABBITMQ_URL}
- RABBITMQ_LOGIN=${RABBITMQ_LOGIN}
- RABBITMQ_PASSCODE=${RABBITMQ_PASSCODE}
- RABBITMQ_PASSCODE_FILE=${RABBITMQ_PASSCODE_FILE}
depends_on:
- keys_api_service_api
volumes:
- ./.volumes/cache/:/council/cache/
- 5672:5672
- 15672:15672
- 15674:15674
22 changes: 22 additions & 0 deletions docker-compose.metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.7'

services:
council_daemon_prometheus:
image: prom/prometheus:v2.44.0
container_name: council_daemon_prometheus
ports:
- 9090:9090
volumes:
- ./prometheus/:/etc/prometheus/
command: --config.file=/etc/prometheus/prometheus.yml --enable-feature=remote-write-receiver

council_daemon_grafana:
image: grafana/grafana-oss:9.1.5
container_name: council_daemon_grafana
restart: unless-stopped
ports:
- 8001:3000
volumes:
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
depends_on:
- council_daemon_prometheus
15 changes: 15 additions & 0 deletions grafana/datasources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
access: proxy
orgId: 1
url: http://docker.for.mac.host.internal:9090
basicAuth: false
isDefault: true
editable: true
jsonData:
graphiteVersion: '1.1'
tlsAuth: false
tlsAuthWithCACert: false
Loading