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

Open
dan-u410 opened this issue May 8, 2024 · 0 comments
Open

Offline signing command requesting local node #3201

dan-u410 opened this issue May 8, 2024 · 0 comments
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
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

1 participant