HomePhabricator

net: implement the necessary parts of the I2P SAM protocol

Description

net: implement the necessary parts of the I2P SAM protocol

Summary:
Implement the following commands from the I2P SAM protocol:

  • HELLO: needed for all of the remaining ones
  • DEST GENERATE: to generate our private key and destination
  • NAMING LOOKUP: to convert .i2p addresses to destinations
  • SESSION CREATE: needed for STREAM CONNECT and STREAM ACCEPT
  • STREAM CONNECT: to make outgoing connections
  • STREAM ACCEPT: to accept incoming connections

This is a backport of core#20685 [14/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/c22daa2ecff1acd25426cd46f98f2587d1d324c3

Notes:

Test Plan:
ninja all check-all

ninja && src/bitcoind -debug=i2p

For now only the compilation of the new code and the fact that the two additional lines of code in logging.{h|cpp} don't break anything are tested.
The next commit will make this code reachable, add functional tests, and provide a manual testing plan by actually using bitcoind with I2P.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11025

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Nov 27 2020, 12:59
PiRKCommitted on Feb 14 2022, 20:57
PiRKPushed on Feb 14 2022, 20:57
Reviewer
Restricted Project
Differential Revision
D11025: net: implement the necessary parts of the I2P SAM protocol
Parents
rABCfa04aae9f300: [Cashtab] Remove extra space on eToken creation error msg
Branches
Unknown
Tags
Unknown