Understanding the codebase


Hi, trying to understand the code-base.

My question is why is there a supervisor in between the Keys module?

It seems to me that the structure was to have the main supervisor only supervise supervisors. Also, is there any reason to not use child_spec ?


Hey @kilok,

Thank you for your question.

It’s been forwarded to our dev team and they’ll get back to you.

The AE Team


Hello @kilok ,

I assume you talk about the elixir-node? Could you link me to the files you are referring to, so I can check better.

Kind regards,
Philipp from the Dev Team


Hey Phillip,

Here is the supervisor which suppervises the Key Supervisor: https://github.com/aeternity/elixir-node/blob/179a87dc10febbf49d697d268e1c44e1691dcff6/apps/aecore/lib/aecore.ex

Here is the Key’s supervisor:

Then the Keys supervisor supervises this Key’s Genserver:

I’m wondering if there was any particular reason for this design instead of child_spec?

Thanks for reading


Hey @kilok,

Thanks for your question.

@piwo will get back to you on that as soon as possible.

The AE team


Hello @kilok

When we started working on the project, we used the convinient design of the Supervisor.Spec module across the whole project. Since it is now depricated we will soon update our codebase to the new changes/design patterns.

We actually checked on this again and this was fixed way back with the following commit -> https://github.com/aeternity/elixir-node/commit/8f3cec4ffdd332fe473e34d51abdc57c7faaff6c

Kind regards,
Georgi from the Elixir Dev Team


Hello @kilok, with the latest Pull Request we should have removed all remaining deprecated supervisor spec patterns. https://github.com/aeternity/elixir-node/pull/605

It would be great to hear a few more thoughts you have about our elixir codebase!


Hey @piwo,

Thanks for the update. If I find anything else that is interesting, I will be reach out again.

Thanks for the reply and have a good day :slight_smile: