[Babel-users] A Babel implementation in Go

Steffen Vogel post at steffenvogel.de
Thu May 18 15:23:12 BST 2023


Hi Daniel __

> I'd be interested in helping out.

That’s fantastic! Please feel free to have a look at my code and start hacking right away. I try to keep my local changes synced as close to the master.
So you can see my progress right away. I am currently, still working on the protocol parsing bits.

> Something I've been mulling over is starting a compatibility test suite for
> babel because there do seem to be some corners that are easy to get
> wrong. Starting a new implementation that's structured as a library might
> be a good opportunity to do that.

Definitely! I think Go is really nice for that. I've already implemented extensive unit tests (including fuzzing) for the protocol parser:

- https://github.com/stv0g/go-babel/blob/master/proto/parser_fuzz_test.go
- https://github.com/stv0g/go-babel/blob/master/proto/parser_test.go

I am using the Ginkgo testing framework with which I am targeting to reach a 100% code coverage.

Integration / interoperability tests sound super cool!
I have started with a first integration test which is using Gont [1]:
Gont, builds virtual network topologies using Linux's network namespaces and allows us to run integration tests in it.
So, we can build arbitrary networks, including RTT latency emulation and much more.

My first test just creates two nodes (network namespaces) and a Linux bridge which are then interconnected via veth pairs.
This allows me to run two babel speakers and test neighbour discovery:

- https://github.com/stv0g/go-babel/blob/master/speaker_test.go

We could even go-babel against babeld / bird and have these tests fully automated __ 
I love your idea. Its really exciting!

[1] https://github.com/stv0g/gont

On 18.05.23, 15:00, "Daniel Gröber" <dxld at darkboxed.org <mailto:dxld at darkboxed.org>> wrote:


Hi Steffen,


On Thu, May 18, 2023 at 09:41:30AM +0200, Steffen Vogel wrote:
> My hope is to find a few collaborators for my endeavor who can support me
> with the tricky parts of the protocol. 


Sounds fun. I'd be interested in helping out. Been meaning to get more into
go anyway.


I've been running a small network on babeld and bird for a while now,
written a major patch for bird and found a bug in the RFC in the
process. The only corner of the babel RFC that still scares me are
"sources" :)


Something I've been mulling over is starting a compatibility test suite for
babel because there do seem to be some corners that are easy to get
wrong. Starting a new implementation that's structured as a library might
be a good opportunity to do that.


--Daniel







More information about the Babel-users mailing list