default presets to mainnet
Closed this issue · 1 comments
currently, to use spec code from this library, you need to select an explicit preset, e.g.
use ethereum_consensus::altair::mainnet::*;
and this repo intends to host both mainnet
and minimal
presets as "hard-coded" configurations
but it would be a nice convenience to default to mainnet
and only expose minimal
as an explicit choice.
e.g. to get the same types as above you only would need:
use ethereum_consensus::altair::*;
and with minimal left as is:
use ethereum_consensus::altair::minimal::*;
this involves some reconfiguring of the export declarations but imo is nicer
this would be nice but doesn't really make sense given the structure this repo has taken...
the suggested way is still through the presets and it can be abstracted away with an import alias:
use ethereum_consensus::altair::mainnet as spec;
or
use ethereum_consensus::altair::minimal as spec;
and any code that uses the preset can just reference via spec
; then to change presets, just swap the one import path mainnet
to minimal
to path::to::the_custom_preset