Skip to content
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

x/authz and x/feegrant don't support ledger signing #11190

Closed
aaronc opened this issue Feb 14, 2022 · 5 comments · Fixed by #11224
Closed

x/authz and x/feegrant don't support ledger signing #11190

aaronc opened this issue Feb 14, 2022 · 5 comments · Fixed by #11224

Comments

@aaronc
Copy link
Member

aaronc commented Feb 14, 2022

We omitted supporting amino for x/authz and x/feegrant. Given that sign mode textual we'll take a bit of time, I think we should consider adding amino definitions in 0.46 so users can use these with ledger keys.

@aaronc aaronc added this to the v0.46 milestone Feb 14, 2022
@amaury1093
Copy link
Contributor

amaury1093 commented Feb 15, 2022

So we actually already have Amino support for authz/feegrant:

// For amino support.
_ legacytx.LegacyMsg = &MsgGrant{}
_ legacytx.LegacyMsg = &MsgRevoke{}
_ legacytx.LegacyMsg = &MsgExec{}

_, _ legacytx.LegacyMsg = &MsgGrantAllowance{}, &MsgRevokeAllowance{} // For amino support.

and some people tested with ledger.

We don't have the RegisterLegacyAminoCodec function for both of them. For Amino signing (i.e. encoding), we probably don't need it, as Zaki pointed out in a slack thread. We maybe need RegisterLegacyAminoCodec for amino decoding, e.g. in the old REST api, but since that it gone maybe we can actually remove all RegisterLegacyAminoCodec (maybe).

@tac0turtle
Copy link
Member

ledger signing is supported via cli. Its unfortunate but not sure its possible to do it in grpc?

@aaronc
Copy link
Member Author

aaronc commented Feb 16, 2022

So we actually already have Amino support for authz/feegrant:

// For amino support.
_ legacytx.LegacyMsg = &MsgGrant{}
_ legacytx.LegacyMsg = &MsgRevoke{}
_ legacytx.LegacyMsg = &MsgExec{}

_, _ legacytx.LegacyMsg = &MsgGrantAllowance{}, &MsgRevokeAllowance{} // For amino support.

and some people tested with ledger.

We don't have the RegisterLegacyAminoCodec function for both of them. For Amino signing (i.e. encoding), we probably don't need it, as Zaki pointed out in a slack thread. We maybe need RegisterLegacyAminoCodec for amino decoding, e.g. in the old REST api, but since that it gone maybe we can actually remove all RegisterLegacyAminoCodec (maybe).

Where does the amino name come from if we don't do RegisterConcrete?

@amaury1093
Copy link
Contributor

Where does the amino name come from if we don't do RegisterConcrete?

Turns out Amino just skips the name, i.e. skips the type field, and just outputs the value. See cosmos/cosmjs#1026 (comment) for some digging done by @RiccardoM

I created a PR to fix this: #11214

@aaronc
Copy link
Member Author

aaronc commented Feb 17, 2022

I guess that's both good and scary 😱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
3 participants