Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aae9dd3
Draft vote 2026_05_13 script & tests
phonktown May 1, 2026
17771d0
feat(Vote): adjust tests
phonktown May 4, 2026
843e5b7
feat(Vote): adjust tests & descriptions
phonktown May 4, 2026
724ee6c
Merge pull request #622 from lidofinance/master
iamnp May 5, 2026
986ff00
Merge pull request #623 from lidofinance/master
iamnp May 5, 2026
0573d05
feat(Vote): adjust tests
phonktown May 5, 2026
e16245e
feat(Vote): add IV vote section with VEBO frame adjustment
F4ever May 6, 2026
2ec28af
feat(Vote): fix VEBO related tests
F4ever May 6, 2026
fa62d10
feat(Vote): split items by each af call + vebo happy path in 45 epoches
F4ever May 6, 2026
7287632
feat(Vote): replaced hardcode with utils call
F4ever May 6, 2026
0446429
feat(Vote): remove unused vars + check after vote initial epoch
F4ever May 6, 2026
01fd90a
feat(Vote): update descriptions
phonktown May 7, 2026
7c8afec
Merge pull request #621 from lidofinance/feat/vote-2026-05-13
iamnp May 7, 2026
60900ed
feat(Vote): update desc
phonktown May 8, 2026
85dc72a
Merge pull request #625 from lidofinance/feat/vote-13-05-2026-descrip…
iamnp May 8, 2026
d6aeca9
fix(Vote): test fixes
phonktown May 8, 2026
5f5a730
Add anvil and foundry RPC stability params to DG regression CI
Psirex May 8, 2026
73a034a
Merge pull request #626 from lidofinance/fix/vote-13-05-2026-cleanup
iamnp May 11, 2026
d8710e2
Use develop branch in the DG regression tests workflow
Psirex May 11, 2026
e4f4e5b
Merge pull request #627 from lidofinance/fix/dg-test-fails
iamnp May 11, 2026
fff7f7b
fix(Vote): text-adjustments
phonktown May 11, 2026
71c7506
Merge pull request #628 from lidofinance/fix/vote-13-05-2026-text-adj…
iamnp May 12, 2026
5d2797d
feat(Vote): move script to archive
phonktown May 18, 2026
489841c
feat(Vote): adjust script path for vote 201 tests
phonktown May 18, 2026
9898f70
Merge pull request #630 from lidofinance/feat/archive-vote-201
kate-aleksseeva May 18, 2026
b8ea651
feat(Vote): archive vote 201 tests
phonktown May 23, 2026
a28b42c
Merge pull request #631 from lidofinance/feat/archive-test
iamnp May 24, 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
8 changes: 6 additions & 2 deletions .github/workflows/dual_governance_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: lidofinance/dual-governance
ref: main
ref: develop
path: dual-governance
persist-credentials: false
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -157,7 +157,9 @@ jobs:
run: |
anvil --fork-url ${{ env.HARDHAT_NODE_URL }} \
--port 8555 \
--no-storage-caching \
--retries 20 \
--timeout 120000 \
--fork-retry-backoff 2000 \
--silent &
for i in {1..30}; do
if curl -sf ${{ env.ANVIL_NODE_URL }} ${{ env.CURL_PARAMS }} | grep -q '"result"'; then
Expand All @@ -172,4 +174,6 @@ jobs:
env:
MAINNET_RPC_URL: ${{ env.ANVIL_NODE_URL }}
DEPLOY_ARTIFACT_FILE_NAME: deploy-artifact-mainnet.toml
FOUNDRY_ETH_RPC_TIMEOUT: "120"
FOUNDRY_THREADS: "1"
working-directory: dual-governance
188 changes: 188 additions & 0 deletions archive/scripts/vote_2026_05_13.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
"""
Vote 2026_05_13.

I. Extend Dual Governance Emergency Protection for one additional year
1.1. Call setEmergencyProtectionEndDate(1813449600) on Emergency Protected Timelock 0xCE0425301C85c5Ea2A0873A2dEe44d78E02D2316

II. Grant MANAGE_SIGNING_KEYS role to Consensys
1.2. Grant MANAGE_SIGNING_KEYS 75abc64490e17b40ea1e66691c3eb493647b24430b358bd87ec3e5127f1621ee role to 0xF45C77EadD434612fCD93db978B3E36B0D58eC99 for Node Operator Consensys (ID = 21)

III. Increase limit from $250K per 3 months to $5M per 6 months on Alliance Ops stablecoins Easy Track factory
1.3. Set limit to 5,000,000 USD per 6 months on Alliance Ops stablecoins AllowedRecipientsRegistry 0x3B525F4c059F246Ca4aa995D21087204F30c9E2F

IV. Change number of epochs in VEBO reporting frame
1.4. Grant MANAGE_FRAME_CONFIG_ROLE 0x921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe role to Aragon Agent 0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
1.5. Set number of epochs in reporting frame to 45 on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
1.6. Revoke MANAGE_FRAME_CONFIG_ROLE 0x921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe role from Aragon Agent 0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
1.7. Set time window constraint (13:00 - 16:30 UTC) for Dual Governance Proposal execution on Dual Governance Time Constraints 0x2a30F5aC03187674553024296bed35Aa49749DDa

Vote passed & executed on May-18-2026 02:51:11 PM UTC, block 25122802.
"""

from brownie import interface
from typing import Dict, List, Tuple

from utils.voting import bake_vote_items, confirm_vote_script, create_vote
from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description
from utils.config import get_deployer_account, get_is_live, get_priority_fee
from utils.mainnet_fork import pass_and_exec_dao_vote
from utils.dual_governance import submit_proposals
from utils.permissions import encode_permission_grant_p
from utils.permission_parameters import Param, Op, ArgumentValue
from utils.allowed_recipients_registry import set_limit_parameters

from utils.agent import agent_forward

# ============================== Addresses ===================================
EMERGENCY_PROTECTED_TIMELOCK = "0xCE0425301C85c5Ea2A0873A2dEe44d78E02D2316"
NODE_OPERATORS_REGISTRY = "0x55032650b14df07b85bF18A3a3eC8E0Af2e028d5"
ALLIANCE_OPS_STABLECOINS_REGISTRY = "0x3B525F4c059F246Ca4aa995D21087204F30c9E2F"
VEBO_HASH_CONSENSUS = "0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a"
DUAL_GOVERNANCE_TIME_CONSTRAINTS = "0x2a30F5aC03187674553024296bed35Aa49749DDa"
ARAGON_AGENT = "0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c"


# ============================== Constants ===================================
NEW_EMERGENCY_PROTECTION_END_DATE = 1813449600 # 2027-06-20 00:00:00 UTC

CONSENSYS_NO_ID = 21
CONSENSYS_NEW_MANAGER = "0xF45C77EadD434612fCD93db978B3E36B0D58eC99"

ALLIANCE_OPS_NEW_LIMIT = 5_000_000 * 10**18
ALLIANCE_OPS_NEW_PERIOD_DURATION_MONTHS = 6

VEBO_NEW_EPOCHS_PER_FRAME = 45

# HashConsensus roles
MANAGE_FRAME_CONFIG_ROLE = "0x921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe"


# ============================= IPFS Description ==================================
IPFS_DESCRIPTION = """
1. **Extend Dual Governance Emergency Protection until June 20, 2027**, [as proposed on the forum](https://research.lido.fi/t/lip-28-dual-governance/10032/18). Item 1.1.
2. **Grant MANAGE_SIGNING_KEYS role to Node Operator Consensys**, [as requested on the forum](https://research.lido.fi/t/node-operator-registry-name-reward-address-change/4170/54). Item 1.2.
3. **Increase Alliance Ops stablecoins Easy Track factory limit from $250K per 3 months to $5M per 6 months**, [as per Snapshot decision](https://snapshot.box/#/s:lido-snapshot.eth/proposal/0x429bdf30549800d3ed87ffa701802d267f6a1e06d1719c6f0a4cb2ecefde521e). Item 1.3.
4. **Reduce VEBO Reporting Frame from 75 to 45 epochs**, [as proposed on the forum](https://research.lido.fi/t/proposal-reduce-vebo-reporting-frame-from-8h-to-4-8h-75-45-epochs/11524). Items 1.4–1.7.
"""


# ================================ Main ======================================
def get_dg_items() -> List[Tuple[str, str]]:
timelock = interface.EmergencyProtectedTimelock(EMERGENCY_PROTECTED_TIMELOCK)
vebo_hash_consensus = interface.HashConsensus(VEBO_HASH_CONSENSUS)
time_constraints = interface.TimeConstraints(DUAL_GOVERNANCE_TIME_CONSTRAINTS)

(_, _, fast_lane_length_slots) = vebo_hash_consensus.getFrameConfig()

return [
# 1.1. Call setEmergencyProtectionEndDate(1813449600) on Emergency Protected Timelock 0xCE0425301C85c5Ea2A0873A2dEe44d78E02D2316
(
timelock.address,
timelock.setEmergencyProtectionEndDate.encode_input(NEW_EMERGENCY_PROTECTION_END_DATE),
),
# 1.2. Grant MANAGE_SIGNING_KEYS 75abc64490e17b40ea1e66691c3eb493647b24430b358bd87ec3e5127f1621ee role to 0xF45C77EadD434612fCD93db978B3E36B0D58eC99 for Node Operator Consensys (ID = 21)
agent_forward([
encode_permission_grant_p(
target_app=NODE_OPERATORS_REGISTRY,
permission_name="MANAGE_SIGNING_KEYS",
grant_to=CONSENSYS_NEW_MANAGER,
params=[Param(0, Op.EQ, ArgumentValue(CONSENSYS_NO_ID))],
),
]),
# 1.3. Set limit to 5,000,000 USD per 6 months on Alliance Ops stablecoins AllowedRecipientsRegistry 0x3B525F4c059F246Ca4aa995D21087204F30c9E2F
agent_forward([
set_limit_parameters(
registry_address=ALLIANCE_OPS_STABLECOINS_REGISTRY,
limit=ALLIANCE_OPS_NEW_LIMIT,
period_duration_months=ALLIANCE_OPS_NEW_PERIOD_DURATION_MONTHS,
),
Comment thread
iamnp marked this conversation as resolved.
]),
# 1.4. Grant MANAGE_FRAME_CONFIG_ROLE 0x921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe role to Aragon Agent 0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
agent_forward([
(
vebo_hash_consensus.address,
vebo_hash_consensus.grantRole.encode_input(MANAGE_FRAME_CONFIG_ROLE, ARAGON_AGENT),
),
]),
# 1.5. Set number of epochs in reporting frame to 45 on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
agent_forward([
(
vebo_hash_consensus.address,
vebo_hash_consensus.setFrameConfig.encode_input(VEBO_NEW_EPOCHS_PER_FRAME, fast_lane_length_slots),
),
]),
# 1.6. Revoke MANAGE_FRAME_CONFIG_ROLE 0x921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe role from Aragon Agent 0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c on the VEBO Hash Consensus 0x7FaDB6358950c5fAA66Cb5EB8eE5147De3df355a
agent_forward([
(
vebo_hash_consensus.address,
vebo_hash_consensus.revokeRole.encode_input(MANAGE_FRAME_CONFIG_ROLE, ARAGON_AGENT),
),
]),
# 1.7. Set time window constraint (13:00 - 16:30 UTC) for Dual Governance Proposal execution on Dual Governance Time Constraints 0x2a30F5aC03187674553024296bed35Aa49749DDa
(
DUAL_GOVERNANCE_TIME_CONSTRAINTS,
time_constraints.checkTimeWithinDayTimeAndEmit.encode_input(
13 * 3600,
16 * 3600 + 30 * 60,
),
),
]


def get_vote_items() -> Tuple[List[str], List[Tuple[str, str]]]:
dg_items = get_dg_items()

dg_call_script = submit_proposals([
(
dg_items,
"Extend Dual Governance Emergency Protection until June 20 2027, "
"grant MANAGE_SIGNING_KEYS role to Node Operator Consensys, "
"increase Alliance Ops stablecoins Easy Track factory limit from $250K per 3 months to $5M per 6 months, "
"reduce VEBO Reporting Frame from 75 to 45 epochs",
)
])

vote_desc_items, call_script_items = zip(
(
"1. Submit a Dual Governance proposal to extend Dual Governance Emergency Protection until June 20 2027, "
"grant MANAGE_SIGNING_KEYS role to Node Operator Consensys, "
"increase Alliance Ops stablecoins Easy Track factory limit from $250K per 3 months to $5M per 6 months, "
"reduce VEBO Reporting Frame from 75 to 45 epochs",
dg_call_script[0]
),
)

return vote_desc_items, call_script_items


def start_vote(tx_params: Dict[str, str], silent: bool = False):
vote_desc_items, call_script_items = get_vote_items()
vote_items = bake_vote_items(list(vote_desc_items), list(call_script_items))

desc_ipfs = (
calculate_vote_ipfs_description(IPFS_DESCRIPTION)
if silent else upload_vote_ipfs_description(IPFS_DESCRIPTION)
)

vote_id, tx = confirm_vote_script(vote_items, silent, desc_ipfs) and list(
create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs)
)

return vote_id, tx

def main():
tx_params: Dict[str, str] = {"from": get_deployer_account().address}
if get_is_live():
tx_params["priority_fee"] = get_priority_fee()

vote_id, _ = start_vote(tx_params=tx_params, silent=False)
vote_id >= 0 and print(f"Vote created: {vote_id}.")

def start_and_execute_vote_on_fork_manual():
if get_is_live():
raise Exception("This script is for local testing only.")

tx_params = {"from": get_deployer_account()}
vote_id, _ = start_vote(tx_params=tx_params, silent=True)
print(f"Vote created: {vote_id}.")
pass_and_exec_dao_vote(int(vote_id), step_by_step=True)
Loading
Loading