Skip to content

Environment stores either a pointer to a GenesisDoc or the genesis' chunks, but not both. #4234

@alesforz

Description

@alesforz

Work done as part of #1290.

Context

Environment is a convenience struct on which we declare methods implementing the RPC APIs; it stores all the information that the RPC APIs need to serve clients' requests.

Environment stores not only a pointer to a GenesisDoc object, but also a slice storing the genesis doc chunks that we return via the /genesis_chunked RPC API. This means that we store 2 copies in memory of the GenesisDoc. 1 copy is the original GenesisDoc, the 2nd copy is the sum of the multiple chunks we split it into to serve the RPC APIs's requests.

ToDo

Change the implementation of Environment so that it stores either a pointer to a GenesisDoc or the genesis' chunks, but not both.

Metadata

Metadata

Assignees

Labels

P:storage-optimizationPriority: Give operators greater control over storage and storage optimizationP:tech-debtPriority: Technical debt that needs to be paid off to enable us to move faster, reliablybacklogA prioritized task in the team's backlog

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions