From f9b41939fd42de69727facc311e65facdf433421 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 11:31:19 -0500 Subject: [PATCH 1/8] register withdraw emissions to legacy amino --- x/emissions/types/codec.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x/emissions/types/codec.go b/x/emissions/types/codec.go index 4f0a3e3b48..5a1aed0a0a 100644 --- a/x/emissions/types/codec.go +++ b/x/emissions/types/codec.go @@ -3,13 +3,18 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) -func RegisterCodec(_ *codec.LegacyAmino) { +func RegisterCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgWithdrawEmission{}, "emissions/WithdrawEmission", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgWithdrawEmission{}, + ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } From e5f4271015404571236bce40d954ec8da976fc7e Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 11:33:28 -0500 Subject: [PATCH 2/8] add changelog entry --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index a85e8ff86c..2f7bbb1d5c 100644 --- a/changelog.md +++ b/changelog.md @@ -75,6 +75,7 @@ * [3018](https://github.com/zeta-chain/node/pull/3018) - support `DepositAndCall` and `WithdrawAndCall` with empty payload * [3030](https://github.com/zeta-chain/node/pull/3030) - Avoid storing invalid Solana gateway address in the `SetGatewayAddress` * [3047](https://github.com/zeta-chain/node/pull/3047) - wrong block hash in subscribe new heads +* [3166](https://github.com/zeta-chain/node/pull/3117) - register withdraw emissions to legacy amino ## v20.0.0 From a6793379bcc140e5d42ae1633d3f0e8ad0768964 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 13:04:06 -0500 Subject: [PATCH 3/8] register update params --- contrib/localnet/scripts/start-zetacored.sh | 9 +++++++++ x/crosschain/types/authz.go | 2 ++ x/emissions/types/codec.go | 2 ++ 3 files changed, 13 insertions(+) diff --git a/contrib/localnet/scripts/start-zetacored.sh b/contrib/localnet/scripts/start-zetacored.sh index c0e8424738..c77432c0a9 100755 --- a/contrib/localnet/scripts/start-zetacored.sh +++ b/contrib/localnet/scripts/start-zetacored.sh @@ -54,6 +54,15 @@ add_v17_message_authorizations() { }, "expiration": null }, + { + "granter": .operator, + "grantee": .granteeAddress, + "authorization": { + "@type": "/cosmos.authz.v1beta1.GenericAuthorization", + "msg": "/zetachain.zetacore.emissions.MsgWithdrawEmission" + }, + "expiration": null + }, { "granter": .operator, "grantee": .granteeAddress, diff --git a/x/crosschain/types/authz.go b/x/crosschain/types/authz.go index 97a09c979e..06d930d4bf 100644 --- a/x/crosschain/types/authz.go +++ b/x/crosschain/types/authz.go @@ -2,6 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" + emissionstypes "github.com/zeta-chain/node/x/emissions/types" observertypes "github.com/zeta-chain/node/x/observer/types" ) @@ -16,5 +17,6 @@ func GetAllAuthzZetaclientTxTypes() []string { sdk.MsgTypeURL(&observertypes.MsgVoteTSS{}), sdk.MsgTypeURL(&observertypes.MsgVoteBlame{}), sdk.MsgTypeURL(&observertypes.MsgVoteBlockHeader{}), + sdk.MsgTypeURL(&emissionstypes.MsgWithdrawEmission{}), } } diff --git a/x/emissions/types/codec.go b/x/emissions/types/codec.go index 5a1aed0a0a..4c8ca20637 100644 --- a/x/emissions/types/codec.go +++ b/x/emissions/types/codec.go @@ -9,11 +9,13 @@ import ( func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgWithdrawEmission{}, "emissions/WithdrawEmission", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "emissions/UpdateParams", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgWithdrawEmission{}, + &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } From 4a49a2919ef574799d9c3af502c43b738fd0fbe2 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 13:20:48 -0500 Subject: [PATCH 4/8] format code --- x/crosschain/types/authz.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/crosschain/types/authz.go b/x/crosschain/types/authz.go index 06d930d4bf..a0f87313c6 100644 --- a/x/crosschain/types/authz.go +++ b/x/crosschain/types/authz.go @@ -2,8 +2,8 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - emissionstypes "github.com/zeta-chain/node/x/emissions/types" + emissionstypes "github.com/zeta-chain/node/x/emissions/types" observertypes "github.com/zeta-chain/node/x/observer/types" ) From 73f4ccce0f4fb64128dc250fcc023952a2d4a1d4 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 14:02:09 -0500 Subject: [PATCH 5/8] add changelog --- changelog.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2f7bbb1d5c..144b98c518 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,9 @@ ### Tests * [3075](https://github.com/zeta-chain/node/pull/3075) - ton: withdraw concurrent, deposit & revert. +### Fixes +* [3166](https://github.com/zeta-chain/node/pull/3117) - register withdraw emissions to legacy amino codec. + ## v21.0.0 ### Features @@ -75,7 +78,7 @@ * [3018](https://github.com/zeta-chain/node/pull/3018) - support `DepositAndCall` and `WithdrawAndCall` with empty payload * [3030](https://github.com/zeta-chain/node/pull/3030) - Avoid storing invalid Solana gateway address in the `SetGatewayAddress` * [3047](https://github.com/zeta-chain/node/pull/3047) - wrong block hash in subscribe new heads -* [3166](https://github.com/zeta-chain/node/pull/3117) - register withdraw emissions to legacy amino + ## v20.0.0 From add50cda586298f236bae73afa39a57c8c794e3d Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 14:02:55 -0500 Subject: [PATCH 6/8] refactor changelog entry --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 144b98c518..4926cd1c50 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,7 @@ * [3075](https://github.com/zeta-chain/node/pull/3075) - ton: withdraw concurrent, deposit & revert. ### Fixes -* [3166](https://github.com/zeta-chain/node/pull/3117) - register withdraw emissions to legacy amino codec. +* [3166](https://github.com/zeta-chain/node/pull/3117) - register messages for emissions module to legacy amino codec. ## v21.0.0 From c4c26da7f2278a2111997008ed494cf3d156912c Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 6 Nov 2024 14:07:14 -0500 Subject: [PATCH 7/8] remove MsgWithdrawEmissions from zetaclient grants --- contrib/localnet/scripts/start-zetacored.sh | 9 --------- x/crosschain/types/authz.go | 2 -- 2 files changed, 11 deletions(-) diff --git a/contrib/localnet/scripts/start-zetacored.sh b/contrib/localnet/scripts/start-zetacored.sh index c77432c0a9..c0e8424738 100755 --- a/contrib/localnet/scripts/start-zetacored.sh +++ b/contrib/localnet/scripts/start-zetacored.sh @@ -54,15 +54,6 @@ add_v17_message_authorizations() { }, "expiration": null }, - { - "granter": .operator, - "grantee": .granteeAddress, - "authorization": { - "@type": "/cosmos.authz.v1beta1.GenericAuthorization", - "msg": "/zetachain.zetacore.emissions.MsgWithdrawEmission" - }, - "expiration": null - }, { "granter": .operator, "grantee": .granteeAddress, diff --git a/x/crosschain/types/authz.go b/x/crosschain/types/authz.go index a0f87313c6..97a09c979e 100644 --- a/x/crosschain/types/authz.go +++ b/x/crosschain/types/authz.go @@ -3,7 +3,6 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - emissionstypes "github.com/zeta-chain/node/x/emissions/types" observertypes "github.com/zeta-chain/node/x/observer/types" ) @@ -17,6 +16,5 @@ func GetAllAuthzZetaclientTxTypes() []string { sdk.MsgTypeURL(&observertypes.MsgVoteTSS{}), sdk.MsgTypeURL(&observertypes.MsgVoteBlame{}), sdk.MsgTypeURL(&observertypes.MsgVoteBlockHeader{}), - sdk.MsgTypeURL(&emissionstypes.MsgWithdrawEmission{}), } } From b1c7957b064fd68f767ca41257c58f521ba226fc Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Wed, 13 Nov 2024 10:09:24 +0100 Subject: [PATCH 8/8] Update changelog.md --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 15879567e5..3571e16db6 100644 --- a/changelog.md +++ b/changelog.md @@ -20,7 +20,7 @@ * [3137](https://github.com/zeta-chain/node/pull/3137) - remove chain.Chain from zetaclientd config ### Fixes -* [3166](https://github.com/zeta-chain/node/pull/3117) - register messages for emissions module to legacy amino codec. +* [3117](https://github.com/zeta-chain/node/pull/3117) - register messages for emissions module to legacy amino codec. * [3041](https://github.com/zeta-chain/node/pull/3041) - replace libp2p public DHT with private gossip peer discovery and connection gater for inbound connections * [3106](https://github.com/zeta-chain/node/pull/3106) - prevent blocked CCTX on out of gas during omnichain calls * [3139](https://github.com/zeta-chain/node/pull/3139) - fix config resolution in orchestrator