Skip to content

Commit c1e0f62

Browse files
Pantanijulienrbrt
andauthored
fix: remove interface registry provider (#4599)
* fix: remove interface registry provider * fix imports * use pseudo version --------- Co-authored-by: Julien Robert <julien@rbrt.fr>
1 parent e00b330 commit c1e0f62

File tree

3 files changed

+16
-61
lines changed

3 files changed

+16
-61
lines changed

changelog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
### Fixes
2020

21-
- [#4565](https://github.com/ignite/cli/issues/4565) Fix missing proto messages for the interface registry.
2221
- [#4577](https://github.com/ignite/cli/pull/4577) Add proto version to query path.
2322
- [#4579](https://github.com/ignite/cli/pull/4579) Fix empty params response.
2423
- [#4585](https://github.com/ignite/cli/pull/4585) Fix faucet cmd issue.

ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/root.go.plush

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@ import (
44
"os"
55

66
"cosmossdk.io/client/v2/autocli"
7-
"cosmossdk.io/core/address"
87
"cosmossdk.io/depinject"
98
"cosmossdk.io/log"
10-
"cosmossdk.io/x/tx/signing"
119
"github.com/cosmos/cosmos-sdk/client"
1210
"github.com/cosmos/cosmos-sdk/client/config"
1311
"github.com/cosmos/cosmos-sdk/codec"
1412
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
15-
"github.com/cosmos/cosmos-sdk/runtime"
1613
"github.com/cosmos/cosmos-sdk/server"
1714
"github.com/cosmos/cosmos-sdk/types/module"
1815
"github.com/cosmos/cosmos-sdk/x/auth/tx"
1916
authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
2017
"github.com/cosmos/cosmos-sdk/x/auth/types"
21-
"github.com/cosmos/gogoproto/proto"
2218
"github.com/spf13/cobra"
2319

2420
"<%= ModulePath %>/app"
@@ -36,7 +32,6 @@ func NewRootCmd() *cobra.Command {
3632
depinject.Configs(app.AppConfig(),
3733
depinject.Supply(log.NewNopLogger()),
3834
depinject.Provide(
39-
ProvideInterfaceRegistry,
4035
ProvideClientContext,
4136
),
4237
),
@@ -101,7 +96,7 @@ func NewRootCmd() *cobra.Command {
10196
// allowing it to be used for dependency injection and CLI operations.
10297
func ProvideClientContext(
10398
appCodec codec.Codec,
104-
interfaceRegistry InterfaceRegistry,
99+
interfaceRegistry codectypes.InterfaceRegistry,
105100
txConfigOpts tx.ConfigOptions,
106101
legacyAmino *codec.LegacyAmino,
107102
) client.Context {
@@ -127,42 +122,3 @@ func ProvideClientContext(
127122

128123
return clientCtx
129124
}
130-
131-
// InterfaceRegistry represents the codectypes.InterfaceRegistry wrapper.
132-
type InterfaceRegistry codectypes.InterfaceRegistry
133-
134-
// ProvideInterfaceRegistry resolves an issue with the proto.HybridResolver not
135-
// properly fetching the chain module messages into the interface registry.
136-
// This implementation ensures the proto.MergedRegistry() is called to correctly
137-
// initialize all proto message descriptors. Without this, the chain CLI query commands
138-
// return empty or incomplete data.
139-
// TODO consider removing this workaround once the SDK or Ignite resolves the issue.
140-
func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec runtime.ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner) (InterfaceRegistry, error) {
141-
signingOptions := signing.Options{
142-
AddressCodec: addressCodec,
143-
ValidatorAddressCodec: validatorAddressCodec,
144-
}
145-
146-
for _, signer := range customGetSigners {
147-
signingOptions.DefineCustomGetSigners(signer.MsgType, signer.Fn)
148-
}
149-
150-
mergedFiles, err := proto.MergedRegistry()
151-
if err != nil {
152-
return nil, err
153-
}
154-
155-
interfaceRegistry, err := codectypes.NewInterfaceRegistryWithOptions(codectypes.InterfaceRegistryOptions{
156-
ProtoFiles: mergedFiles,
157-
SigningOptions: signingOptions,
158-
})
159-
if err != nil {
160-
return nil, err
161-
}
162-
163-
if err := interfaceRegistry.SigningContext().Validate(); err != nil {
164-
return nil, err
165-
}
166-
167-
return interfaceRegistry, nil
168-
}

ignite/templates/app/files/go.mod.plush

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module <%= ModulePath %>
33
go 1.24.0
44

55
replace (
6-
// force go 1.24 sonic support
7-
github.com/bytedance/sonic => github.com/bytedance/sonic v1.13.1
6+
// force cosmos-sdk version because of https://github.com/cosmos/cosmos-sdk/pull/24335#issuecomment-2771481708
7+
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.50.13
88
// fix upstream GHSA-h395-qcrw-5vmq vulnerability.
99
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1
1010
// replace broken goleveldb
@@ -14,15 +14,15 @@ replace (
1414
)
1515

1616
require (
17-
cosmossdk.io/api v0.7.6
18-
cosmossdk.io/client/v2 v2.0.0-beta.6
19-
cosmossdk.io/collections v0.4.0
20-
cosmossdk.io/core v0.11.2
21-
cosmossdk.io/depinject v1.1.0
22-
cosmossdk.io/errors v1.0.1
23-
cosmossdk.io/log v1.5.0
24-
cosmossdk.io/math v1.5.0
25-
cosmossdk.io/store v1.1.1
17+
cosmossdk.io/api v0.9.0
18+
cosmossdk.io/client/v2 v2.0.0-beta.8.0.20250402172810-41e3e9d004a1
19+
cosmossdk.io/collections v1.2.0
20+
cosmossdk.io/core v0.11.3
21+
cosmossdk.io/depinject v1.2.0-rc.1
22+
cosmossdk.io/errors v1.0.2
23+
cosmossdk.io/log v1.5.1
24+
cosmossdk.io/math v1.5.2
25+
cosmossdk.io/store v1.1.2
2626
cosmossdk.io/tools/confix v0.1.2
2727
cosmossdk.io/x/circuit v0.1.1
2828
cosmossdk.io/x/evidence v0.1.1
@@ -41,11 +41,11 @@ require (
4141
github.com/spf13/cast v1.7.1
4242
github.com/spf13/cobra v1.9.1
4343
github.com/spf13/pflag v1.0.6
44-
github.com/spf13/viper v1.19.0
44+
github.com/spf13/viper v1.20.1
4545
github.com/stretchr/testify v1.10.0
46-
google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d
47-
google.golang.org/grpc v1.70.0
48-
google.golang.org/protobuf v1.36.5
46+
google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463
47+
google.golang.org/grpc v1.71.1
48+
google.golang.org/protobuf v1.36.6
4949
)
5050

5151
tool (

0 commit comments

Comments
 (0)