carp icon indicating copy to clipboard operation
carp copied to clipboard

Support arbitrary genesis block

Open SebastienGllmt opened this issue 2 years ago • 0 comments

Currently, we store a parsed version of the genesis blocks inside https://github.com/dcSpark/oura-postgres-sink/tree/main/genesis

This is okay for v1, but it makes this project hard to reuse for other networks that may spin up in Cardano in the future. Ideally, we would instead take a genesis file and parse the information from there.

Notably, you can find the full genesis blocks in the cardano-node repo

There are a few tricky things with this:

  1. The genesis blocks contain the initial distribution of funds as avvm and non-avvm balances, but these need to be converted into addresses. You can find code for converting these two formats here
  2. Other networks that use Cardano in the future may skip Byron entirely and start with a different kind of genesis block (so the code wouldn't be compatible anyway)
  3. Our current Oura config only supports "testnet" and "mainnet" as strings. I think Oura has a secret feature to replace these with custom parameters you can parse from genesis though

SebastienGllmt avatar Apr 02 '22 03:04 SebastienGllmt