Skip to content

Conversation

@cratelyn
Copy link
Contributor

@cratelyn cratelyn commented May 24, 2024

💭 describe your changes

fixes #3913.

this is the exciting culmination of work in pr's #3996, #4349, #4435,
#4447, #4460, #4468, #4469, and #4470.

this adds a mock consensus test that spawns a gRPC server, creates a
view server, and then plans a transaction using the Planner. the
effects of this are then observed using the ViewClient.

NB: this is a large branch, so i have broken this into various preliminary PR's. this should land after:

these are related and included in this branch, but could land in parallel:

✅ checklist before requesting a review

  • if this code contains consensus-breaking changes, i have added the
    "consensus-breaking" label. otherwise, i declare my belief that there are not
    consensus-breaking changes, for the following reason:

    this only changes test code.

🔗 related work

@cratelyn cratelyn self-assigned this May 24, 2024
@cratelyn cratelyn added C-enhancement Category: an enhancement to the codebase A-mock-consensus Area: Relates to the mock consensus engine labels May 24, 2024
@cratelyn cratelyn added this to the Sprint 7 milestone May 24, 2024
@cratelyn cratelyn force-pushed the kate/view-server-tests-redux branch from 3d78c52 to 0d82c26 Compare May 29, 2024 06:02
@cratelyn cratelyn marked this pull request as ready for review May 29, 2024 07:13
cratelyn added 2 commits May 31, 2024 15:04
this commit introduces a new, optional component of the mock consensus
test node. `on_block` is a `tendermint::Block -> ()` function that can
be used to collect the blocks being generated by the test node.
@cratelyn cratelyn force-pushed the kate/view-server-tests-redux branch from 44eb082 to 7e9e309 Compare May 31, 2024 19:04
cratelyn added 8 commits May 31, 2024 15:06
our broader goal is to wire up plumbing so that a test node can handle
the tendermint proxy service client's requests sent by the view server
when planning transactions.

as a step towards that, add a new crate to the workspace. for the time
being, we provide an empty `Stub` proxy. we will build upon this and
sort out connecting it to a running `TestNode<C>` next.
- `axum-server`
- `camino`
- `penumbra-view`
- `tower-http`
- `url`
see #3913.

this is the exciting culmination of work in pr's #3996, #4349, #4435,
 #4447, #4460, and #4468.

this adds a mock consensus test that spawns a gRPC server, creates a
view server, and then plans a transaction using the `Planner`. the
effects of this are then observed using the `ViewClient`.
this import was defining an alias, and then using that alias to import
other symbols.
we don't need to create a new connection every time we record a block.

instead, use the `Channel` that the `ViewServer` sets up upon
construction.

refs: #3212
hoist the construction of a tonic channel out of the worker. move it to
the call-side, in the view server.
@cratelyn cratelyn force-pushed the kate/view-server-tests-redux branch from 7e9e309 to 99c6bb1 Compare May 31, 2024 19:06
@cratelyn
Copy link
Contributor Author

rebased on the latest main ♻️

@cratelyn cratelyn requested a review from hdevalence May 31, 2024 19:19
@cratelyn
Copy link
Contributor Author

...and ci passed! this should be ready for another look, when you have time @hdevalence 🙂

@cratelyn cratelyn merged commit c60cfc6 into main Jun 3, 2024
@cratelyn cratelyn deleted the kate/view-server-tests-redux branch June 3, 2024 16:41
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 C-enhancement Category: an enhancement to the codebase

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Design a way to use the Rust view server with mock consensus integration tests

3 participants