[Babel-users] Adding a monetary factor to routing cost

justin kilpatrick kilpatrickjustin at gmail.com
Tue Sep 12 11:46:17 UTC 2017


For the past couple of months I've been working on a software stack
including Babel that would allow users to buy and sell bandwidth and
create an 'incentivized mesh' network.

I've got a working commit that adds price as an unsigned integer in
between the metric and prefix fields in route updates. If anyone else
is interested in such a thing it works just fine as is, but I would
like some advice on how to clean it up and integrate it more smoothly.
While I learned on C I'm a little rusty.

First off I've got a feeling I'm integrating poorly in some places,
the configuration socket and updating xroutes come to mind but I'm
interested in the community opinion.

Second the design isn't really very Babel'y ideally you want all
routing factors to be factored into the metric and then keep track of
only per hop variables, but we can't do that here. If you have a route
you have to know the full cost to complete it, not the cost adjusted
by some potentially arbitrary changes along the way.

I think the best way to really handle this is just to add a price TLV,
which is somewhat more complicated to implement but more clean from a
network perspective as price may not change as often as routes update
for other metric reasons.

Here's the commit

https://github.com/althea-mesh/babeld/commit/4e88ef5eab18afcadfdd3739c4637de7e62d76a0#diff-177abc27de8f821009a6021a6daaf584L104

I'm also working on a way to verify that intermediate nodes are being
honest with their metric advertisements, I'll be sending some mail in
when I have a good demo on that. The easiest way I found to do it was
to use a wireguard tunnel as a neighbor and then have an external
program monitor the rtt, since hello history is made less useful by
unicast retries. Looking forward to having some results on how well it
works in larger sims and probably a lively debate on where responsibly
for routing security should be placed.

Thanks for your time
- Justin



More information about the Babel-users mailing list