Skip to content

Parallax v1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Apr 16:02
· 176 commits to main since this release
Immutable release. Only release title and notes can be modified.
f635632

I have been working on a new release. It implements three proposals — PIP-0003, PIP-0004, and PIP-0005 — and includes the first beta of a desktop client for users who would rather not run a node from the command line.

The main work in this release is in peer discovery, fee estimation, and NAT traversal. These are unglamorous parts of the system, but they determine whether ordinary users on ordinary connections can actually participate in the network. A peer-to-peer system that only works for people with public IPs and hand-curated bootnode lists is not really peer-to-peer.

Summary

  • A desktop client (prlx-gui), built with Wails, so that running a node does not require a terminal.
  • A new fee estimator modeled directly on the one in Bitcoin Core. It is now the default on full nodes.
  • A rewrite of the UPnP code so that nodes behind home routers can map ports without manual configuration.
  • DNS-based peer discovery, so that the bootstrap process is no longer tied to a hardcoded list compiled into the binary.
  • The DHT now filters out nodes that do not belong to this network, which fixes a routing-table pollution problem.

Parallax Client

PIP-0004 — Fee Estimation

The previous gas price oracle worked by sampling recent blocks and taking a percentile. This is a reasonable heuristic but it is not what the user actually wants to know. The user wants to know: if I pay this fee, how long will I wait?

The new oracle answers that question directly. It tracks how long transactions at different fee levels take to confirm, and from that history it produces fee recommendations for short, medium, and long confirmation horizons. The algorithm is a faithful port of Bitcoin Core's estimateSmartFee. I did not invent anything new here. The Bitcoin Core implementation has been studied and stress-tested for years and there is no reason to deviate from it.

It is exposed as a new RPC method, eth_estimateSmartFee, and is enabled by default through the --gpo.smartfee flag. Operators who prefer the old percentile oracle can set --gpo.smartfee=false.

Discussion: ParallaxProtocol/parallax#7

PIP-0005 — UPnP NAT Traversal

Most users are behind a NAT. If a node cannot punch a hole through it, the node cannot accept incoming connections, and the network loses a participant. The previous UPnP code worked on some routers and silently failed on others.

The implementation has been overhauled:

  • SSDP discovery is now done on a single UDP socket that handles both multicast and unicast responses.
  • A wider range of IGD device types is recognized, which covers more consumer routers in the wild.
  • When a port mapping conflicts, the code retries and falls back to a random port instead of giving up.
  • The logging is verbose enough that an operator can actually figure out why a mapping failed, rather than guessing.

Discussion: ParallaxProtocol/parallax#8

PIP-0003 — DNS-based Peer Discovery

Hardcoding bootnodes into the client binary is a weakness. If the bootnodes are taken offline, or need to be rotated, every user has to download a new release. This release adds DNS-based discv4 peer discovery, in the style of EIP-1459. A node can now bootstrap itself from a DNS record, which can be updated independently of the client.

  • DNS discv4 peer discovery is enabled by default.
  • A DNS discovery domain is configured for mainnet.

Discussion: ParallaxProtocol/parallax#4

Discovery and Networking

  • DHT isolation. Both devp2p and p2p/discover now filter out nodes that do not belong to this network. Without this, routing tables could be polluted by nodes from unrelated chains, which wastes connection slots and slows discovery.
  • Default max peers has been raised from 50 to 100.
  • devp2p crawler. The crawler now runs in parallel, and accepts a --listen-addr flag.

Parallax Desktop Client (prlx-gui)

This is the first iteration of a desktop client, and it is beta. It is built with Wails and provides a simple interface for starting and managing a node. The node-start flow has been improved in this release. I expect there to be rough edges. Please report what you find.

Notes for Upgraders

  • eth_estimateSmartFee is enabled by default on full nodes. To return to the previous percentile oracle, start prlx with --gpo.smartfee=false.
  • The default --maxpeers is now 100 (previously 50). Operators who set this flag explicitly are unaffected.
  • The desktop client is beta. Treat it as such.

— AP

Full Changelog: v1.1.1...v1.2.0