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

tests(app): 🧪 test that uptime tracks signed blocks #4070

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

cratelyn
Copy link
Contributor

@cratelyn cratelyn commented Mar 21, 2024

NB: this is based on #4099.

this adds test coverage, complementary to the work in #4061, which asserts that we properly track the affirmative case of validators signing blocks.

fixes #4040. see #3995.

@cratelyn cratelyn self-assigned this Mar 21, 2024
@cratelyn cratelyn added A-testing Area: Relates to testing of Penumbra A-mock-consensus Area: Relates to the mock consensus engine labels Mar 21, 2024
@cratelyn cratelyn added this to the Sprint 2 milestone Mar 21, 2024
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from 747043b to 97b8ace Compare March 21, 2024 22:25
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from 9c675f9 to 2efe2de Compare March 22, 2024 14:04
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from 2efe2de to bcdf647 Compare March 22, 2024 15:57
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from bcdf647 to 19e01d1 Compare March 22, 2024 21:12
@aubrika aubrika modified the milestones: Sprint 2, Sprint 3 Mar 25, 2024
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from 19e01d1 to 49660e2 Compare March 25, 2024 21:01
cratelyn added a commit that referenced this pull request Mar 25, 2024
…er` extension trait (#4099)

this is a small collection of noop refactors, cherry-picked out of
#4070.

most importantly, this hoists `track_uptime` into a standalone extension
trait. additionally, some improvements to telemetry helped make
debugging tests in #4070 easier.
this changes the mock consensus test node s.t. it includes commit
signatures from all validators in the keyring. the app does not validate
that signatures are well formed, so empty vote information is provided
for now.

---

* this adds a signatures field to the block `Builder` so that we can
  manipulate the list of validator signatures in a block to be built by
  the mock consensus engine.

* a `with_signatures` block builder method is added to manipulate that
  field.

* `LastCommitInfo` is now constructed from the list of signatures.

---

some todo's about potential upstream patches are left where applicable.
now that we sign blocks by default, this should be a 0. the validator
hasn't missed any blocks.
@cratelyn cratelyn force-pushed the kate/mock-consensus-validator-uptime-signatures branch from 49660e2 to 00e23f5 Compare March 25, 2024 21:49
@cratelyn
Copy link
Contributor Author

rebased now that #4099 has landed.

@cratelyn cratelyn marked this pull request as ready for review March 25, 2024 21:49
@cratelyn cratelyn merged commit c7c0223 into main Mar 26, 2024
7 checks passed
@cratelyn cratelyn deleted the kate/mock-consensus-validator-uptime-signatures branch March 26, 2024 12:22
cratelyn added a commit that referenced this pull request Mar 26, 2024
this code was commented out when working on #4044. as of #4070,
(see #4040) we now sign blocks. let's turn this code back on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mock-consensus Area: Relates to the mock consensus engine A-testing Area: Relates to testing of Penumbra
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

tests: 🖋️ mock consensus engine can test validator uptime measurements
2 participants