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: 🧩 provide a block builder api in the mock consensus engine #3792

Closed
cratelyn opened this issue Feb 9, 2024 · 3 comments · Fixed by #3822
Closed

tests: 🧩 provide a block builder api in the mock consensus engine #3792

cratelyn opened this issue Feb 9, 2024 · 3 comments · Fixed by #3822
Assignees
Labels
A-mock-consensus Area: Relates to the mock consensus engine C-enhancement Category: an enhancement to the codebase _P-high High priority
Milestone

Comments

@cratelyn
Copy link
Contributor

cratelyn commented Feb 9, 2024

see #3588.

@cratelyn cratelyn added C-enhancement Category: an enhancement to the codebase A-mock-consensus Area: Relates to the mock consensus engine labels Feb 9, 2024
@cratelyn cratelyn self-assigned this Feb 9, 2024
@hdevalence hdevalence added the _P-high High priority label Feb 13, 2024
@aubrika aubrika added this to the Sprint 0 milestone Feb 13, 2024
@hdevalence
Copy link
Member

xref #3816 (comment)

I think this might make sense to prioritize over the genesis data adjustment.

@cratelyn
Copy link
Contributor Author

sounds good to me, i will work on this first. thank you for the heads up!

@cratelyn
Copy link
Contributor Author

work-in-progress pr is at #3822. 🔨

cratelyn added a commit that referenced this issue Feb 15, 2024
fixes #3792.

see #3588.

* `block` module defining interfaces to build a tendermint block,
  holding a unique reference to the `TestNode`.
* `abci` module defining `TestNode` interfaces that will send consensus
  requests to the application. this includes:
  * BeginBlock
  * DeliverTx
  * EndBlock
  * Commit
* `send_block` module defining a `TestNode` interface to send the
  requisite abci requests, given a `tendermint::Block`.
* documentation is added for assorted public interfaces.

this represents a huge, exciting step for work on the mock engine! we
can now initialize and send an (empty) block to the consensus service.

✨ 🎊 ✨ 🎊 ✨

what next?

this isn't a _comprehensive_ set of interfaces.
`penumbra_mock_consensus::block::Builder` will certainly grow more
methods as it is iterated upon. we'll use work in porting tests
(see #3788) to drive which other fields are needed.

forthcoming work will build upon this to:

* introduce more builder methods to set other `Header` fields (e.g.
  timestamp, see #3759)
* use the reference to the test node to set other `Header` fields (e.g.
  height)

todo comments are left to that effect.

---

* #3588
* #3792
cratelyn added a commit that referenced this issue Feb 15, 2024
fixes #3792.

see #3588.

* `block` module defining interfaces to build a tendermint block,
  holding a unique reference to the `TestNode`.
* `abci` module defining `TestNode` interfaces that will send consensus
  requests to the application. this includes:
  * BeginBlock
  * DeliverTx
  * EndBlock
  * Commit
* `send_block` module defining a `TestNode` interface to send the
  requisite abci requests, given a `tendermint::Block`.
* documentation is added for assorted public interfaces.

this represents a huge, exciting step for work on the mock engine! we
can now initialize and send an (empty) block to the consensus service.

✨ 🎊 ✨ 🎊 ✨

what next?

this isn't a _comprehensive_ set of interfaces.
`penumbra_mock_consensus::block::Builder` will certainly grow more
methods as it is iterated upon. we'll use work in porting tests
(see #3788) to drive which other fields are needed.

forthcoming work will build upon this to:

* introduce more builder methods to set other `Header` fields (e.g.
  timestamp, see #3759)
* use the reference to the test node to set other `Header` fields (e.g.
  height)

todo comments are left to that effect.

---

* #3588
* #3792
cratelyn added a commit that referenced this issue Feb 20, 2024
`tendermint::evidence::List` implements `std::default::Default`. so,
let's use that instead of mandating that an empty evidence list be
provided each time that we build a new block.

#3840 (comment)

Reference: #3588
Reference: #3792
Reference: #3840
Co-Authored-By: Henry de Valence <[email protected]>
cratelyn added a commit that referenced this issue Feb 20, 2024
`tendermint::evidence::List` implements `std::default::Default`. so,
let's use that instead of mandating that an empty evidence list be
provided each time that we build a new block.

#3840 (comment)

Reference: #3588
Reference: #3792
Reference: #3840
Co-Authored-By: Henry de Valence <[email protected]>
cratelyn added a commit that referenced this issue Feb 20, 2024
`tendermint::evidence::List` implements `std::default::Default`. so,
let's use that instead of mandating that an empty evidence list be
provided each time that we build a new block.


#3840 (comment)

Reference: #3588
Reference: #3792
Reference: #3840

Co-authored-by: Henry de Valence <[email protected]>
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 _P-high High priority
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants