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

Handle Ledger devices #144

Closed
tombeynon opened this issue Mar 13, 2022 · 10 comments
Closed

Handle Ledger devices #144

tombeynon opened this issue Mar 13, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@tombeynon
Copy link
Contributor

tombeynon commented Mar 13, 2022

I'm learning that when you send a TX you can provide it in two structures; Amino (legacy) and Protobuf. Keplr uses Protobuf if the wallet supports it, otherwise falls back to Amino. Typically transactions are sent in Protobuf format, and the blockchain (or Keplr, CosmJS..?) automatically converts them to Amino if it knows how to do so.

Authz transactions aren't supported for this conversion currently and REStake only send the Protobuf version. More importantly though, it doesn't seem like it's possible to send the right message structure based on the discussion in the below issues.

I need to spend a bit of time working out if it's possible to work around this, or if we have to wait for a chain upgrade to an unreleased SDK version.

Related:

cosmos/cosmjs#1026

cosmos/cosmos-sdk#11190

cosmos/cosmos-sdk#11224

@tombeynon
Copy link
Contributor Author

Specific comment about working around with cosmjs cosmos/cosmjs#1026 (comment)

@tombeynon tombeynon added the enhancement New feature or request label Mar 13, 2022
@webmaster128
Copy link

Please see https://medium.com/confio/authz-and-ledger-signing-an-executive-summary-8754a0dc2a88 for a high level overview of the current limitation.

(Props for the work here by the way!)

@tombeynon
Copy link
Contributor Author

Thanks so much for the writeup @webmaster128, that's extremely helpful. Is there a rough ETA on SDK 0.46? Would much rather wait for that than try to hack around it, but as you can imagine, 'wen ledger' is getting louder 😂

@webmaster128
Copy link

I hear rumors of 1-2 months, but I'm not involved in Cosmos SDK development. Certainly this summer.

@tombeynon
Copy link
Contributor Author

Okay great. Thanks for everything you do @webmaster128, relied on a lot of your work to build this

@tombeynon tombeynon removed the status in REStake Apr 10, 2022
@tombeynon tombeynon moved this to Todo in REStake Jun 12, 2022
@schmurfy
Copy link

is there anything still blocking ?
All the issues linked are now fixed as it seems and it would be nice to be able to use restake without workaround

@webmaster128
Copy link

Which message types exactly do you need? This issue was pulled out and is still open: cosmos/cosmjs#1092

Which networks migrated to 0.46 already?

@tombeynon
Copy link
Contributor Author

I've just started working on this against the Secret Network testnet, which is the first chain I'm aware of with the required Amino support.

I'm hacking together some amino converters now to test which could be useful for cosmos/cosmjs#1092 @webmaster128. I've got generic MsgGrant and MsgRevoke working with a lot of help from @assafmo, and just tackling MsgExec at the moment.

Draft PR is here for those interested: https://github.com/eco-stake/restake/pull/597/files#diff-c4e4865b30fe4e4878df9f8b89a8b310cb58df4c920b4501a0434081a4af117cR4

@tombeynon
Copy link
Contributor Author

Resolved in #597. Secret Network mainnet is the first with enabled support, and new chains will be enabled as required.

A separate task needs to be completed to identify and enable v0.46 chains automatically but we have some time for this.

The Authz Amino converter is the solution if anyone finds this looking for implementation details - https://github.com/eco-stake/restake/blob/master/src/converters/Authz.mjs

Repository owner moved this from Todo to Done in REStake Sep 22, 2022
@assafmo
Copy link

assafmo commented Sep 29, 2022

To identify the Cosmos SDK version you can use the /cosmos/base/tendermint/v1beta1/node_info endpoint, e.g.:

curl https://secret-4.api.trivium.network:1317/cosmos/base/tendermint/v1beta1/node_info -s |
    jq '.application_version.cosmos_sdk_version'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

4 participants