Remove secondary validator override #1313
Merged
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.
Why this should be merged
Currently
warp_getMessageAggregateSignature
andwarp_getBlockAggregateSignature
incorrectly override thesubnetID
twice.Specifically, the intended behavior is:
subnetID
is not overridden, use this chain's validator setsubnetID
is overridden, use the validator set requested by the callerThis is almost what the logic does currently, but there is a weird edge case. If the
subnetID
is overridden to use the primary network's validator set and this chain has enabled the optimization to use the local validator set for the primary network, then thesubnetID
is overridden for a second time and the chain's validator set will be used.We should not override the
subnetID
based on this chain's configuration. If the caller overrides thesubnetID
, that override should be honored.This edge case has likely never been hit, because no one would reasonably override the validator set to the primary network, as that would just make the message more expensive to issue.
How this works
Removes the second override along with the resulting dead code.
How this was tested
Existing CI still passes. I think this API is planned on being removed at some point in favor of the standalone relayer implementation, so I didn't add a regression test here.
Need to be documented?
No.
Need to update RELEASES.md?
Probably not? I doubt anyone has hit this.