Process redeemer harvest#720
Open
cyc60 wants to merge 13 commits intov5-releasefrom
Open
Conversation
Signed-off-by: cyc60 <avsysoev60@gmail.com>
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
This PR extends the OsToken redeemer processing flow to handle MetaVaults that require harvesting/state updates before attempting sub-vault redemptions, and aligns network/config plumbing with updated sw-utils.
Changes:
- Add MetaVault “harvested/state-up-to-date” detection (V4 vs V5 release paths) and trigger MetaVault tree processing when needed.
- Add a V4 MetaVault contract wrapper + ABI and extend SubVaultsRegistry with
isStateUpdateRequired. - Update network config initialization to avoid
dataclasses.asdictrecursion issues; bumpsw-utilstov0.13.0and adjust startup version checks accordingly.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/meta_vault/service.py |
Adds is_meta_vault_harvested() to decide whether a MetaVault needs a state update (V4 vs V5 release handling). |
src/config/networks.py |
Replaces asdict() with a shallow per-field copy to preserve nested dataclass types from sw_utils base configs. |
src/common/startup_check.py |
Switches vault upgrade check to sw_utils.is_vault_upgraded_to_pectra. |
src/common/contracts.py |
Adds V4MetaVaultContract + is_state_update_required() on SubVaultsRegistry. |
src/common/abi/IV4EthMetaVault.json |
Introduces ABI for isStateUpdateRequired() used by V4 MetaVault wrapper. |
src/commands/internal/process_redeemer.py |
Adds --graph-endpoint and --skip-harvest, harvests MetaVault trees when needed, and refreshes harvest params after harvest. |
src/commands/tests/test_internal/test_process_redeemer.py |
Updates tests for new function signatures/flags and adds coverage for harvest-param refresh behavior. |
pyproject.toml |
Bumps sw-utils git ref to v0.13.0. |
poetry.lock |
Lockfile refresh for dependency updates (incl. sw-utils bump). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
tsudmi
reviewed
Apr 30, 2026
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
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
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| tx_hash = await multicall_contract.tx_aggregate(calls) | ||
| logger.info('Waiting for Update State multicall tx %s confirmation', tx_hash) | ||
| tx_receipt = await execution_client.eth.wait_for_transaction_receipt( | ||
| HexBytes(Web3.to_bytes(hexstr=tx_hash)), timeout=settings.execution_transaction_timeout |
Comment on lines
+98
to
+112
| async def is_meta_vault_state_update_required(meta_vault_address: ChecksumAddress) -> bool: | ||
| vault_version = await VaultContract(meta_vault_address).version() | ||
|
|
||
| if is_meta_vault_upgraded_to_release( | ||
| settings.network, meta_vault_address, vault_version, ContractReleaseVersion.V5 | ||
| ): | ||
| # V5 release: canUpdateState moved to SubVaultsRegistry | ||
| meta_vault_contract = MetaVaultContract(meta_vault_address) | ||
| sub_vaults_registry_address = await meta_vault_contract.sub_vaults_registry() | ||
| sub_vaults_registry_contract = SubVaultsRegistryContract(sub_vaults_registry_address) | ||
| return await sub_vaults_registry_contract.is_state_update_required() | ||
|
|
||
| # V4 release: canUpdateState is on the vault contract directly | ||
| v4_meta_vault_contract = V4MetaVaultContract(meta_vault_address) | ||
| return await v4_meta_vault_contract.is_state_update_required() |
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
tsudmi
reviewed
May 6, 2026
Signed-off-by: cyc60 <avsysoev60@gmail.com>
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.