Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
5923fdf
Merge pull request #524 from lidofinance/master
iamnp Oct 14, 2025
1f3a3ea
feat: nov omni draft
Oct 16, 2025
687e9ca
feat: pack all agent items into single agent_forward
Oct 17, 2025
e1860bb
Rename vote_2025_11_17.py to _vote_2025_11_17.py
iamnp Oct 17, 2025
b54dd7e
Rename _vote_2025_11_17.py to vote_2025_11_17.py
iamnp Oct 17, 2025
72dc298
fix: test template
Oct 17, 2025
797485d
feat: test draft
Oct 17, 2025
7311289
feat: update test template
Oct 17, 2025
557ac2e
fix: sdvt share limit
Oct 18, 2025
f0d67d2
feat: tests
Oct 19, 2025
b78c0d6
feat: tests (ii)
Oct 19, 2025
1982955
fix: update time retrieval method and enhance depositable node operat…
skhomuti Oct 21, 2025
8c04845
chore: fix ao extra data tests
F4ever Oct 21, 2025
de081d4
fix: remove print
Oct 22, 2025
8faa3b3
fix: sdvt tests
Oct 22, 2025
aa98877
fix: set up separate node for tests
Oct 22, 2025
a43db45
fix: set up separate node for tests
Oct 22, 2025
232bbc7
fix: remove unused var
Oct 24, 2025
e603e51
fix incorrect logic for counting depositable keys in csm tests
skhomuti Oct 24, 2025
f0a197f
fix: sdvt stakeShareLimit to 430 bps
Oct 26, 2025
11c71ed
fix: 17 nov -> 24 nov
Oct 27, 2025
0c45f4a
fixes
Oct 29, 2025
df0b31b
Merge pull request #525 from lidofinance/omni-nov
iamnp Oct 29, 2025
4c03be1
fix missed pause modules for receiving deposits to csm directly
skhomuti Oct 30, 2025
99de587
Merge pull request #528 from lidofinance/fix-pause-modules
iamnp Oct 30, 2025
d3d62db
chore: init v3 vote files
dry914 Oct 30, 2025
f2f5196
Merge branch 'feat/next-vote' into feat/v3-vote
dry914 Oct 30, 2025
3942d63
feat: add draft voting script
dry914 Oct 31, 2025
900b3e1
chore: rename script
dry914 Oct 31, 2025
07dc92e
fix: matic recipient
Nov 6, 2025
1af6bca
feat: single voting script
dry914 Nov 6, 2025
69039c7
fix: items order & items desc & DG desc
Nov 7, 2025
2f27d94
Merge pull request #531 from lidofinance/master
iamnp Nov 7, 2025
fe35b91
tests: remove legacy oracle tests, fix locator tests
dry914 Nov 12, 2025
decc269
test: fix lido tests
dry914 Nov 13, 2025
e5dd742
test: fix accounting oracle tests
dry914 Nov 13, 2025
ef5489e
Update TRP_ALREADY_SPENT_BEFORE value in test
iamnp Nov 14, 2025
f76a035
Merge pull request #534 from lidofinance/trp-fix
iamnp Nov 14, 2025
9a4c2ed
feat: make emitted by checks mandatory
Nov 14, 2025
431ef58
do not pass DG event emitters
iamnp Nov 14, 2025
d0fef51
do not pass is_dg_event
iamnp Nov 14, 2025
8f0c8ef
test: fix accounting tests
dry914 Nov 14, 2025
4da2cb6
tests: v3 mainnet test deployment
dry914 Nov 17, 2025
266abd5
Merge pull request #537 from lidofinance/emitted-by-fix-2
iamnp Nov 18, 2025
dc8cdac
test: add 0.8.25 solidity
dry914 Nov 18, 2025
2370133
Update Docker image version in README
iamnp Nov 18, 2025
25dbb5b
test: fix burner tests
dry914 Nov 18, 2025
7a0cc08
test: fix sanity checks tests
dry914 Nov 20, 2025
4d9aa8c
test: fix paused_staking_module_can_reward
dry914 Nov 20, 2025
84017fb
test: fix a few snapshot tests
dry914 Nov 21, 2025
4306f1d
feat: added sUSDS
iamnp Nov 25, 2025
e046525
tests: fix snapshot tests
dry914 Nov 25, 2025
fd93fb2
test: clean v3 vote test
dry914 Nov 25, 2025
38d0e9a
chore: voting script
dry914 Nov 25, 2025
62d8886
feat: more voting items
iamnp Nov 25, 2025
404fce6
chore: fix voting items numeration
dry914 Nov 25, 2025
49698da
fix: cm fees
iamnp Nov 25, 2025
5adb36a
tests: fix skipped reggression tests
dry914 Nov 25, 2025
ed75ff7
fix incorrect treasury fee calculations for curated
skhomuti Nov 26, 2025
f7ee713
fix: descs
iamnp Nov 26, 2025
d48bb79
fix: descs
iamnp Nov 26, 2025
4371ca0
fix: descs
iamnp Nov 26, 2025
8d6e905
fix: sUSDS checks
iamnp Nov 27, 2025
4c0eaa0
fix: sUSDS checks
iamnp Nov 27, 2025
9a51ced
Merge pull request #539 from lidofinance/omni-fix
iamnp Nov 27, 2025
2057609
tests: new mainnet deployments + rebaseNotifier tests
dry914 Nov 28, 2025
0a86c38
test: fix pause test
dry914 Nov 28, 2025
4f44854
fix: added variables
iamnp Nov 28, 2025
fa712b3
test: add V3 permisions checks
dry914 Nov 28, 2025
1c11862
feat: add 4 stonks factories
iamnp Nov 29, 2025
51595f3
feat: add stonks perms
iamnp Nov 29, 2025
2385aa7
feat: add stonks perms tests
iamnp Nov 29, 2025
a183e3d
Update stake share limit terminology from 'bps' to 'BP'
iamnp Nov 30, 2025
4ed1f05
tests: add 101225 test case
dry914 Nov 30, 2025
cf68a73
tests: add v3 test checks
dry914 Nov 30, 2025
9caddb8
Merge pull request #540 from lidofinance/dec-omni
iamnp Dec 1, 2025
9897332
chore: DG items desc
dry914 Dec 1, 2025
5d67822
test: remove redundant roles checks
dry914 Dec 2, 2025
8a18b86
test: add V3Template events checks
dry914 Dec 2, 2025
b184fc2
fix: items order
iamnp Dec 2, 2025
53e7da2
Merge branch 'feat/next-vote' into omni-fix2
iamnp Dec 2, 2025
1494ba6
Merge pull request #541 from lidofinance/omni-fix2
iamnp Dec 2, 2025
10b4e09
ci: add runners for core and dg tests
tamtamchik Dec 2, 2025
563ad4d
feat: add v3 pre-deplyment artifacts
tamtamchik Dec 2, 2025
7690f2b
fix: push state file to runner
tamtamchik Dec 2, 2025
357b23c
feat: trace
tamtamchik Dec 2, 2025
1a8d3f1
feat: pass latest block to the core tests
tamtamchik Dec 2, 2025
7b35c5e
feat: bump node
tamtamchik Dec 2, 2025
f53c2ec
test: update V3 test
dry914 Dec 2, 2025
97f59c7
feat: bump node version
tamtamchik Dec 2, 2025
ba0c20e
chore: remove trace
tamtamchik Dec 2, 2025
4e318c9
Merge branch 'feat/v3-vote' into feat/v3-vote-ci
tamtamchik Dec 2, 2025
ee8274a
feat: add a41 soft limit reset
iamnp Dec 2, 2025
c0db5cd
feat: add a41 soft limit reset (ii)
iamnp Dec 2, 2025
2c92aa8
feat: add a41 soft limit reset (iii)
iamnp Dec 2, 2025
7a7a649
fix: fix tests
iamnp Dec 2, 2025
34c325a
chore: use develop branch for core tests
tamtamchik Dec 2, 2025
77fd574
fix: desc
iamnp Dec 3, 2025
3945f64
Merge pull request #543 from lidofinance/a41
kate-aleksseeva Dec 3, 2025
8e31639
feat: addresses from V3 mainnet deployment
dry914 Dec 3, 2025
54b92a6
Merge branch 'feat/next-vote' of into feat/v3-vote
dry914 Dec 4, 2025
556e7d9
fix: removed Stonks factories
iamnp Dec 4, 2025
ff0d0f6
fix: multiple dg proposals
dry914 Dec 4, 2025
b7f184c
tests: add new test cases
dry914 Dec 4, 2025
41804cf
fix: shared testing
iamnp Dec 4, 2025
64d323a
ga fixes
iamnp Dec 4, 2025
44c7193
ga fixes ii
iamnp Dec 4, 2025
f43b7d5
fixed sdvt values
iamnp Dec 4, 2025
da19efc
feat: add helper funcs for orderly vote enactment for regression tests
iamnp Dec 4, 2025
e46e80b
fix: refactoring
iamnp Dec 4, 2025
d19c4f0
test: fix snapshot tests
dry914 Dec 4, 2025
0ed55e1
test: try to fix permissions timeout
dry914 Dec 4, 2025
4f06df7
fix: TRP reset rem
iamnp Dec 5, 2025
15a72e0
test: update docker file
dry914 Dec 5, 2025
e590478
tests: fix snap test
dry914 Dec 5, 2025
bf5201a
feat: use latest contracts
tamtamchik Dec 5, 2025
1a1b374
feat: restore dockerfile
tamtamchik Dec 5, 2025
ca873e4
chore: add some polishing to makefile
tamtamchik Dec 5, 2025
b2c1789
Fix prevExitRequestLimit comparison in gateseal twg test
hweawer Dec 5, 2025
bf36dde
Merge pull request #546 from lidofinance/fix/fix-gateseal-twg-test
dry914 Dec 5, 2025
87ad5a8
Merge pull request #545 from lidofinance/trp-reset-rem
dry914 Dec 5, 2025
2c0115a
fix: order for dup events
iamnp Dec 5, 2025
4bff684
Update Docker image version in README
iamnp Dec 5, 2025
001b256
feat: dual governance regressions with lido v3 support
bulbozaur Dec 5, 2025
1015f51
Merge branch 'feat/v3-vote' into fix-arg-order
iamnp Dec 5, 2025
48fe540
test: update v3 vote test
dry914 Dec 5, 2025
1785e34
refactoring
iamnp Dec 6, 2025
5cad525
refactoring (ii)
iamnp Dec 6, 2025
f589bb0
Merge pull request #547 from lidofinance/fix-arg-order
iamnp Dec 6, 2025
929157b
fix: ci timeout + descs
iamnp Dec 6, 2025
1f3895f
fix: README
iamnp Dec 6, 2025
594f187
test: add new Lido slots snap tests
dry914 Dec 6, 2025
db673a6
fix: descs
iamnp Dec 6, 2025
da2e314
Merge pull request #548 from lidofinance/ci-descs
dry914 Dec 6, 2025
4b0f8f7
feat: restore FORKING_BLOCK_NUMBER var
tamtamchik Dec 6, 2025
0f76bea
chore: debug VaultNotFactoryDeployed error
tamtamchik Dec 6, 2025
bc0d79a
fix: lego ldo spendable balance value
iamnp Dec 6, 2025
cc831bd
Merge branch 'feat/v3-vote' into feat/v3-vote-ci
tamtamchik Dec 6, 2025
e2a76e6
chore: switch back to develop
tamtamchik Dec 6, 2025
1209698
fix for 2 scripts for core repo tests
iamnp Dec 6, 2025
48f80d6
fix: add ETHERSCAN_TOKEN to core tests run
iamnp Dec 6, 2025
2fcae2f
fix: add mfh-1 network for dg tests
iamnp Dec 6, 2025
a4fee03
brownie network import for dg tests
iamnp Dec 6, 2025
c405d9c
brownie network import for dg tests
iamnp Dec 6, 2025
c729abf
etherscan token for dg tests
iamnp Dec 6, 2025
617bf72
fix wait loop in core tests
iamnp Dec 6, 2025
53bd54f
logs
iamnp Dec 6, 2025
0dc47ce
change network for core tests
iamnp Dec 6, 2025
041586b
fix: vote time sleep
iamnp Dec 6, 2025
5611fcf
sleep for fork in core tests
iamnp Dec 6, 2025
88bf692
chore: clean tests
dry914 Dec 6, 2025
c371de4
Merge pull request #542 from lidofinance/feat/v3-vote-ci
iamnp Dec 6, 2025
df3476b
fix: CI branches
iamnp Dec 6, 2025
4bd85b0
Merge pull request #529 from lidofinance/feat/v3-vote
iamnp Dec 7, 2025
2e97644
test: add 1.2 state checks
dry914 Dec 8, 2025
8c437e7
test: review fixes
dry914 Dec 8, 2025
d5fbdfe
test: add periodsLength var handle
dry914 Dec 8, 2025
e4346ad
fix: trp tests
iamnp Dec 8, 2025
18b3e23
feat: update vote script address
dry914 Dec 8, 2025
e28f6d3
test: new gate seal cases
dry914 Dec 8, 2025
b2fda95
test: fix stranger issue
dry914 Dec 8, 2025
e2764c9
tests: review fixes
dry914 Dec 8, 2025
bfbcde0
test: add ET tests
dry914 Dec 8, 2025
e1730ee
test: add chain revert
dry914 Dec 9, 2025
ed30f8a
add socialize_bad_debt test
dry914 Dec 9, 2025
fb0e95f
fix: TRP ET limit tests
iamnp Dec 9, 2025
fc06b33
test: optional v3 et tests
dry914 Dec 9, 2025
2e4153f
feat: autofetch_sources: false
dry914 Dec 9, 2025
f84b0b2
test: fix snap tests
dry914 Dec 9, 2025
e74f023
test: fix set_balance_in_wei
dry914 Dec 9, 2025
2f283e2
feat: pdg paused
dry914 Dec 10, 2025
d6c21be
fix: download solc via CI
iamnp Dec 10, 2025
1671279
fix: download solc for CI
iamnp Dec 10, 2025
70472c1
fix: download solc for CI
iamnp Dec 10, 2025
93fb9e8
fix: download solc for CI
iamnp Dec 10, 2025
5d25f0d
fix: download solc for CI
iamnp Dec 10, 2025
0f2a093
fix: download solc for CI
iamnp Dec 10, 2025
a61de6e
fix: download solc for CI
iamnp Dec 10, 2025
bcd9fed
fix: download solc for CI
iamnp Dec 10, 2025
8076b31
fix: download solc for CI
iamnp Dec 10, 2025
f9d9e77
fix: download solc for CI
iamnp Dec 10, 2025
5370bd6
fix: download solc for CI
iamnp Dec 10, 2025
b48c2c5
fix: download solc for CI
iamnp Dec 10, 2025
5656077
fix: download solc for CI
iamnp Dec 10, 2025
f688fa0
fix: download solc for CI
iamnp Dec 10, 2025
b0e6a8f
fix: download solc for CI
iamnp Dec 10, 2025
5347e80
fix: download solc for CI
iamnp Dec 10, 2025
8e1ad9c
fix: download solc for CI
iamnp Dec 10, 2025
fafb493
fix: download solc for CI
iamnp Dec 10, 2025
ead89f8
fix: download solc for CI
iamnp Dec 10, 2025
f3975a0
fix: download solc for CI
iamnp Dec 10, 2025
2d51ce6
fix: download solc for CI
iamnp Dec 10, 2025
bcbbde4
fix: download solc for CI
iamnp Dec 10, 2025
8b877f2
Merge pull request #560 from lidofinance/ci-solc-download
iamnp Dec 10, 2025
47cbef0
test: v3 voting review fixes
dry914 Dec 10, 2025
d0a812e
test: refactor v3 et tests
dry914 Dec 10, 2025
3dd790b
rename to votings to 15 dec
dry914 Dec 10, 2025
9f77204
Merge pull request #558 from lidofinance/feat/v3-vote-fixes
iamnp Dec 10, 2025
baa4886
fix-tests-solc-url
iamnp Dec 12, 2025
12934a4
fix: python var
iamnp Dec 12, 2025
6b2aa9c
Merge pull request #561 from lidofinance/fix-tests-solc-url
iamnp Dec 12, 2025
0ae2abc
fix: a41 test
iamnp Dec 12, 2025
62115f9
Merge pull request #562 from lidofinance/fix-a41-test
iamnp Dec 12, 2025
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
31 changes: 22 additions & 9 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "feat/rc2"
- "feat/rc1"
- "feat/next-vote"
- "feat/v3-vote"
schedule:
- cron: "0 0 * * TUE"

Expand All @@ -19,11 +20,10 @@ jobs:
timeout-minutes: 120

services:

tests-runner:
image: ghcr.io/lidofinance/scripts:v19
image: ghcr.io/lidofinance/scripts:v21
ports:
- 8546:8546
- 8545:8545
volumes:
- ${{ github.workspace }}:/root/scripts
options: >-
Expand All @@ -34,25 +34,38 @@ jobs:
uses: actions/checkout@v4

- name: Run init script
run: docker exec -e CORE_BRANCH tests-runner bash -c 'make init'
run: docker exec -e CORE_BRANCH tests-runner bash -c 'PYTHONPATH=$PWD make init'
env:
CORE_BRANCH: master
CORE_BRANCH: develop

- name: Run node
run: docker exec -e ETH_RPC_URL --detach tests-runner bash -c 'NODE_PORT=8546 make node'
run: docker exec -e ETH_RPC_URL --detach tests-runner bash -c 'NODE_PORT=8545 make node'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}

- name: Check that the fork is ready
shell: bash
run: timeout 30 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' 127.0.0.1 8546
run: |
echo "Waiting for fork node on 127.0.0.1:8545..."
sleep 10
for i in {1..30}; do
if (echo > /dev/tcp/127.0.0.1/8545) >/dev/null 2>&1; then
echo "Fork is ready ✅"
exit 0
fi
echo "Not ready yet... ($i/30)"
sleep 1
done
echo "❌ Fork was not ready after 30 seconds" >&2
exit 1

- name: Prepare test environment with Brownie
run: docker exec -e GITHUB_TOKEN -e ETH_RPC_URL tests-runner bash -c 'make ci-prepare-environment'
run: docker exec -e GITHUB_TOKEN -e ETH_RPC_URL -e ETHERSCAN_TOKEN tests-runner bash -c 'make ci-prepare-environment'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}

- name: Run core tests
run: docker exec -e CORE_TESTS_TARGET_RPC_URL tests-runner bash -c 'make test-core'
env:
CORE_TESTS_TARGET_RPC_URL: http://127.0.0.1:8546
CORE_TESTS_TARGET_RPC_URL: http://127.0.0.1:8545
24 changes: 15 additions & 9 deletions .github/workflows/dual_governance_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- "feat/rc2"
- "feat/rc1"
- "feat/next-vote"
- "feat/v3-vote"
workflow_dispatch:

jobs:
Expand All @@ -26,15 +27,14 @@ jobs:
cancel-in-progress: true

env:
NODE_VERSION: '20'
PYTHON_VERSION: '3.10'
POETRY_VERSION: '1.8.2'
HARDHAT_NODE_URL: 'http://127.0.0.1:8545'
ANVIL_NODE_URL: 'http://127.0.0.1:8555'
NODE_VERSION: "20"
PYTHON_VERSION: "3.10"
POETRY_VERSION: "1.8.2"
HARDHAT_NODE_URL: "http://127.0.0.1:8545"
ANVIL_NODE_URL: "http://127.0.0.1:8555"
CURL_PARAMS: '-X POST -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}"'

steps:

################################################################
# Clone repositories`
################################################################
Expand All @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: lidofinance/dual-governance
ref: feature/escrow-mainnet-deploy
ref: feature/report-simulation
path: dual-governance
persist-credentials: false
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -63,7 +63,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
cache: "yarn"
cache-dependency-path: scripts/yarn.lock

- name: Install Poetry
Expand Down Expand Up @@ -141,11 +141,17 @@ jobs:
done
working-directory: scripts

- name: Import network config for brownie
shell: bash
run: poetry run brownie networks import network-config.yaml True
working-directory: scripts

- name: Prepare test environment with Brownie
run: poetry run brownie run scripts/ci/prepare_environment --network mainnet-fork
run: PYTHONPATH=$PWD poetry run brownie run scripts/ci/prepare_environment --network mfh-1
working-directory: scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}

- name: Run regression tests
run: npm run test:regressions -- --load-accounts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/large_vote_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
vote: "large"
rpc_url: ${{ secrets.ETH_RPC_URL }}
etherscan: ${{ secrets.ETHERSCAN_TOKEN }}
command: "make test-1/2"
command: "PYTHONPATH=$PWD make test-1/2"

run-tests-large-2:
name: Brownie fork LARGE tests 2
Expand All @@ -62,4 +62,4 @@ jobs:
vote: "large"
rpc_url: ${{ secrets.ETH_RPC_URL }}
etherscan: ${{ secrets.ETHERSCAN_TOKEN }}
command: "make test-2/2"
command: "PYTHONPATH=$PWD make test-2/2"
26 changes: 22 additions & 4 deletions .github/workflows/normal_vote_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ jobs:
run-tests-normal-1:
name: Brownie fork NORMAL tests 1
runs-on: "ubuntu-latest"
timeout-minutes: 100
timeout-minutes: 150

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.26.0
ports:
- 8545:8545
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
HARDFORK: "cancun"

steps:
- uses: actions/checkout@v4
Expand All @@ -23,12 +32,21 @@ jobs:
vote: "normal"
rpc_url: ${{ secrets.ETH_RPC_URL }}
etherscan: ${{ secrets.ETHERSCAN_TOKEN }}
command: "make test-1/2"
command: "PYTHONPATH=$PWD make test-1/2"

run-tests-normal-2:
name: Brownie fork NORMAL tests 2
runs-on: "ubuntu-latest"
timeout-minutes: 100
timeout-minutes: 150

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.26.0
ports:
- 8546:8545
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
HARDFORK: "cancun"

steps:
- uses: actions/checkout@v4
Expand All @@ -38,4 +56,4 @@ jobs:
vote: "normal"
rpc_url: ${{ secrets.ETH_RPC_URL }}
etherscan: ${{ secrets.ETHERSCAN_TOKEN }}
command: "make test-2/2"
command: "PYTHONPATH=$PWD make test-2/2"
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,40 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
git clean -d -x -f; \
fi

RUN if [ "$TARGETARCH" = "arm64" ]; then \
# build solc-v0.8.25
git checkout v0.8.25; \
# the compiler throws warnings when compiling this version, and the warnings are treated as errors.
# we disable treating the warnings as errors, unless the build doesn't succeed
grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \
# there is no sudo in the container, but we are under root so we do not need it
grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \
# build solc faster
grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \
./scripts/build.sh; \
mv /usr/local/bin/solc /root/.solcx/solc-v0.8.25; \
git checkout .; \
git checkout develop; \
git clean -d -x -f; \
fi

RUN if [ "$TARGETARCH" = "arm64" ]; then \
# build solc-v0.8.21
git checkout v0.8.21; \
# the compiler throws warnings when compiling this version, and the warnings are treated as errors.
# we disable treating the warnings as errors, unless the build doesn't succeed
grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \
# there is no sudo in the container, but we are under root so we do not need it
grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \
# build solc faster
grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \
./scripts/build.sh; \
mv /usr/local/bin/solc /root/.solcx/solc-v0.8.21; \
git checkout .; \
git checkout develop; \
git clean -d -x -f; \
fi

RUN if [ "$TARGETARCH" = "arm64" ]; then \
# build solc-v0.6.11
git checkout v0.6.11; \
Expand Down Expand Up @@ -303,6 +337,8 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.7.6 --version | gr
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.19 --version | grep 'Version: 0.8.19+commit.7dd6d404' || (echo "Incorrect solc-v0.8.19 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.24 --version | grep 'Version: 0.8.24+commit.e11b9ed9' || (echo "Incorrect solc-v0.8.24 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.25 --version | grep 'Version: 0.8.25+commit.b61c2a91' || (echo "Incorrect solc-v0.8.25 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.21 --version | grep 'Version: 0.8.21+commit.d9974bed' || (echo "Incorrect solc-v0.8.21 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.6.11 --version | grep 'Version: 0.6.11+commit.5ef660b1' || (echo "Incorrect solc-v0.6.11 version" && exit 1) fi
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1) fi

Expand Down
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ define run_2nd_test
poetry run $(1)
endef

# Get the latest block number from the target RPC node to use as FORKING_BLOCK_NUMBER for core tests
__get_rpc_latest_block_number:
@curl -s -X POST $(CORE_TESTS_TARGET_RPC_URL) \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
| sed -E 's/.*"result":"([^"]+)".*/\1/' \
| xargs printf "%d"

test:
ifdef vote
Expand All @@ -22,6 +29,7 @@ CORE_DIR ?= lido-core
CORE_BRANCH ?= master
NODE_PORT ?= 8545
SECONDARY_NETWORK ?= mfh-2
NETWORK_STATE_FILE ?= deployed-mainnet.json

test-1/2:
poetry run brownie test tests/[tc]*.py tests/regression/test_staking_router_stake_distribution.py --durations=20 --network mfh-1
Expand All @@ -36,8 +44,8 @@ init-scripts:
# because current brownie version does not support pm install from the config file
poetry install && \
yarn && \
poetry run brownie pm install OpenZeppelin/openzeppelin-contracts@4.0.0 && \
poetry run brownie compile && \
PYTHONPATH=$$PWD poetry run brownie pm install OpenZeppelin/openzeppelin-contracts@4.0.0 && \
PYTHONPATH=$$PWD poetry run brownie compile && \
poetry run brownie networks import network-config.yaml True

debug:
Expand Down Expand Up @@ -78,9 +86,12 @@ node3:
npx hardhat node --fork $(ETH_RPC_URL3) --port $(NODE_PORT)

test-core:
LATEST_BLOCK_NUMBER=$$($(MAKE) --no-print-directory __get_rpc_latest_block_number) && \
echo "LATEST_BLOCK_NUMBER: $$LATEST_BLOCK_NUMBER" && \
cd $(CORE_DIR) && \
FORK_RPC_URL=$(CORE_TESTS_TARGET_RPC_URL) \
RPC_URL=$(CORE_TESTS_TARGET_RPC_URL) \
NETWORK_STATE_FILE=$(NETWORK_STATE_FILE) \
FORKING_BLOCK_NUMBER=$$LATEST_BLOCK_NUMBER \
yarn test:integration

slots:
Expand All @@ -92,7 +103,7 @@ slots:
@rm -f slots.ts

ci-prepare-environment:
poetry run brownie run scripts/ci/prepare_environment --network $(SECONDARY_NETWORK)
poetry run brownie run scripts/ci/prepare_environment --network mfh-1

enact-fork:
poetry run brownie run $(vote) start_and_execute_vote_on_fork_manual --network=mfh-1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _*may be optionally set when running tests asynchronously to reduce the risk of
Run the container in the `scripts` directory and specify the ENV VARs:

```shell
docker run --name scripts -v "$(pwd)":/root/scripts -e ETH_RPC_URL -e ETH_RPC_URL2 -e ETH_RPC_URL3 -e PINATA_CLOUD_TOKEN -e DEPLOYER -e ETHERSCAN_TOKEN -e ETHERSCAN_TOKEN2 -e ETHERSCAN_TOKEN3 -d ghcr.io/lidofinance/scripts:v19
docker run --name scripts -v "$(pwd)":/root/scripts -e ETH_RPC_URL -e ETH_RPC_URL2 -e PINATA_CLOUD_TOKEN -e DEPLOYER -e ETHERSCAN_TOKEN -e ETHERSCAN_TOKEN2 -p 8545:8545 -d ghcr.io/lidofinance/scripts:v21
```

#### Step 4. Initialize container
Expand Down
2 changes: 1 addition & 1 deletion brownie-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ networks:
live:
priority_fee: auto

autofetch_sources: true
autofetch_sources: false

hypothesis:
max_examples: 10
Loading
Loading