-
Notifications
You must be signed in to change notification settings - Fork 955
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
Replay protection improvements #1905
Merged
Merged
Conversation
This file contains 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
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
2 times, most recently
from
September 22, 2023 16:25
bbead89
to
037fbf7
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
September 26, 2023 16:00
21d3385
to
49da8ff
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
September 29, 2023 17:30
bb1f128
to
0fdf7e2
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 2, 2023 14:20
30f18ad
to
6b68dd7
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 3, 2023 14:53
6b68dd7
to
8d1932f
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 3, 2023 19:00
14de649
to
52eda02
Compare
is this mergeable in 0.24.0? |
Closed
10 tasks
Merged
Converting this back to draft since it needs a few touches because of #1867 |
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 24, 2023 16:11
52eda02
to
373f1b1
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 24, 2023 18:16
373f1b1
to
1e91762
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 25, 2023 16:05
1e91762
to
eef404f
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
October 25, 2023 16:59
eef404f
to
fc90634
Compare
@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
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
November 7, 2023 15:11
a826c41
to
1e91762
Compare
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
November 7, 2023 15:35
1e91762
to
12aeb34
Compare
grarco
added a commit
that referenced
this pull request
Nov 7, 2023
Closed
grarco
force-pushed
the
grarco/replay-protection-improvements
branch
from
November 7, 2023 16:45
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:
Undecryptable
Header
for 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
OutOfGas
error 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