TOR and Slatepack addresses

Okay so, I’m having trouble attempting TOR hidden service transfer, I have 2 computers, one is listening grin-wallet -e listen and when I run on my other computer grin-wallet send --dest <slatepack addr> <amt> I get Unable to send transaction via TOR. Attempting alternate methods. What might I be doing wrong?

This also brings me to my other question: what is the proper way of installing tor (just the executable)
I think I have tor working at least on my listening machine, because grin-wallet says: Starting TOR Hidden Service for API listener at address...

Both of my machines running Ubuntu 18 by the way.

Thanks for any help.

Which version of tor are you running?

You don’t need to use the -e flag by the way.

Ubuntu 18 is too old for debian. You need to build tor locally to get the proper version of tor. Or you need to update your OS.

too old for *grin ?

By the way, (correct me if I’m wrong) it seems like sending via any kind of HTTP even tor is being deprecated? In which case I will just focus on slatepacks

He probably meant too old for Tor. Grin wallet uses onionv3 addresses, and unless you build Tor yourself, you won’t have a version up-to-date enough to support these type of addresses, unfortunately (I’ve had the same annoying problem).

Regarding your other question, yes http is being deprecated. Tor is definitely not.

Okay thanks. I might be doing something wrong then? My understanding is you send via tor just like http like
grin-wallet send --dest 'http://address.onion' <amt>

and it gives me the “http is deprecated” message?

Ignore that message.

no, your OS is deprecated and too old. It is not supported anymore and the tor build in the repositories is out of date. Your OS is so deprecated, that the backport repositories from the some 4 versions of debian since then are also unable to install tor as one of the dependencies doesnt exist for your deprecated OS. You can upgrade your OS or build tor locally.

Tor is not being deprecated for grin, just http

1 Like

Your send should be to a slatepack address, which is not in the format you show here, this will not work.

Okay, I’m confused then. slatepack address somehow encodes a tor address?

1 Like

Exactly. I’ll explain.

Your Slatepack address is in fact an ed25519 public key, bech32 encoded.

It serves a double purpose:

  • A Tor address can be derived from it bech32 -> ed25519 -> onionv3.
  • A x25519 encryption key can be derived from it, used to encrypt (automatically) the slatepack messages only for the sender and receiver to see. bech32 -> ed25519 -> x25519.

By the way, for wallet references see this guide (updated to v4.0.0).

3 Likes

wow okay that is awesome. Thanks for that link, I hadn’t found that documentation, it looks very nice, I’ll be reading through it

2 Likes

Sure thing, feel free to ask more questions when they come up.

That documentation is work-in-progress for now, which is why you haven’t found it.

1 Like

I’m having trouble with sending via TOR. I have compiled Tor 0.4.3.6 and installed on both systems. I set listening address in grin-wallet.toml to 0.0.0.0, after running grin-wallet listen it says (replaced addresses with dots):

20200826 18:47:26.724 WARN grin_wallet_controller::controller - Starting TOR Hidden Service for API listener at address ..., binding to 0.0.0.0:3415
20200826 18:47:28.856 WARN grin_wallet_controller::controller - Starting HTTP Foreign listener API server at 0.0.0.0:3415.
20200826 18:47:28.856 WARN grin_wallet_controller::controller - HTTP Foreign listener started.
20200826 18:47:28.856 WARN grin_wallet_controller::controller - Slatepack Address is: ...

And (on my other machine) when I do grin-wallet send -d <slatepack-addr> <amt>
It says:

20200826 13:47:47.626 WARN grin_wallet_api::owner - Attempting to send transaction via TOR
20200826 13:48:11.045 WARN grin_wallet_api::owner - Unable to send transaction via TOR. Attempting alternate methods.

Is there a guide on how to do a TOR transaction? Haven’t had any luck so far.

Can you make sure Tor is on system path?

yes, tor --version ->
Tor version 0.4.3.6.

My grin-wallet.toml is listening to local ip 127.0.0.1 I believe the comment about making it 0.0.0.0 is for http listening.

You can use the grin++ service to see if your tor address is reachable Is this Grin Wallet URL Reachable?

I got it to work!!!

I had to set ip 0.0.0.0 on http listener, but leave the tor configuration the same… which I thought I had before so I’m not entirely sure why it wasn’t working before…

thank you

2 Likes

I can help you review your https://paouky.github.io/docs/getting-started/node.md section as we run a lot of nodes at grinnode.live