5

It‘s actually all in the title: When using the “official” command line interface wallet (https://github.com/iotaledger/cli-app) and e.g. attaching an address, is PoW executed on the client or by the connected full node?

2

As this CLI wallet uses iota.lib.js and not also curl.lib.js, and attachToTangle is nowhere overwritten (monkey-patched), PoW will be executed on the full node you connect to. In case the node does not allow so, transactions/transfers will fail.

  • Thanks! But in theory, the wallet could do the PoW, never call attachToTangle and just use broadcastTransactions to send the transactions including the nonce (PoW) to the network. Is this correct? Asked differently: There is no need to call attachToTangle because all it does is outsourcing PoW, or? (I still think, that the name for the API method is somewhat misleading.) – ralf Dec 27 '17 at 12:01
  • Yes. the wallet could just depend on curl.lib.js and call its overrideAttachToTangle function, which will redirect all attachToTangle calls (by the wallet or somewhere hidden in the lib by e.g. sendTransfer to local PoW. – mihi Dec 27 '17 at 12:04
  • This makes it crystal clear for me. So attachToTangle actually doesn’t attach anything to the tangle. It is sendTransactions which does so. I was stuck with this for a while! – ralf Dec 27 '17 at 12:08
  • yes. It only builds consistent transactions that are part of the "virtual" tangle spanning over all nodes and wallets. sendTransactions (which will internally call store and broadcast) will actually send these transactions to the node and its neighbors. – mihi Dec 27 '17 at 12:15
  • See also iota.stackexchange.com/a/989/134 (an answer to your other question) – mihi Dec 27 '17 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.