-
Notifications
You must be signed in to change notification settings - Fork 51
feat: tooling for validator management #347
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
base: master
Are you sure you want to change the base?
Conversation
…mpounding vals, consolidation, or exits and run tenderly simulation
📊 Forge Coverage ReportGenerated by workflow run #575 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37bf53fa22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if args.txns: | ||
| env['TXNS'] = args.txns | ||
| if args.schedule: | ||
| env['SCHEDULE_FILE'] = args.schedule | ||
| if args.execute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forge sim omits TXNS env for timelock runs
When running the forge-based simulation with --schedule/--execute, run_forge_simulation never sets the TXNS environment variable (lines 672-676), so SimulateTransactions.s.sol’s run() immediately fails at vm.envString("TXNS") (line 46) before any transactions execute. This makes the documented timelock workflow (simulate.py --schedule ... --execute ...) unusable in forge mode. Compose TXNS from the schedule/execute/then files when those flags are used.
Useful? React with 👍 / 👎.
…g 2: Signing data nonce for batched transactions (AutoCompound.s.sol)
- Reverts for gas consumed more than 10 Mil - State Syncing turned off, because not necessary for our use case
…d generate separate consolidation transactions
…s for auto-compound workflows
… auto-compound script - Added functionality to distribute validators across withdrawal time buckets for optimal consolidation. - Introduced command-line options for bucket size and enabled round-robin distribution. - Enhanced error handling for validators without valid withdrawal credentials.
…in auto-compound script - Implemented a check to ensure --bucket-hours is a positive integer. - Added warning for excluded validators due to missing beacon index, enhancing user feedback on validator selection.
…chars) and full withdrawal credentials (66 chars).
…r each consolidation transaction and update simulation handling for multiple files. Enhanced simulate.py to support comma-separated transaction file inputs.
… to a dedicated 'txns' directory for better organization and clarity in file management.
… transaction scheduling and execution capabilities. Updated _buildTimelockCalldata function to utilize EtherFiTimelock for batch scheduling and execution of transactions.
…ents-tooling-validators-1 Improvements for Compounding Validator Tooling
| action='store_true', | ||
| default=True, | ||
| help='Enable sweep-time-aware bucketing for balanced distribution across withdrawal queue' | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argparse flag always true due to conflicting defaults
Low Severity
The --use-sweep-bucketing argument uses action='store_true' combined with default=True, which is contradictory. With store_true, the flag sets the value to True when present, and default=True sets it to True when absent. This means args.use_sweep_bucketing is always True regardless of whether the flag is provided, making the command-line option completely non-functional. Users cannot disable sweep bucketing from the command line.
…or improved modularity and reusability of validator operations. - Moved common functions related to database interactions, beacon chain API calls, and validator management into a new utility module.
…scripts for automated validator consolidation workflow - Introduced query_validators_consolidation.py to query and select validators for consolidation based on withdrawal credentials and balance constraints. - Added run-consolidation.sh to automate the consolidation process, including transaction generation and simulation on Tenderly.
…improved logging - Updated `ConsolidateToTarget.s.sol` to include deduplication logic for unlinked IDs and pubkeys during consolidation. - Commented out verbose logging for target pubkey, validator ID, and output file to reduce console clutter. - Modified `query_validators_consolidation.py` to optimize consolidation batch creation and ensure targets are the first source in each batch. - Adjusted `run-consolidation.sh` to reflect updated default values for maximum target balance and batch size.
…ion and batch creation - Updated the target selection process to distribute selections across withdrawal queue buckets. - Enhanced the consolidation batch creation logic to ensure targets are unique and optimize the use of available validators. - Improved logging to provide clearer insights into the consolidation process, including the number of unique targets used and total sources consolidated.
…ngle run - Refactored `ConsolidateToTarget.s.sol` to read from `consolidation-data.json`, allowing for batch processing of multiple validator consolidations. - Enhanced logging to provide detailed insights into the consolidation process, including the number of targets and transactions generated. - Updated `run-consolidation.sh` to streamline transaction generation and file handling, ensuring all output files are correctly named and organized. - Improved handling of linking transactions, consolidating outputs into a single directory for easier management.
…idators by default - Changed the default count of source validators to consolidate from 50 to 0, allowing the use of all available validators. - Updated help messages and examples in `run-consolidation.sh` to reflect the new default behavior. - Adjusted logging in `query_validators_consolidation.py` to clarify the source count being used during consolidation.
…g python - Introduced `generate_gnosis_txns.py` to generate Gnosis Safe transaction files for validator consolidation, including linking and consolidation transactions. - Added `run-consolidationThroughPython.sh` to automate the consolidation process, including querying validators, generating transactions, and simulating on Tenderly.
…ation-validators-tooling Consolidation validators tooling
| uint256 feePerRequest = _getConsolidationFeeSafe(targetPubkey); | ||
|
|
||
| // Generate consolidation transactions for this target | ||
| _generateConsolidationTxs(sourcePubkeys, targetPubkey, feePerRequest, config.batchSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidation fee calculated before linking simulation completes
High Severity
The consolidation fee is calculated in _processConsolidation (line 193) before the linking simulation runs in _generateLinkingTransactions (line 141). When _getConsolidationFeeSafe cannot find a linked node, it returns 1 wei as a placeholder. However, consolidation transactions are generated immediately with this incorrect fee, and no update occurs after linking. This results in transactions with insufficient ETH value that will fail on execution.
Additional Locations (1)
…atting in validator scripts - Removed the `--include-non-restaked` option from `query_validators.py` and `query_validators_consolidation.py`. - Updated output formatting in operator listing to exclude restaked count for clarity. - Adjusted README documentation to reflect the removal of the non-restaked option.
- Enhanced README.md to clarify output file structure and transaction import steps for auto-compound workflows. - Updated run-auto-compound.sh to list consolidation files for user instructions. - Improved transaction file references in simulation examples to include nonce placeholders. - Adjusted ConsolidateToTarget.s.sol to handle directory paths more robustly. - Modified query_validators_consolidation.py to use filtered validator counts for consolidation planning. - Updated validator_utils.py to ensure case-insensitive operator queries.
…oling-db fix: Update operator handling and database queries in validator scripts
| } | ||
|
|
||
| // Otherwise, assume it's relative to auto-compound directory | ||
| return string.concat(root, "/script/operations/auto-compound/txns/", path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect path resolution adds erroneous /txns/ subdirectory
Medium Severity
The _resolvePath function appends /txns/ to relative paths, resolving validators.json to script/operations/auto-compound/txns/validators.json. However, the README documentation shows the Python script outputting to script/operations/auto-compound/validators.json (without /txns/). When users follow the documented workflow using JSON_FILE=validators.json, the script will fail to find the input file.
generate txns to convert to auto-compounding vals, consolidation, or exits and run tenderly simulation
An eample usage is to generate txns for auto-compounding vals:
if the safe's last nonce was 661.
For details, Refer to
READMENote
Introduces a new validator operations toolkit to generate and simulate Gnosis Safe transactions for auto-compounding, consolidations, and exits.
script/operations/with Solidity, Python, and shell tooling:AutoCompound.s.solgroups validators by EigenPod, detects unlinked validators, emits timelock schedule/execute + per-pod consolidation txns, and prints EIP-712 signing dataConsolidateToTarget.s.sol,ConsolidationTransactions.s.sol, andGnosisConsolidationLib.solgenerate per-target consolidation txns; optional linking via timelock; outputs separate Safe JSON filesrun-*.sh) and Tenderly simulation integrationfoundry.tomlfs permissions and.gitignoreto support new scripts and ignore generated artifactsWritten by Cursor Bugbot for commit aa65620. This will update automatically on new commits. Configure here.