-
Notifications
You must be signed in to change notification settings - Fork 592
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
refactor: ics27 indicator tests of deterministic error codes and message responses #1349
refactor: ics27 indicator tests of deterministic error codes and message responses #1349
Conversation
Codecov Report
@@ Coverage Diff @@
## carlos/upgrade-pr-branch #1349 +/- ##
=========================================================
Coverage 79.88% 79.88%
=========================================================
Files 152 152
Lines 10982 10982
=========================================================
Hits 8773 8773
Misses 1783 1783
Partials 426 426
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much, @colin-axner!
would appreciate a post merge ack from another person cc @seantking @damiannolan The changes are pretty straightforward, but always nice to have 2 pairs of eyes on important changes |
* deps: upgrade of SDK to 0.46 and tendermint to 0.35 * some changes from review comments * some review comments * refactor: simplify IBC redundant relay check in given restructure of SDK v0.46 (#1288) * refactor: simplify ibc redundancy check used as sdk middleware Instead of having the function checkRedundancy check if the call is on CheckTx or SimulateTx, only call the function on CheckTx or SimulateTx * add godoc * more review comments. * another review comment * remove tests since legacy REST endpoints have been removed in SDK 0.46 * chore: update sdk to v0.46.0-beta2 * refactor: ics27 indicator tests of deterministic error codes and message responses (#1349) * begin refactoring ack_test * fix test due to delayed block execution * refactor: switch ics27 response creation to use new SDK version, update tests * fix import * review comment Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * review comment. * pass nil context Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * review comment Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * remove unused import * remove unused import * fix for race condition in tests * remove replace directive to make it build in pre-monterrey mac OS X Co-authored-by: Carlos Rodriguez <crodveg@gmail.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Description
Readjusts the acknowledgement test which ensures the error code is deterministic (and thus can be included in the acknowledgement without halting the network.
In v0.35, tendermint made the construction of the LastResultsHash private. In order to maintain the spirit of the original test which allows us to automatically detect when our expected behaviour changes, I have added in process tests which commit a single transaction via tendermint. I then reconstruct the expected hash and ensure they are equal. To show the code is deterministic, I reconstruct the expected hash again with a different error code and show they are not equal. The same is done for successful transaction (a different message response is used)
I have updated the handling of transaction responses in the ics27 acknowledgement as specified in ADR 003
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.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes