Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

penumbra: remove chain component and move epoch management to SCT #3703

Merged
merged 67 commits into from
Jan 31, 2024

Conversation

erwanor
Copy link
Member

@erwanor erwanor commented Jan 30, 2024

Part of #3617, this PR is a work-in-progress:

  • Dissolve the ChainParameters structure into AppParameters (chain id) and SctParameters (epoch window config)
  • Make epoch/time management the responsibility of the SCT
  • Remove the public interface of the chain component

This last step is critical, because it means that the final next iteration of this work can happen independently of other integration work streams.

@erwanor erwanor force-pushed the erwan/3617_part_2_app_params branch from 154ffc5 to c911e9e Compare January 30, 2024 21:27
@erwanor erwanor changed the title chain: remove genesis/rpc/params/epoch handling penumbra: remove chain component and move epoch management to SCT Jan 31, 2024
@erwanor erwanor force-pushed the erwan/3617_part_2_app_params branch from 12f1f0f to 152859c Compare January 31, 2024 01:27
@erwanor
Copy link
Member Author

erwanor commented Jan 31, 2024

This compiles, so this is a good time to pause for now. My remaining task:

  • storing the chain id (app parameter) in the view service DB
  • restore chain id checks in various query service request handlers
  • doing a general review pass, and a bit of assurance

I am going to let the CI run overnight. Since the view service is broken any tests that exercise claiming should not pass. However, I think the rest of the CI should pass. We're so close!

@erwanor erwanor force-pushed the erwan/3617_part_2_app_params branch from f10d718 to 5f218f4 Compare January 31, 2024 02:39
The original schema had a kv table, it's much simpler to do it this way than to
manifest our data structures again in the form of a SQL schema.
@erwanor
Copy link
Member Author

erwanor commented Jan 31, 2024

Excellent, the test suite and smoke tests are passing! Marking this as ready-for-review, now I want to:

  • sct: re-organize the extension traits
  • shielded-pool: declutter fmd parameter init
  • penumbra: review pass on state keys

@erwanor
Copy link
Member Author

erwanor commented Jan 31, 2024

Merging this large PR optimistically so that integration work can proceed and to minimize conflicts. Follow-up tasks are tracked in independent issues that we are tackling today. Also working on a release tracking list for testnet 65.

@erwanor erwanor merged commit d991530 into main Jan 31, 2024
6 of 7 checks passed
@erwanor erwanor deleted the erwan/3617_part_2_app_params branch January 31, 2024 17:34
cratelyn added a commit that referenced this pull request Jan 31, 2024
erwanor pushed a commit that referenced this pull request Jan 31, 2024
TalDerei pushed a commit that referenced this pull request Feb 8, 2024
* sct: add `SctParameters` to track epoch/time config

* governance(proto): move `Ratio` to gov component

* governance(tally): local `Ratio` computation

* sct(component): expose `params` module

* sct(params): add docstrings to `SctParameters`

* chain: remove `ChainParameters`!

* sct(proto): add sct param message definition

* sct(proto): define `Epoch`

* app: prelude to including `SctParameters`

* chain: remove genesis module

* sct(epoch): define epoch structure in sct component

* sct: define sct query service api

* proto: remove chain all chain component messages

* sct(proto): add genesis message

* app(proto): add sct genesis content to messages

* governance(proto): remove dep on obsolete chain protos

* app(proto): fix missing type

* proto-compiler: remove `chain` from targets

* penumbra: generate interfaces without the chain messages

* sct: add genesis module

* app(proto): add chain id to app param message

* chain: remove `params`, `genesis

* penumbra: generate protos with chain id in app params

* sct: implement simple query service for epochs

* chain: remove rpc module

* chain: remove epoch module

* sct(state_key): define `block_manager` and `epoch_manager` namespaces

* chain: remove state keys and R/W ext traits

* penumbra: remove the chain component

* penumbra: remove chain component from workspace

* app: add `chain_id` methods

* app(state_key): namespace state keys by domain

* app: move cometbft prefix to `lib`

* sct: handle epoch and block timestamp management

* penumbra: remove all dep imports of `penumbra-chain`

* penumbra: untangle dependency build up on `penumbra-chain`

* penumbra: second pass at fixing build errors (wip)

* penumbra: third pass at fixing various build errors (wip)

* shielded-pool: scaffolding for shielded pool parameters

* shielded-pool(proto): define `ShieldedPoolParameters` message

* governance(proto): update changed app params

* penumbra: propagate api changes

* buf: lint protos

* penumbra: regenerate protos with shielded pool params

* app(proto): add shielded pool params to app params

* penumbra: third pass on the changed app params workflow

* penumbra: regenerate protos

* penumbra: progress through removing usage of `ChainParameters`

* penumbra: update the wasm planner and view services

* penumbra: run `fmt`

* ci: remove p-chain from rustdocs

* app(host_chain): reimplement the host chain interface

* app(host_chain): comment impl

* view: simplify the plan method

* transaction(gas): make compact block cost zero for proposals

* penumbra: remove obsolete comments

* penumbra: run `fmt`

* transaction(gas): remove unused imports

* app: fix `get_chain_id`

* shielded-pool: finalize genesis content struct

* shielded-pool(proto): add params to protos

* penumbra: refresh protos to account for changes

* governance: fix halt count logic

* app: init sct params

* view: go back to having a kv table

The original schema had a kv table, it's much simpler to do it this way than to
manifest our data structures again in the form of a SQL schema.

* view: remove unused deps

* view(storage): fix unused imports p2

---------

Co-authored-by: Henry de Valence <hdevalence@penumbralabs.xyz>
TalDerei pushed a commit that referenced this pull request Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants