Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
470b0b9
feat: add nest vote and tests
katamarinaki Jul 18, 2026
fd13e34
fix(Tests): move validators to corresponding utils paths
phonktown Jul 22, 2026
a9f719c
feat(Tests): tag acceptance checks with vote item numbers and order t…
phonktown Jul 22, 2026
c27febd
fix(Tests): remove unused import
phonktown Jul 23, 2026
bd8974a
feat(Nest): add happy path regression test
phonktown Jul 24, 2026
f1f3c2e
feat: replace staking module share limits factory
skhomuti Jul 24, 2026
a8ef3d6
feat(Nest): adjust happy-path test
phonktown Jul 27, 2026
e97a2d8
feat(Vote): add lol stables factories + tests
phonktown Jul 28, 2026
ace2b55
fix(Tests): move scenario tests to the main vote test file
phonktown Jul 29, 2026
d5c15d9
feat(Vote): adjust descriptions
phonktown Jul 29, 2026
e1524bb
fix(Tests): fix CI tests
phonktown Jul 30, 2026
4d9d360
feat(Tests): update comment
phonktown Jul 30, 2026
5c14985
Merge pull request #659 from lidofinance/feat/nest-vote
iamnp Aug 3, 2026
23d4488
fix(ci): remove unsupported vote_prev_block input
skhomuti Aug 3, 2026
9dc1479
Merge pull request #669 from lidofinance/fix/remove-unsupported-vote-…
iamnp Aug 3, 2026
7f0ac81
fix(Stonks): split stonks test into 2 parts
phonktown Aug 3, 2026
b0a0266
fix(CI): fix core tests CI
phonktown Aug 3, 2026
8d54da8
fix(Interface): update interface
phonktown Aug 3, 2026
60683b5
feat(Tests): adjust vote tests
phonktown Aug 3, 2026
ced54b8
feat(Vote): upload IPFS + adjust descriptions
phonktown Aug 3, 2026
c79452e
fix(Makefile): fix stonks tests grep
phonktown Aug 3, 2026
1640c61
feat(Tests): pick an unclaimed source operator for consolidation pair
phonktown Aug 3, 2026
c2ed5e8
Merge pull request #670 from lidofinance/fix/stonks-test
iamnp Aug 4, 2026
ca290c7
feat(Tests): adjust tests
phonktown Aug 4, 2026
e8e1b17
Merge pull request #671 from lidofinance/feat/vote-204-tests
phonktown Aug 4, 2026
eaa450a
feat(Vote): update IPFS
phonktown Aug 4, 2026
2d9f94e
Merge pull request #672 from lidofinance/feat/vote-204-ipfs
iamnp Aug 4, 2026
ad68fbe
feat(Vote): update IPFS
phonktown Aug 4, 2026
5a8454e
Merge pull request #673 from lidofinance/feat/vote-204-ipfs
iamnp Aug 4, 2026
d00e51a
feat(Vote): update IPFS
phonktown Aug 4, 2026
36a1a6a
Merge pull request #674 from lidofinance/feat/vote-204-ipfs
iamnp Aug 4, 2026
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: 7 additions & 0 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}

# The step above enacted the vote, which moved the fork clock past the vaults report.
- name: Refresh the vaults report
run: docker exec -e ETH_RPC_URL -e ETHERSCAN_TOKEN tests-runner bash -c 'make ci-refresh-vaults-report'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}

- name: Run core tests
run: docker exec -e CORE_TESTS_TARGET_RPC_URL -e NODE_OPTIONS -e DG_PROPOSAL_IDS tests-runner bash -c 'make test-core'
env:
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/sm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ jobs:
run: poetry run brownie networks import network-config.yaml True
working-directory: scripts

- name: Capture pre-vote block for staking modules regression
id: modules-regression-vote-block
shell: bash
run: |
vote_prev_block=$(make --no-print-directory __get_rpc_latest_block_number CORE_TESTS_TARGET_RPC_URL=${{ env.HARDHAT_NODE_URL }})
echo "vote_prev_block=$vote_prev_block" >> "$GITHUB_OUTPUT"
working-directory: scripts

- name: Prepare test environment with Brownie
run: PYTHONPATH=$PWD poetry run brownie run scripts/ci/prepare_environment --network mfh-1
working-directory: scripts
Expand All @@ -111,4 +103,3 @@ jobs:
ref: develop
path: staking-modules
rpc_url: ${{ env.HARDHAT_NODE_URL }}
vote_prev_block: ${{ steps.modules-regression-vote-block.outputs.vote_prev_block }}
105 changes: 105 additions & 0 deletions .github/workflows/stonks_integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Stonks integration tests

on:
push:
branches:
- feat/next-vote
workflow_dispatch:

env:
# Stonks branch the NEST V2 integration tests are run from.
STONKS_REF: main

jobs:
run-tests:
name: Stonks integration tests in docker
runs-on: [ubuntu-latest]
timeout-minutes: 120
env:
NODE_OPTIONS: --max_old_space_size=7200

# Fork node on localhost:8545, same scripts image core_tests uses (has brownie + node/npm).
services:
tests-runner:
image: ghcr.io/lidofinance/scripts:v21
ports:
- 8545:8545
volumes:
- ${{ github.workspace }}:/root/scripts
options: >-
--name=tests-runner

steps:
- name: Checkout scripts
uses: actions/checkout@v4

- name: Checkout stonks (${{ env.STONKS_REF }})
uses: actions/checkout@v4
with:
repository: lidofinance/stonks
ref: ${{ env.STONKS_REF }}
path: stonks
persist-credentials: false

- name: Run init script
run: docker exec tests-runner bash -c 'PYTHONPATH=$PWD make init-scripts'

- name: Run node
run: docker exec -e ETH_RPC_URL -e NODE_OPTIONS --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: |
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

# Suites that price tokens through the real Chainlink FeedRegistry. They run before the vote
# because enacting it warps the fork clock past the feeds' updatedAt — see the comment above
# STONKS_POSTVOTE_SUITES in the Makefile.
- name: Run stonks suites that need a clean fork
run: docker exec -e ETH_RPC_URL -e NODE_OPTIONS tests-runner bash -c 'make test-stonks-integration-prevote STONKS_DIR=stonks'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}

# The pass above deploys contracts, impersonates the Aragon Agent and moves LDO around, so the
# vote is enacted on a fresh fork rather than on top of that state.
- name: Restart the fork node
run: |
docker exec tests-runner bash -c 'pkill -f "hardhat node"' || true
docker exec -e ETH_RPC_URL -e NODE_OPTIONS --detach tests-runner bash -c 'NODE_PORT=8545 make node'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}

- name: Check that the restarted fork is ready
shell: bash
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: Enact vote and run stonks suites that need the NEST notifier
run: docker exec -e ETH_RPC_URL -e ETHERSCAN_TOKEN -e NODE_OPTIONS tests-runner bash -c 'make test-stonks-integration-postvote STONKS_DIR=stonks'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ CORE_BRANCH ?= master
NODE_PORT ?= 8545
SECONDARY_NETWORK ?= mfh-2
NETWORK_STATE_FILE ?= deployed-mainnet.json
STONKS_DIR ?= ../stonks

test-1/2:
poetry run brownie test tests/[tc]*.py tests/regression/test_staking_router_stake_distribution.py --durations=20 --network mfh-1
Expand Down Expand Up @@ -94,6 +95,25 @@ test-core:
FORKING_BLOCK_NUMBER=$$LATEST_BLOCK_NUMBER \
yarn test:integration

# Two passes, because enacting the vote warps the fork clock ~9 days ahead of the Chainlink updatedAt:
# suites pricing through the real FeedRegistry hit OracleStale after that, so they run on a clean fork.
# The suites below need the opposite — the post-vote NEST TokenRateNotifier — and price through a stub
# registry stamped with the current block timestamp, so the warp does not affect them.
STONKS_POSTVOTE_SUITES ?= staking-revenue-source buyback-happy-path

test-stonks-integration-prevote:
cd $(STONKS_DIR) && \
{ [ -d node_modules ] || npm ci; } && \
POSTVOTE_PATTERN="^test/integration/($$(echo $(STONKS_POSTVOTE_SUITES) | tr ' ' '|'))\.ts$$" && \
PREVOTE_SUITES=$$(ls test/integration/*.ts | grep -vE "$$POSTVOTE_PATTERN" || true) && \
{ [ -n "$$PREVOTE_SUITES" ] || { echo "No pre-vote suites left after excluding: $(STONKS_POSTVOTE_SUITES)" >&2; exit 1; }; } && \
RPC_URL=$(ETH_RPC_URL) npx hardhat test $$PREVOTE_SUITES --network localhost

test-stonks-integration-postvote: ci-prepare-environment
cd $(STONKS_DIR) && \
{ [ -d node_modules ] || npm ci; } && \
RPC_URL=$(ETH_RPC_URL) npx hardhat test $(patsubst %,test/integration/%.ts,$(STONKS_POSTVOTE_SUITES)) --network localhost

slots:
@echo "Input https://github.com/lidofinance/protocol-onchain-mon-bots/blob/main/bots/ethereum-steth-v2/src/utils/constants.mainnet.ts file content (end with Enter and Ctrl+D):"
@cat | grep -v "import { ERC20 } from './constants'" | sed 's/ERC20/any/g' > slots2.ts
Expand All @@ -117,5 +137,10 @@ slots:
ci-prepare-environment:
poetry run brownie run scripts/ci/prepare_environment --network mfh-1

# Core tests operate on vaults, and VaultHub rejects a vaults report older than 2 days, while
# enacting the vote leaves the fork clock ~9 days past the last one.
ci-refresh-vaults-report:
poetry run brownie run scripts/ci/refresh_vaults_report --network mfh-1

enact-fork:
poetry run brownie run $(vote) start_and_execute_vote_on_fork_manual --network=mfh-1
11 changes: 6 additions & 5 deletions configs/config_mainnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
EASYTRACK_CM_REPORT_WITHDRAWALS_FOR_SLASHED_VALIDATORS_FACTORY = "0x71862Abd99819597670007bb992A7a7562fE50f2"
EASYTRACK_CM_SETTLE_GENERAL_DELAYED_PENALTY_FACTORY = "0xfffEFC16231eDC6Dc9C93e364ff4D4E3f787f416"
EASYTRACK_CM_CREATE_OR_UPDATE_OPERATOR_GROUP_FACTORY = "0x2fC78638b77381e9D040163Bd6EB1cac967bDBdF"
EASYTRACK_UPDATE_STAKING_MODULE_SHARE_LIMITS_FACTORY = "0x0C6703F1d8D9DdfB6c6e5F57b4f7432a6500D6D8"
EASYTRACK_UPDATE_STAKING_MODULE_SHARE_LIMITS_FACTORY = "0xde3e46E3129fA4e4e3f66c9024B0A3Ad509b27a1"
EASYTRACK_ALLOW_CONSOLIDATION_PAIR_FACTORY = "0x29e23B1EF0c9fffAc8330F9abaCebDDD827E4b5C"

# Liquidity Observation Lab (LOL) stETH AllowedRecipientsRegistry
Expand Down Expand Up @@ -125,7 +125,7 @@

# LidoLocator
LIDO_LOCATOR = "0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb"
LIDO_LOCATOR_IMPL = "0x0360002bf51DCae1c0267aE0AFDaBacAF7De686b" # SRV3
LIDO_LOCATOR_IMPL = "0xF2Ffb952e129a63F0614Ff87126E1d4a494A2313" # NEST

# Other upgrade addresses
LIDO_V2_UPGRADE_TEMPLATE = "0xa818fF9EC93122Bf9401ab4340C42De638CD600a"
Expand Down Expand Up @@ -237,8 +237,8 @@
CS_MODULE_NAME = "Community Staking"
CS_MODULE_MODULE_FEE_BP = 600
CS_MODULE_TREASURY_FEE_BP = 400
CS_MODULE_TARGET_SHARE_BP = 850
CS_MODULE_PRIORITY_EXIT_SHARE_THRESHOLD = 1020
CS_MODULE_TARGET_SHARE_BP = 900 # Updated from 850 to 900 by an Easy Track motion, block 25632046
CS_MODULE_PRIORITY_EXIT_SHARE_THRESHOLD = 1080 # Updated from 1020 to 1080 by the same motion
CS_MODULE_MAX_DEPOSITS_PER_BLOCK = 30
CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE = 25

Expand Down Expand Up @@ -485,7 +485,7 @@
OBOL_LIDO_SPLIT_IMPL = "0x2fB59065F049e0D0E3180C6312FA0FeB5Bbf0FE3"

# Ethereum Part for Optimism bridge
L1_TOKEN_RATE_NOTIFIER = "0x25e35855783bec3E49355a29e110f02Ed8b05ba9"
L1_TOKEN_RATE_NOTIFIER = "0xbe05d12Fd10919F1881125006523452F6aFF791b" # NEST
L1_OPTIMISM_TOKEN_RATE_PUSHER = "0xd54c1c6413caac3477AC14b2a80D5398E3c32FfE"
L1_OPTIMISM_TOKENS_BRIDGE = "0x76943C0D61395d8F2edF9060e1533529cAe05dE6"
L1_OPTIMISM_TOKENS_BRIDGE_IMPL = "0x29C5c51A031165CE62F964966A6399b81165EFA4"
Expand Down Expand Up @@ -664,6 +664,7 @@
OPERATOR_GRID = "0xC69685E89Cefc327b43B7234AC646451B27c544d"
LAZY_ORACLE = "0x5DB427080200c235F2Ae8Cd17A7be87921f7AD6c"
PREDEPOSIT_GUARANTEE = "0xF4bF42c6D6A0E38825785048124DBAD6c9eaaac3"
VAULT_FACTORY = "0x02Ca7772FF14a9F6c1a08aF385aA96bb1b34175A"
VAULTS_ADAPTER = "0x28F9Ac198C4E0FA6A9Ad2c2f97CB38F1A3120f27"
GATE_SEAL_V3 = "0x881dAd714679A6FeaA636446A0499101375A365c"
STAKING_VAULT_BEACON = "0x5FbE8cEf9CCc56ad245736D3C5bAf82ad54Ca789"
Expand Down
Loading
Loading