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: ⏰ expose time facilities in mock consensus engine #3759

Open
cratelyn opened this issue Feb 6, 2024 · 0 comments
Open

tests: ⏰ expose time facilities in mock consensus engine #3759

cratelyn opened this issue Feb 6, 2024 · 0 comments
Labels
A-testing Area: Relates to testing of Penumbra _P-V2 Priority: after mainnet

Comments

@cratelyn
Copy link
Contributor

cratelyn commented Feb 6, 2024

stub issue.

see #3588.

provide interfaces/facilities to move the "time" used to generate timestamps in the mock consensus engine.

@cratelyn cratelyn added the A-testing Area: Relates to testing of Penumbra label Feb 6, 2024
@cratelyn cratelyn added this to Penumbra Feb 6, 2024
@github-project-automation github-project-automation bot moved this to Future in Testnets Feb 6, 2024
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra Feb 6, 2024
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
@aubrika aubrika added the _P-V2 Priority: after mainnet label Apr 10, 2024
aubrika pushed a commit that referenced this issue Aug 15, 2024
#4818)

## Describe your changes

This enhances test code reproducibility by allowing a fixed timestamp
and block timing to be set rather than using system time.

## Issue ticket number and link

#3759

## 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:

  > only affects tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Area: Relates to testing of Penumbra _P-V2 Priority: after mainnet
Projects
Status: Backlog
Status: Future
Development

No branches or pull requests

2 participants