prysm icon indicating copy to clipboard operation
prysm copied to clipboard

Consider Hardcoding Genesis Values as Config Parameters

Open rauljordan opened this issue 2 years ago • 1 comments

In Prysm, we tend to use the blockchain service or other places in order to retrieve the chain's genesis time. However, this is not relevant for most networks that have already had a genesis. Instead, we can add the actual chain genesis times for the different networks we support under our params.BeaconConfig() which could be modified if a user wishes to via a custom configuration. This would eliminate a lot of boilerplate that checks for the chain genesis time and makes it easier for anywhere in the codebase to access than we do today.

rauljordan avatar Oct 03 '22 20:10 rauljordan

I am assuming that going forward we will always use pre-generated genesis states for test networks. Given that assumption, we'll always have a genesis timestamp in the genesis state, which we can retrieve in the BeaconNode service and plumb through to the other services. I would prefer handling the timestamp that way over adding more values to config params.

kasey avatar Oct 04 '22 23:10 kasey