-
Notifications
You must be signed in to change notification settings - Fork 887
Deprecate IBC write handlers #3947
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
Changes from all commits
e67939e
b66084c
6aeead8
3b59bdd
8d9d9b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package keeper | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/apps/transfer/types" | ||
| ) | ||
|
|
||
| // DeprecatedMsgServer is a types.MsgServer that rejects every message with | ||
| // types.ErrTransferDeprecated. | ||
| // | ||
| // It is registered as the transfer module's message server so that submitted | ||
| // transactions are rejected, while Keeper retains the executable transfer | ||
| // logic for the versioned EVM precompiles that replay historical blocks. | ||
| type DeprecatedMsgServer struct{} | ||
|
|
||
| var _ types.MsgServer = DeprecatedMsgServer{} | ||
|
|
||
| // Transfer defines an RPC handler for MsgTransfer. | ||
| func (DeprecatedMsgServer) Transfer(context.Context, *types.MsgTransfer) (*types.MsgTransferResponse, error) { | ||
| return nil, types.ErrTransferDeprecated | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package keeper | ||
|
|
||
| import ( | ||
| "context" | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/require" | ||
|
|
||
| "github.com/sei-protocol/sei-chain/sei-ibc-go/modules/apps/transfer/types" | ||
| ) | ||
|
|
||
| func TestDeprecatedMessages(t *testing.T) { | ||
| response, err := DeprecatedMsgServer{}.Transfer(context.Background(), &types.MsgTransfer{}) | ||
|
|
||
| require.Nil(t, response) | ||
| require.ErrorIs(t, err, types.ErrTransferDeprecated) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,7 +131,9 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { | |
|
|
||
| // RegisterServices registers module services. | ||
| func (am AppModule) RegisterServices(cfg module.Configurator) { | ||
| types.RegisterMsgServer(cfg.MsgServer(), am.keeper) | ||
| // Transactions are rejected as deprecated; Keeper.Transfer stays executable | ||
| // for the versioned EVM precompiles that replay historical blocks. | ||
| types.RegisterMsgServer(cfg.MsgServer(), keeper.DeprecatedMsgServer{}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [suggestion] The comment says Given the PR's goal of a stable deprecation error for transfer writes, consider gating the live precompile too (and adjusting this comment, which currently reads as if only legacy versions reach the keeper). |
||
| types.RegisterQueryServer(cfg.QueryServer(), am.keeper) | ||
|
|
||
| m := keeper.NewMigrator(am.keeper) | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.