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

I2P Support Meta-issue #2712

Open
2 of 6 tasks
ignopeverell opened this issue Mar 27, 2019 · 15 comments
Open
2 of 6 tasks

I2P Support Meta-issue #2712

ignopeverell opened this issue Mar 27, 2019 · 15 comments

Comments

@ignopeverell
Copy link
Contributor

ignopeverell commented Mar 27, 2019

A close integration between Grin and I2P is desirable for the following reasons:

  1. It supports NAT traversal allowing nodes behind a router to participate in the network as much as a one on the public internet (related: NAT traversal support #1205).
  2. Generally improves privacy with garlic routing.
  3. Provides a network address that can be used to reach a wallet. Corresponding communication is encrypted and signed (related: #2523).
  4. For donations and wanted known endpoints, provides DNS-like aliasing.

To support I2P in Grin several things need to happen:

  • Dust off i2p-rs.
  • Add support in i2p-rs for server socket accept and reusable addresses (keys).
  • Initial I2P setup support in Grin (config, creating and saving keys, etc).
  • Support for I2P in our p2p crate: server listen, client connect, i2p network addresses.
  • Support for I2P in the wallet: listener and HTTP tunneling to exchange slates.
  • (Optional) I2P embedded distribution if deemed desirable.
@ignopeverell
Copy link
Contributor Author

i2p-rs fork with the fixes and improvements is here: https://github.com/ignopeverell/i2p-rs

@DavidBurkett
Copy link
Contributor

It looks like i2p-rs is just a client for interacting with the i2p router. Are we planning on requiring users to manually connect to i2p? Or are we going to take on the challenge of embedding the router, too?

@ignopeverell
Copy link
Contributor Author

See my last bullet point :-) I still prefer interactions with i2p with a client API and leaving it in its own process for security reasons.

@DavidBurkett
Copy link
Contributor

DavidBurkett commented Mar 27, 2019

Yep, I'm not so good with the words, and the reading 😆. Btw, I'm making changes to i2pd to make it easier to embed into Grin++. By the time i2p-rs is ready, it'll hopefully be trivial to optionally include my i2pd library, if desired.

@lehnberg
Copy link
Collaborator

Very very nice.

Provides a network address that can be used to reach a wallet. Corresponding communication is encrypted and signed

This requires both wallets to be online synchronously, correct?

@DavidBurkett
Copy link
Contributor

Yes, that's correct. It's similar to using an IP address or domain name, only you're using it on a fancier network.

@ignopeverell
Copy link
Contributor Author

Correct, I2P doesn't change any of that. And people could still host a grinbox behind I2P as an encrypted file store reusing your destination pubkey so it's all nicely wrapped up.

@lehnberg
Copy link
Collaborator

Yup, at a quick glance it seems well suited for support on the base protocol layer. And could kill a lot of birds in one stone. I've never used i2p and only briefly researched it prior. I'm curious about reliability/performance. Going to try to play around with it.

@0xmichalis
Copy link
Contributor

I still prefer interactions with i2p with a client API and leaving it in its own process for security reasons.

+1

@ignopeverell do you have any thoughts on packaging? Are you going to include an i2p router as part of the grin release process?

@0xb100d
Copy link

0xb100d commented Mar 28, 2019

saw this not too long ago, i2p in rust
https://github.com/str4d/ire

@garyyu
Copy link
Contributor

garyyu commented Apr 2, 2019

@ignopeverell
to avoid pollute your "progress update thread", I prefer to discuss here :-)

About:

you get a network address for free out of it something like cuss2sgthm5wfipnnztrjdvtaczb22hnmr2ohnaqqqz3jf6ubf3a.b32.i2p but you can go vanity as well). So you become reachable from any other node, and that should include your wallet. So if all goes well, Grin could have addresses. Not addresses on the blockchain, but addresses to receive coins in a secure and private way.

Q1: Is cuss2sgthm5wfipnnztrjdvtaczb22hnmr2ohnaqqqz3jf6ubf3a.b32.i2p accessible from outside (none i2p client)?

Q2: About "and that should include your wallet. " but @yeastplume split out the wallet from v1.1.0, then, do we need keep wallet in the grin repo? or copy the same i2p code into splited wallet?

@DavidBurkett
Copy link
Contributor

Q1: Is cuss2sgthm5wfipnnztrjdvtaczb22hnmr2ohnaqqqz3jf6ubf3a.b32.i2p accessible from outside (none i2p client)?

No, not directly. It's possible for folks to set up some kind of forwarding service, but if enough of these go down, the network fragments. I assume the goal will be to actually require the entire p2p network to move to i2p. I'm very interested to hear Igno's plan for transitioning (maybe during hardfork?).

Q2: About "and that should include your wallet. " but @yeastplume split out the wallet from v1.1.0, then, do we need keep wallet in the grin repo? or copy the same i2p code into splited wallet?

The i2p code is in a separate repo (https://github.com/ignopeverell/i2p-rs). Both grin and grin-wallet can just consume the APIs from that. If done correctly, very little of the i2p implementation should leak into either of the grin projects.

@Giszmo
Copy link

Giszmo commented Jun 1, 2019

What are the advantages of I2P over TOR? Reading the above, it looks to me as if TOR would fit equally well for all the points made.

@chisa0a
Copy link

chisa0a commented Jun 1, 2019

@ignopeverell I updated, and opened a new PR for your initial I2P work. Removed the rebase onto 1.1.0, and completed a large amount of the remaining work for connections over I2P.

Please review the changes when you have a moment.

@chisa0a
Copy link

chisa0a commented Jun 1, 2019

@Giszmo Tor and I2P have a number of design differences, and privacy trade-offs. Tor is exclusively over TCP, I2P has support for TCP- and UDP-based transports. Tor has a centralized set of routing servers (directory servers), I2P uses a fully decentralized DHT (NetDB) for routing lookups.

Tor is an excellent overlay network, and a critical piece of privacy infrastructure. I2P happens to shine in a number of places where Tor falls short / makes different design choices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants