Skip to content

Consolidate configuration to only runtime configuration + default artifacts #6013

@nholland94

Description

@nholland94

Our code currently supports runtime configuration overrides with constant time defaults. When handling lack of explicit runtime configuration overrides, the daemon falls back to constant time defaults. When deciding to generate configuration dependent artifacts (i.e. genesis ledger, pk/vk keys, genesis proof, genesis block), the daemon has a variety of ways to lookup cached artifacts before it generates anything. These artifacts can exist in different locations, depending on which artifact is being generated. These locations can include: compiled into the daemon, locally cached on the file system, locally distributed along with the daemon, available for download from s3. The current initialization behavior is thus rather complex, and can manifest a variety of code paths for selecting what data to initialize the daemon with. We should consolidate these code paths into as few as possible, making the logic easier to reason about, the daemon easier to configure, the initialization easier to debug, and the implementation of hard forks easier to test and develop.

Talking with @bkase and @mrmr1993, it seems that we would like the primary means of loading configuration dependent artifacts to be via the local filesystem. This allows us to dynamically regenerate artifacts when configuration changes without the need to ship a new daemon, but it still allows us to provide some artifacts that can be used with a default configuration (important for shipping software at mainnet). We can still rely on s3 in the short term for pv/vk keys, but the ideal long term solution would be to have our deployments bundle the pv/vk keys into the distribution it wants to deploy, so the s3 cache logic can eventually be removed from the daemon itself (and same goes for other artifacts too).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions