No Op On Redundant Update #501
Draft
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.
Description
This PR intercepts the message before it reaches the ethereum client package and no-ops on
VerifyClientMessageandUpdateStateMsgif the header slot is the same as the latest consensus state height.It is intended as the most feasible stopgap solution before allowing historical updates
Note it does not check if the header is valid at all. We can't do header verification here without historical updates since the cosmwasm contract grabs the latest consensus state as the trusted state automatically. We cannot no-op in this case in the verification package as that would simply be a bug in the library.
It also does not implement automatic misbehaviour detection since this would require historical updates.
I have this PR up along with tests to show that this can work. But given the above reasons, I think it is most wise to simply go directly to allowing historical updates which is what i will work on next.
Leaving this PR up so that the team has context on my decision.
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
godoccomments.Files changedin the GitHub PR explorer.SonarCloud Reportin the comment section below once CI passes.