-
Notifications
You must be signed in to change notification settings - Fork 302
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
sct(component): implement Component
trait and split modules
#3723
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am not completely sold on the name, but the idea is that what you find here are extension traits that let you manage the blockchain clocks. Those clocks can be logical e.g. a block or an epoch, or literal wall clock (recorded by block timestamps, and eventually PBTS). In particular, we define `EpochManager` and `EpochRead` which implement write and read capabiltiies respectively.
In this module, we find composable extension traits that let us interface with the chain's commitment tree. This is done by plugging into `SctRead` or `SctManager`. We also add a third interface (`tree:VerificationExt`) which action handlers can pull in order to perform SCT specific verification of anchors or nullifiers.
This is a purely mechanical refactor, and might be better to merge into the tree module to increase cohesion.
TalDerei
pushed a commit
that referenced
this pull request
Feb 8, 2024
* sct(view): remove catch-all view module * sct(component): remove top-level module sig * sct(component): add `component::clock` I am not completely sold on the name, but the idea is that what you find here are extension traits that let you manage the blockchain clocks. Those clocks can be logical e.g. a block or an epoch, or literal wall clock (recorded by block timestamps, and eventually PBTS). In particular, we define `EpochManager` and `EpochRead` which implement write and read capabiltiies respectively. * sct(component): add `component::Tree` In this module, we find composable extension traits that let us interface with the chain's commitment tree. This is done by plugging into `SctRead` or `SctManager`. We also add a third interface (`tree:VerificationExt`) which action handlers can pull in order to perform SCT specific verification of anchors or nullifiers. * sct(component): move `SourceContext` This is a purely mechanical refactor, and might be better to merge into the tree module to increase cohesion. * sct(component): update query service imports * sct(component): implement `cnidarium_component::Component` on the sct * sct(component): propagate api changes * sct(component): sketch out updated state key schema * app: use `Sct::init_chain` and `Sct::begin_block` * sct(component): track module definition * sct(component): use updated state key schema * penumbra: misc small fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prelude to #3712, and follow-up to #3617 (clean-up).
This splits the
penumbra_sct::component::view
module into three:component::tree
mediate access to the state commitment tree and nullifier setcomponent::clock
provide access to the blockchain clocks (epoch index, block heights and timestamps)component::source
provide a helper trait to create "ambient" (i.e. intra-block) tracking of commitment sourcesThis is a WIP. I am leaning toward fixing #3712 in a different PR, because it might require deeper structural change to block/epoch finalization.