anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.39k stars 948 forks source link

`Namadac tx` broadcasting bugs #3875

Open dan-u410 opened 1 day ago

dan-u410 commented 1 day ago

submitting a signed transaction to the chain requires private keys loaded which breaks offline signing:

$ namadac tx --tx-path $tx --signatures $tx.sig --owner view_only_account --node 'https://rpc.knowable.run' --gas-payer view_only_account
Error:
   0: unable to sign transaction with tpknam1qr...

the CLI also uses the private keys to submit reveal the public key type transactions during broadcast. If signing offline, the key isnt available at this time to submit this type of transaction

dan-u410 commented 1 day ago

@Fraccaman please let me know if I can assist 😄

grarco commented 9 hours ago

Hi @dan-u410, thanks for reporting this. This seems indeed the case, if you request to dump a tx to later sign it off-line we skip the check for the need of the reveal_pk tx so that the dumped batch does not contain it. When you later load it for submission we do this check and push an extra tx to the batch for which you don't have the signing key online.

It has to be noted that dumping and offline signing was mostly meant for txs involving multi-sig accounts, for which a reveal_pk tx is not needed.

We'll see what to do internally

grarco commented 7 hours ago

Spoken with @Fraccaman, seems like instead we want to be able to attach an offline wrapper signature, nothing to do with the reveal pk tx. We'll work on that

dan-u410 commented 4 hours ago

Hi @grarco sorry to be confusing on reveal_pk. Totally understand all your points! My main point is that the current broadcast command seems to add the reveal_pk tx to the batch somewhat erroneously. Ive already done that for my account but I am re-prompted for this many times

This is not as important as being able to sign fees offline - but wanted to flag! Simply attaching the offline wrapper signature is a great improvement