Stacks 2.0 (web3) nodes' network protocols


I was just reading about new features being rolled into the next version of the Linux Kernel 5.6 or 5.7 and two of them made me wonder if they could be of benefit to the Stacks 2.0 and (web3.0). Specifically they are Wireguard and Multipath TCP. This pertains to the two topics of node privacy using Tor, I2P, Wireguard, Tcpcrypt, etc. and the possibility of running one’s own Gaia/Stacker/Miner in some kind of redundant/fail-over fashion. Meaning if a user or business wanted to truly own their own data by running their own gaia hub and/or Stacker/Miner at home/in-house while also mirroring a copy of it in the cloud somewhere. Or similarly, running the primary node in the cloud for performance reasons and a backup/mirror locally as a backup in the event of a take-down/ddos attack on the cloud node. Dunno if MPTCP makes node mirroring easier or not.

Most of the Bitcoin full-node projects that I have seen have Tor as an option if not enabled by default.
eg. and

MultiPath TCP (MPTCP) is an effort towards enabling the simultaneous use of several IP-addresses/interfaces by a modification of TCP that presents a regular TCP interface to applications, while in fact spreading data across several subflows. Benefits of this include better resource utilization, better throughput and smoother reaction to failures.

The IP Networking Lab is implementing MPTCP in the Linux Kernel and hosting it on this website for users, testers and developers.

1 Like

The Stacks p2p protocol is over TCP/IP, so routing its packets over a VPN, over Tor, or over anything that can be implemented via a TAP/TUN interface should be possible. Not sure yet if doing so will materially improve anything, however.

The only significant differences between the Stacks p2p protocol and Bitcoin are that (1) the Stacks miners will have the ability to advertise their p2p network addresses as part of the on-Bitcoin transactions (thereby helping miners become part of everyone’s network frontiers), and (2) the Stacks nodes will serve blocks, microblocks, and transactions via a separate HTTP endpoint. Your HTTP endpoint gets propagated to other nodes when they handshake with your node over the p2p network. This lets you augment a Stacks miner with a Gaia hub and a CDN – you can push your blocks and microblocks into a Gaia node guarded by a CDN, thereby ensuring that they’ll be online and available even if your node is behind a NAT or doesn’t have good uplink (or if you’re under a DDoS attack).

1 Like