Pay and get paid
In the Earendil network, nodes pay and get paid by their immediate neighbors.
This creates a free market for bandwidth --- if one neighbor is too expensive or unreliable, simply disconnect from them and find a cheaper or more reliable provider. Once you pay your neighbor, it's their responsibility to route your packets to their destinations. This is just like using the internet: you pay your ISP (like T-Mobile) and don't worry about the rest.
To learn more about Earendil's incentive system, read this post.
Price & debt limit
Two neighbors agree out-of-band on a price and debt limit for sending packets when they first connect to each other. They then specify this information in the price_config
section of the in_route
or out_route
block:
As an example, say we have relay Alice and client Bob. Alice has this price_config
in her in_route for Bob:
While Bob has this price_config
in his out_route for connecting to Alice:
This means Alice charges 1 µMEL for every packet Bob sends her, Bob can owe alice at most 5,000 µMELs before she disconnects from him, and Alice does not pay Bob anything to send packets to him.
Payment methods
A node specifies all the payment methods they support in the payment_methods
section of their config file. If two neighbors don't share any supported payment methods in common, they won't be able to connect (unless they both charge a price of 0).
We currently support 2 payment methods: on-chain payments on the Mel blockchain and proof-of-work (PoW).
The secret
field for on_chain
is the secret key of the Mel wallet you'll use to send and receive payments. Here's how to set up a Mel wallet. You can export the secret key from an existing wallet using:
As an example, this config means that your node only accepts on-chain payments:
Testing payments
The default bootstrap node we've been using throughout the tutorials is entirely free. To test payments, use this node that supports both on-chain and PoW payments:
Last updated