-
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
refactor(staking): 😊 tracing telemetry for delegation changes #4009
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
cratelyn
added
A-staking
Area: Design and implementation of staking and delegation
A-telemetry
Area: Metrics, logging, and other observability-related features
C-refactor
Category: refactors and other related improvements
labels
Mar 12, 2024
This was referenced Mar 12, 2024
xref #4001, from which these changes came. |
cratelyn
commented
Mar 12, 2024
.height | ||
.try_into() | ||
.expect("should be able to convert i64 into block height"), | ||
state.get_delegation_changes_tally().clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also being cloned needlessly, see 838887d
erwanor
approved these changes
Mar 12, 2024
cratelyn
added a commit
that referenced
this pull request
Mar 13, 2024
this is a group of improvements to the telemetry in the staking component, cherry-picked out of #4001. this improves the logs seen in tests, and additionally takes the time to make some other small gardening tweaks: consolidating imports, adding documentation comments, etc. this is another branch in the spirit of #4009. the changes here are itemized into distinct, small code transformations to facilitate review, and demonstrate that these are noop changes. you can start [here](f7f78b9). * f331964 - feat(staking): ❗ traces for invalid or missing parameters * d33598d - docs(staking): 🤝 add a doc comment * f6c60a8 - staking: 🙂 remove needless `Ok(_)` * fd4b8da - feat(staking): 💬 log when delegation changes are not found * fe597ff - feat(staking): 🔍 trace-level spans for `StateReadExt` methods * 0447600 - refactor(staking): 🚡 use `self::` prefix in reexports * 67893c9 - refactor(staking): 🙂 remove import from reexports * 043222e - refactor(staking): 🎁 consolidate public submodules * 6376796 - refactor(staking): 🎁 consolidate submodules * b5bd240 - refactor(staking): 👯 component flag reexports StateWriteExt * d57beaa - chore(staking): 🥡 consolidate component reexports * aa52f6d - chore(staking): 🧹 tidy epoch_handler imports * 765ed75 - refactor(compact-block): 🧹 tidy imports * 7cb93f7 - feat(staking): 🌐 log why epoch ended * 081d041 - refactor(staking): add context to `state.end_epoch` call * 5701295 - feat(app): 🦠 tracing telemetry for `App::end_block` * f7f78b9 - docs(staking): 📕 add doc comment for `end_epoch`
cratelyn
added a commit
that referenced
this pull request
Mar 18, 2024
fixes #3966. fixes #3908. fixes _part of_ #3995. this branch introduces the first steps towards mock consensus (#3588) testing of the staking component (#3845). this defines a validator after genesis, and then shows that it does _not_ enter the consensus set. #3966 is addressed in this branch so that the existing genesis validator correctly enters the consensus set, and so that we can successfully progress to the second epoch. subsequent changes will exercise delegating to this validator in the `mock_consensus_can_define_and_delegate_to_a_validator`. #### ✨ changes * alters `with_penumbra_auto_app_state` so that it adds an allocation of delegation tokens to the shielded pool component's genesis content. * extends `generate_penumbra_validator` so that it generates a real spend key, and returns an `Allocation` for the generated validator. _(see #3966)_ * adds a new `mock_consensus_can_define_and_delegate_to_a_validator` test that defines a post-genesis validator. _(see #3908)_ * defines a new `ConsensusIndexRead::get_consensus_set()` method, which collects all of the identity keys returned by `consensus_set_stream`. * lowers the events in `penumbra_mock_consensus::block::Builder::execute()` to trace-level events. * `penumbra_mock_consensus::builder::Builder` will now log a warning if values may be errantly rewritten by the builder methods. * `TestNode::fast_forward` sets its `i` span field to `1..n`, rather than `0..n-1`. --- #### :link: related * #4009 * #4010 * #4011 * #4017 * #4027 * #4028 * #4029 * #3966 * #3908 * #3588 --------- Co-authored-by: Henry de Valence <hdevalence@penumbralabs.xyz>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-staking
Area: Design and implementation of staking and delegation
A-telemetry
Area: Metrics, logging, and other observability-related features
C-refactor
Category: refactors and other related improvements
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.
this makes some small logging additions to the staking component. delegation changes will be logged at the trace level.