-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
remove IBC ante handler in favor of using handler #6793
Conversation
|
||
attributes := make([]sdk.Attribute, len(msg.GetSigners())) | ||
|
||
for i, signer := range msg.GetSigners() { |
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.
Is this information useful? If so I can add it to the corresponding handlers
Codecov Report
@@ Coverage Diff @@
## master #6793 +/- ##
==========================================
+ Coverage 60.68% 60.80% +0.12%
==========================================
Files 511 412 -99
Lines 31542 25025 -6517
==========================================
- Hits 19141 15217 -3924
+ Misses 10951 8550 -2401
+ Partials 1450 1258 -192 |
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.
post-merge ACK 👍
* remove IBC ante handler, add calls to handler * move some events upstream to handler * remove change log entry * move ante handler tests to handler * fix build * update docs Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* remove IBC ante handler, add calls to handler * move some events upstream to handler * remove change log entry * move ante handler tests to handler * fix build * update docs Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
@@ -110,16 +110,6 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.H | |||
), | |||
) | |||
|
|||
// localhost client is not updated though messages | |||
if clientType != exported.Localhost { |
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.
Hey
@@ -4,15 +4,13 @@ import ( | |||
sdk "github.com/cosmos/cosmos-sdk/types" | |||
"github.com/cosmos/cosmos-sdk/x/auth/signing" | |||
"github.com/cosmos/cosmos-sdk/x/auth/types" | |||
ibcante "github.com/cosmos/cosmos-sdk/x/ibc/ante" | |||
ibckeeper "github.com/cosmos/cosmos-sdk/x/ibc/keeper" | |||
) | |||
|
|||
// NewAnteHandler returns an AnteHandler that checks and increments sequence | |||
// numbers, checks signatures & account numbers, and deducts fees from the first | |||
// signer. | |||
func NewAnteHandler( |
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.
Creator
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.
retire el controlador ante IBC a favor de usar el controlador #6793
Hecho
Description
Moves the function calls in the ante handler to the handler level since no state changes occur within the
...Pakcet
function calls. This design was previously motivated by ADR 15 which was only partially implemented. From what I can tell, the motivation for the existence packet verification and update client within the ante handler was:Intuitive interface for developers - IBC handlers do not need to care about IBC authentication
and possibly to allow update client changes to be persisted despite IBC handler failures, though this is unmentioned in the ADR. The above pro is still applied as IBC application developers still do not handle IBC authentication.
The IBC Keeper and ante handler function are now removed from the
x/auth
ante which I think is a substantial benefit since I do not believe IBC should be a first class citizen in the SDK rather an extra module that the application may choose not to include.The IBC authentication will no longer be susceptible to a griefing attack where an attacker could submit txs that fail in the ante handler without having to pay fees for it. UpdateClient could be a potential vector since it can be computationally expensive. (credit: @AdityaSripal).
The con for this change is
UpdateClient
processing will not be persisted if any message within a transaction fails. This is negligible and corresponds to existing SDK transaction processing logic. It is also more of a UI issue.ref (undoing some proposed changes): #5230
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