[tor-dev] TorBEL migration
hahn.seb at web.de
Tue Apr 30 03:49:31 UTC 2013
On Apr 30, 2013, at 3:17 AM, Sreenatha Bhatlapenumarthi <sreenatha.dev at gmail.com> wrote:
> My name is Sreenatha Bhatlapenumarthi. I'd like to migrate TorBEL
> from TorCtl to Stem as a part of GSoC'13 project this summer.
great to hear from you!
> Damian pointed out that there is still some improvement to be made to
> TorBEL to replace DNSEL. I've downloaded the source code from  and
> started looking around for missing functionality and components that use
> TorCtl(and hence need migration) and here is what I've observed:
> • TorBEL components that use TorCtl
> • Controller - control.py
> • Logger - logger.py
> • Router - router.py
> • Tests - tests.py
> • The main interface - torbel
> • Exit policies of narrow_exit routers can be checked in Router.will_exit_to
> • RouterRecord.update_to() can use "Router Status Entry" descriptors to update the router's attributes
> • I think the following line in network.py has a bug - socket.inet_aton works only for IPv4 addresses.
> • (ip,) = struct.unpack(">I", socket.inet_aton(peer.host))
Quite possibly! ipv6 support in Tor was far away when that code
> Please let me know if I've missed something or got something wrong.
You might want to check out the TorBEL trac tickets  if you haven't,
to get some further ideas about things that need doing.
> I donot have any background on Haskell as such but if you recommend that I
> learn it inorder to understand TorDNSEL, I am prepared to spend the required
> amount of time learning it during May before the coding period starts. Also, can
> you give me a rough estimate of how long you think the migration will take so that
> I can plan the project timeline accordingly?
Learning Haskell will be much less valuable than investing the time to
learn what's needed from a dnsel replacement. Also note that unless
you have experience with functional programming languages, Haskell will
not be "just another language", but rather you'd first spend some time
wrapping your head around functional programming.
As for the timeline, that's a bit tricky. Migrating to stem will
probably require a fair deal of refactoring, as the current
implementation makes heavy use of TorCtl internals, and especially the
Router class is tailored to TorCtl. Damian might have some input here
on how much TorCtl and stem differ here, and what (some of) the
architectural differences will be. That said, if you invest some time
before the actual coding period to get up to speed on what the tool
is actually supposed to do, you have a great shot at porting in 6
weeks. Three weeks learning stem and porting, 3 weeks testing and
fixing issues you'd encounter along the way, I'd assume. The rest of
the summer could be spent on improving stem, or on implementing
additional functionality. All this depends on your Python skills tho,
of course. Ultimately, it's your job to figure out and propose a
timeline (but don't worry, it's not like that'll be set into stone
the moment the program starts).
> Thanks for taking your time out to read this.
My pleasure, thanks for your interest in TorBEL!
All the best
More information about the tor-dev