penumbra-zone / penumbra

Penumbra is a fully private proof-of-stake network and decentralized exchange for the Cosmos ecosystem.
https://penumbra.zone
Apache License 2.0
371 stars 292 forks source link

pd: add support for running in paused 'archive node' mode #4494

Open avahowell opened 3 months ago

avahowell commented 3 months ago

Is your feature request related to a problem? Please describe. In the CometBFT ecosystem, an 'archive node' refers to a node that is running an from an old (pre-upgrade) genesis, used to serve Comet RPC requests for data during that epoch. Post upgrade, any state from a pre-upgrade epoch is not queryable by the CometBFT RPC. This presents a problem for use cases such as relayers, which use the Comet RPC in order to fetch headers to use to build client updates. As such, it is typical for CometBFT operators to run a pre-upgrade node in a 'frozen' state, where that node only exists to serve RPC requests for headers from the pre-upgrade epoch, known as an 'archive node'.

There is not currently a natively supported pathway in pd for running in 'archive' mode (not producing any blocks, but still remaining online so as not to halt CometBFT).

Describe the solution you'd like We should add a flag to pd start, pd start --archive, that configures pd so that it expects to run in a frozen 'archive' state.

--archive should:

conorsch commented 3 months ago

In support of the upcoming #4497, want a much slimmer implementation:

We already have migration code that does this: https://github.com/penumbra-zone/penumbra/blob/319a3d925e201be3d061536fc68951df714e1860/crates/bin/pd/src/migrate/reset_halt_bit.rs, it just needs to be wired up to the CLI.

conorsch commented 2 months ago

Now that we have #4499, I think we can deprioritize this work to post-v1. Separately I'm working on reindexing an event db from historical backups. As long as that works end-to-end, I believe we can get by with the functionality we have today.