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

Offline signing command requesting local node #3201

Closed
dan-u410 opened this issue May 8, 2024 · 7 comments
Closed

Offline signing command requesting local node #3201

dan-u410 opened this issue May 8, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@dan-u410
Copy link

dan-u410 commented May 8, 2024

Some steps in the offline flow don't match the workflow I'm seeking:

Generation:

  • This was workable, however, to avoid ever loading private keys to the online machine there's an extra step not noted in the docs:
namada wallet add --alias view-only-wallet --value <my-public-key>
  • This might be helpful to add for others following this guide since the error message returned without this is very confusing at first

Signing:

I've configured my offline wallet with the secret keys necessary for signing, however it seems the node needs to be started locally to sign offline?

  • the sign-tx command immediately checks for a node connection here but it looks like this is only used to look up the wallet context
  • is there a way to pass in a wallet file or similar as an argument and forego any node requests when offline?
namadac sign-tx --tx-path transfer.tx --owner wallet1
Failed to query node status with error:
   0: HTTP error
   1: error sending request for url (http://127.0.0.1:26657/): error trying to connect: tcp connect error: Connection refused (os error 61)
....

Broadcast:

  • I've gotten this working but there are some sharp edges that I wanted to note:
  • i) this command wants to automatically submit a reveal_pk tx. However, this is not possible when the owner's private keys are not loaded onto the node. I am forking the SDK and removing this line from this command since I will issue the reveal_pk command indepdentely
  • ii) This transaction needs to be signed by the gas_payer to be valid. This should be moved to the offline sign-tx command so private keys never needed to be loaded to the online machine
namada client tx --tx-path tx.tx --signatures sig1.tx --owner view-only-wallet --node https://rpc.luminara.icu --gas-payer view-only-wallet --force
Submitting a tx to reveal the public key for address <address>...
Error: 
   0: unable to sign transaction with <pubkey>
....

I am following the offline signing guide in the docs here

Running version: Namada v0.32.0 on campfire testnet luminara.45fd94fb5c14d0dd304da

@dan-u410 dan-u410 added the bug Something isn't working label May 8, 2024
@dan-u410 dan-u410 changed the title Offline signing command requesting an online node Offline signing command requesting local node May 8, 2024
@dan-u410 dan-u410 closed this as completed May 8, 2024
@dan-u410 dan-u410 reopened this May 8, 2024
@murisi
Copy link
Contributor

murisi commented Jul 11, 2024

Hi @dan-u410 . Thank you for brining these issues up! Over the next few days I'll try to reproduce them and reduce the need for a local node in some of the namada commands.

@dan-u410
Copy link
Author

dan-u410 commented Jul 15, 2024

Hi @murisi any update on this? It looks like broadcast is also not able to function without some account's private-keys loaded on a hot machine to act as the gas-payer. imo this is problematic

@dan-u410
Copy link
Author

dan-u410 commented Jul 17, 2024

it looks like there is a bug in namada client reveal-pk --public-key <pubkey> --node https://rpc.luminara.icu --dump-tx that also doesn't dump bytes to stdout or file.

as I currently understand this; generation/signing/broadcast are all broken in some form

@dan-u410
Copy link
Author

dan-u410 commented Aug 21, 2024

Hi @murisi | @cwgoes - am looking forward mainnet. wanted to touch base here and see if you guys have any updates on offline signing support? The publicly available ledger app is still on v0.0.16 which is non-functioning and offline signing appears to have several bugs

@Fraccaman
Copy link
Member

we are currently working on this (pr #3648)

@dan-u410
Copy link
Author

dan-u410 commented Sep 5, 2024

Hi @Fraccaman any updates here on offline signing? it looks like the PR has been closed.

@Fraccaman
Copy link
Member

Fraccaman commented Sep 9, 2024

hey @dan-u410! We merged it via #3715 and we are going to cut a release soon (this week)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants