-
Notifications
You must be signed in to change notification settings - Fork 1k
Replay protection improvements #1905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
bbead89 to
037fbf7
Compare
21d3385 to
49da8ff
Compare
bb1f128 to
0fdf7e2
Compare
30f18ad to
6b68dd7
Compare
6b68dd7 to
8d1932f
Compare
14de649 to
52eda02
Compare
Collaborator
|
is this mergeable in 0.24.0? |
Closed
10 tasks
Merged
Collaborator
Author
|
Converting this back to draft since it needs a few touches because of #1867 |
52eda02 to
373f1b1
Compare
373f1b1 to
1e91762
Compare
1e91762 to
eef404f
Compare
eef404f to
fc90634
Compare
Collaborator
Author
|
@tzemanovic ready again for review |
tzemanovic
reviewed
Nov 7, 2023
tzemanovic
reviewed
Nov 7, 2023
tzemanovic
previously approved these changes
Nov 7, 2023
tzemanovic
previously approved these changes
Nov 7, 2023
a826c41 to
1e91762
Compare
1e91762 to
12aeb34
Compare
grarco
added a commit
that referenced
this pull request
Nov 7, 2023
Closed
12aeb34 to
1878a4c
Compare
grarco
added a commit
that referenced
this pull request
Nov 7, 2023
Closed
tzemanovic
approved these changes
Nov 8, 2023
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.
Describe your changes
Closes #1568.
Better handles the case of an invalid wrapper tx (ABCI only) regarding fee payment and replay protection: the hash of the wrapper is committed to storage to avoid replays given that the wrapper signer, in this case, is forced to pay whatever amount of fees they can.
Remove the hash of the inner tx (for replay protection purposes) in more cases:
UndecryptableHeaderfor replay protection)This makes for a more correct replay protection mechanism. To do this, I used some sentinel variables to be able to detect these errors in wasm. Also fixed a bug regarding the
OutOfGaserror which, for the same reason, could not be detected and was not triggering the hash removal (again, fixed using the same sentinel variable). Theoretically, the wasm error can be downcasted to the original error but the method to do so is fallible (and indeed, in some tests I ran it failed because of multiple strong references on the innerArc): so, to guarantee a consisting behavior, I had to rely on the sentinel.Indicate on which release or other PRs this topic is based on
v0.25.0
Checklist before merging to
draft