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

Fix/deploy #275

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM node:14.18.1-alpine3.13 as building
FROM node:18.14.2-alpine3.16 as building


# needed for git dependencies
RUN apk update && apk upgrade && \
apk add --no-cache bash=5.1.16-r0 git=2.30.6-r0 openssh=8.4_p1-r4 python3=3.8.15-r0 make=4.3-r0 g++=10.2.1_pre1-r3
apk add --no-cache git=2.36.6-r0

RUN mkdir /council

Expand All @@ -19,7 +20,7 @@ RUN yarn install --frozen-lockfile --non-interactive && yarn cache clean

RUN yarn typechain && yarn build

FROM node:14.18.1-alpine3.13
FROM node:18.14.2-alpine3.16

ENV PORT=

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: '3.9'

services:
council_daemon_prometheus:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.metrics.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: '3.9'

services:
council_daemon_prometheus:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: '3.9'

services:
zookeeper:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: '3.9'

services:
keys_api_service_db:
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"cache:clear": "rimraf cache"
},
"dependencies": {
"@chainsafe/blst": "^0.2.4",
"@chainsafe/ssz": "^0.9.2",
"@chainsafe/blst": "2.2.0",
"@chainsafe/ssz": "0.18.0",
"@ethersproject/providers": "5.7.2",
"@lido-nestjs/fetch": "^1.3.1",
"@lido-nestjs/key-validation": "^7.4.0",
"@lido-nestjs/key-validation": "^8.0.0",
"@lido-nestjs/middleware": "^1.1.1",
"@lido-sdk/constants": "^3.2.1",
"@nestjs/common": "^8.0.0",
Expand Down Expand Up @@ -74,7 +74,7 @@
"@types/app-root-path": "^1.2.4",
"@types/cache-manager": "^3.4.3",
"@types/glob": "^8.1.0",
"@types/jest": "^27.0.1",
"@types/jest": "^29.5.14",
"@types/kafkajs": "^1.9.0",
"@types/node": "^16.0.0",
"@types/supertest": "^2.0.11",
Expand All @@ -86,11 +86,11 @@
"eslint-plugin-prettier": "^3.4.0",
"ganache": "7.9.0",
"hardhat": "^2.22.14",
"jest": "^27.0.6",
"jest": "^29.7.0",
"pg": "^8.13.0",
"prettier": "^2.3.2",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
"ts-jest": "^29.2.5",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.10.1",
Expand Down
19 changes: 0 additions & 19 deletions test/helpers/docker-containers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,25 +169,6 @@ async function pullAndCreateKapiContainer(docker: Docker) {
const exposedHosts =
process.platform === 'linux' ? {} : { ExposedPorts: { '3000/tcp': {} } };

console.log({
Image: KAPI_IMAGE,
name: KAPI_CONTAINER,
Env: [
'NODE_ENV=production',
'DB_NAME=node_operator_keys_service_db',
'DB_PORT=5432',
`DB_HOST=${DB_HOST}`,
'DB_USER=postgres',
'DB_PASSWORD=postgres',
`PROVIDERS_URLS=${HARDHAT_URL}`,
'VALIDATOR_REGISTRY_ENABLE=false',
`CHAIN_ID=${CHAIN_ID}`,
'CL_API_URLS=',
],
...exposedHosts,
HostConfig: hostConfig,
});

// Create and configure the PostgreSQL container
const container = await docker.createContainer({
Image: KAPI_IMAGE,
Expand Down
15 changes: 9 additions & 6 deletions test/helpers/dsm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ export async function deposit(moduleId: number) {

const lidoVotingSigner = LidoAbi__factory.connect(lidoAddress, votingSigner);

await lidoVotingSigner.setStakingLimit(
ethers.utils.parseEther('120000'), // _maxStakeLimit
ethers.utils.parseEther('120000'), // _stakeLimitIncreasePerBlock
);

const unfinalizedStETHWei = await withdrawalQueue.unfinalizedStETH();
const depositableEtherWei = await lido.getBufferedEther();

Expand All @@ -110,10 +105,18 @@ export async function deposit(moduleId: number) {
.add(ethers.utils.parseEther('100000'));
const amountForDepositsInEth = ethers.utils.formatEther(amountForDeposits);

transferEther(lidoAddress, amountForDepositsInEth);
await lidoVotingSigner.setStakingLimit(
ethers.utils.parseEther(amountForDepositsInEth), // _maxStakeLimit
ethers.utils.parseEther(amountForDepositsInEth), // _stakeLimitIncreasePerBlock
);

await new Promise((res) => setTimeout(res, 12000));

await transferEther(lidoAddress, amountForDepositsInEth);

await new Promise((res) => setTimeout(res, 12000));

//TODO: check how many keys waiting deposit
const tx = await lido.deposit(1, moduleId, new Uint8Array());

await tx.wait();
Expand Down
Loading
Loading