Remove diff updater and subset updater - #1457
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy DiffUpdater and SubsetUpdater paths (relayer components, Solidity contracts, ABI bindings, and related tests/docs) and standardizes external-chain validator-set handling on the MerkleValidatorSetRegistry-based flow.
Changes:
- Simplified external EVM destination behavior to read the committed P-chain height directly from
MerkleValidatorSetRegistrycommitments. - Removed DiffUpdater/SubsetUpdater updater implementations, contract sources, ABI generation entries, and end-to-end test flows/suites that depended on them.
- Updated docs and remaining tests to describe and exercise the MerkleValidatorSetRegistry approach.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vms/evm/external_evm_destination_client.go | Removes legacy registry code paths; always reads committed P-chain height via MerkleValidatorSetRegistry commitment. |
| vms/destination_client.go | Stops passing/depending on external destination contract-type selection for message delivery. |
| scripts/abi_bindings.sh | Drops DiffUpdater/SubsetUpdater from the default Ethereum ABI bindings generation list. |
| relayer/validatorupdater/validatorset_metadata.go | Strips legacy payload-building logic; retains type solely to preserve codec type ID ordering. |
| relayer/validatorupdater/validator_set_merkle_commitment.go | Adds shared sumWeights helper used by Merkle commitment construction and updater logic. |
| relayer/validatorupdater/validator_set_diff.go | Strips legacy payload-building logic; retains type solely to preserve codec type ID ordering. |
| relayer/validatorupdater/subset_set_updater.go | Removes legacy SubsetUpdater relayer updater implementation. |
| relayer/validatorupdater/merkle_validator_updater.go | Centralizes polling/quorum constants used by the Merkle updater. |
| relayer/validatorupdater/diff_set_updater.go | Removes legacy DiffUpdater relayer updater implementation. |
| relayer/main/main.go | Removes updater-type switch and legacy start helpers; always starts the Merkle set updater for external destinations. |
| relayer/config/external_evm_destination.go | Removes legacy subset/diff configuration fields from external EVM destination config. |
| icm-contracts/tests/utils/validator_set_registry.go | Removes DiffUpdater/SubsetUpdater deployment helpers; keeps MerkleValidatorSetRegistry helper. |
| icm-contracts/tests/suites/services/services_suite_test.go | Removes SubsetUpdater/DiffUpdater service suite tests; retains MerkleUpdater test. |
| icm-contracts/tests/suites/ethereum-icm-verification/ethereum_icm_verification_suite_test.go | Removes legacy DiffUpdater/Adapter setup steps and related test case; aligns suite setup with current flows. |
| icm-contracts/tests/flows/services/subset_updater.go | Removes SubsetUpdater end-to-end flow. |
| icm-contracts/tests/flows/services/merkle_updater.go | Updates Merkle updater flow config/utility helpers to be the sole validator-set updater path. |
| icm-contracts/tests/flows/services/merkle_message_relay.go | Updates Merkle message relay flow config (removes explicit contract-type selection). |
| icm-contracts/tests/flows/services/diff_updater.go | Removes DiffUpdater end-to-end flow. |
| icm-contracts/tests/flows/ethereum_icm_verification/merkle_validator_set_registry.go | Adds ECDSA signing helper for verification tests and related imports. |
| icm-contracts/tests/flows/ethereum_icm_verification/avalanche_validator_set_registry.go | Removes legacy AvalancheValidatorSetRegistry verification flow. |
| icm-contracts/ethereum/utils/ValidatorSets.sol | Removes legacy sharded registry/diff utilities; keeps Merkle attestation/commitment utilities. |
| icm-contracts/ethereum/tests/ValidatorSets.t.sol | Removes tests for legacy diff/shard/signature paths; keeps Merkle serialization roundtrip tests. |
| icm-contracts/ethereum/SubsetUpdater.sol | Removes legacy SubsetUpdater contract. |
| icm-contracts/ethereum/interfaces/IAvalancheValidatorSetRegistry.sol | Removes legacy registry interface. |
| icm-contracts/ethereum/DiffUpdater.sol | Removes legacy DiffUpdater contract. |
| icm-contracts/ethereum/AvalancheValidatorSetRegistry.sol | Removes legacy sharded validator set registry contract. |
| ethereum/run_ethereum_network.sh | Updates comment to reflect current validator set registry deployment needs. |
| docs/external-interop/origin_ethereum/zk_state_verifier.md | Updates terminology/linking to MerkleValidatorSetRegistry. |
| docs/external-interop/origin_avalanche/validator_set_registry.md | Rewrites documentation to describe MerkleValidatorSetRegistry commitment-based design. |
| docs/external-interop/origin_avalanche/relayer_changes.md | Updates relayer documentation to reflect MerkleSetUpdater-only behavior and updated config shape. |
Suppressed comments (1)
relayer/config/external_evm_destination.go:41
MaxUpdateIntervalSeconds's comment still refers to a "weight change threshold", but the threshold fields were removed fromExternalEVMDestinationin this PR. Update the comment to reflect the current behavior (force an update after the interval even if the commitment/root hasn’t changed).
// Maximum duration (in seconds) between on-chain updates. Even if the
// weight change is below the threshold, an update is forced after this
// interval. 0 means no staleness cap (legacy behavior).
MaxUpdateIntervalSeconds uint64 `mapstructure:"max-update-interval-seconds" json:"max-update-interval-seconds,omitempty"` //nolint:lll
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
db02aff to
808c679
Compare
| # Validator Set Registry | ||
|
|
||
| Many applications on external EVM chains will want to authenticate messages originating from Avalanche or Avalanche L1s by checking it is signed by a quorum of the relevant validator set. In order for an external EVM chain to know what the relevant validator set is, a smart contract will be deployed that maintains a registry of such validator sets. The contract that contains the logic for this is called the `AvalancheValidatorSetRegisty`. However, this contract is agnostic of the data format used to update validator sets; these details will be handled by child contracts which will be the actual contracts deployed. | ||
| Many applications on external EVM chains will want to authenticate messages originating from Avalanche or Avalanche L1s by checking that they are signed by a quorum of the relevant validator set. In order for an external EVM chain to know what the relevant validator set is, a smart contract is deployed that maintains a registry of such validator sets. That contract is the `MerkleValidatorSetRegistry`. |
There was a problem hiding this comment.
This last sentence makes it sound as if there is one contract as opposed to two contacts implementing the same interface. In fact, quite a bit of the language here and in other places in the specs seem to imply MerkleValidatorSetRegistry is the only contract
There was a problem hiding this comment.
Sorry, what is the second contract?
There was a problem hiding this comment.
The ZKValidatorSetRegistry
Why this should be merged
Removes the diff updater and subset updater, as these were both superceded by the merkle validator set registry
How this works
How this was tested
How is this documented