Nm registration fixes#721
Open
cyc60 wants to merge 4 commits into
Open
Conversation
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates Node Manager validator funding/registration flows to include proper validator deposit signatures and consolidates validator event scanning into a single helper.
Changes:
- Add
deposit_signaturestoNodeManagerFundingRequestand propagate deposit signatures through funding approval + funding transaction paths. - Introduce
get_validators_for_funding()to buildValidatorobjects (incl. deposit signatures) from the keystore. - Replace injected
EventScannerusage with a centralizedscan_validators_events()call in startup and periodic tasks.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/validators/utils.py | Adds helper to build Validator objects for funding using keystore deposit data. |
| src/node_manager/typings.py | Extends funding request typing with deposit_signatures. |
| src/node_manager/tasks.py | Switches periodic scanning to scan_validators_events() and changes funding batching to operate on Validator objects. |
| src/node_manager/register_validators.py | Updates fund_validators() to accept validators directly (with deposit signatures). |
| src/node_manager/oracles.py | Builds funding requests from Validator objects (incl. deposit signatures) and changes deadline signing payload. |
| src/node_manager/execution.py | Introduces scan_validators_events() that scans both network and operator validator events. |
| src/commands/node_manager_start.py | Loads genesis validators and uses scan_validators_events() during startup sync. |
| src/node_manager/tests/* | Updates tests/mocks to match new scanner and funding request shape. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+59
to
+76
| async def scan_validators_events( | ||
| operator_address: ChecksumAddress, block_number: BlockNumber, is_startup: bool | ||
| ) -> None: | ||
| """Scans new vault and network validators for the given block number.""" | ||
| network_validators_processor: NetworkValidatorsStartupProcessor | NetworkValidatorsProcessor | ||
| if is_startup: | ||
| network_validators_processor = NetworkValidatorsStartupProcessor() | ||
| else: | ||
| network_validators_processor = NetworkValidatorsProcessor() | ||
|
|
||
| network_validators_scanner = EventScanner(network_validators_processor) | ||
| await network_validators_scanner.process_new_events(block_number) | ||
|
|
||
| operator_validators_processor = OperatorValidatorsProcessor(operator_address) | ||
| operator_validators_scanner = EventScanner( | ||
| operator_validators_processor, argument_filters={'operator': operator_address} | ||
| ) | ||
| await operator_validators_scanner.process_new_events(block_number) |
Signed-off-by: cyc60 <avsysoev60@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.