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

mock-consensus: 🔀 test node can fast_forward #4002

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

cratelyn
Copy link
Contributor

fixes #3933.

this introduces a fast_forward method to a test node, allowing tests using the mock consensus engine (#3588) to fast forward a certain number of blocks.

the existing mock_consensus_can_send_a_sequence_of_empty_blocks test is rewritten to make use of this method.

this is done in service of #3995.


fixes #3933.

this introduces a `fast_forward` method to a test node, allowing tests
using the mock consensus engine (#3588) to fast forward a certain number
of blocks.

the existing `mock_consensus_can_send_a_sequence_of_empty_blocks` test
is rewritten to make use of this method.

this is done in service of #3995.

---

* #3588
* #3933
* #3995
@cratelyn cratelyn added the A-mock-consensus Area: Relates to the mock consensus engine label Mar 12, 2024
@cratelyn cratelyn added this to the Sprint 2 milestone Mar 12, 2024
@cratelyn cratelyn self-assigned this Mar 12, 2024
cratelyn added a commit that referenced this pull request Mar 12, 2024
addresses part of #3936.

NB: this is based on #4002.
@cratelyn cratelyn marked this pull request as ready for review March 12, 2024 00:29
@cratelyn cratelyn merged commit 0dcba24 into main Mar 12, 2024
6 checks passed
@cratelyn cratelyn deleted the kate/mock-consensus-can-fast-forward branch March 12, 2024 00:35
cratelyn added a commit that referenced this pull request Mar 12, 2024
addresses part of #3936.

NB: this is based on #4002.
cratelyn added a commit that referenced this pull request Mar 12, 2024
)

fixes #3936. based upon #4002. see #3588.

this changes the type of the block builder's `data`, allowing it to be
implicitly kept empty. this is useful when e.g. fast forwarding a number
of blocks _(see #4002)_. this spares us the need to call
`with_data(vec![])`, and additionally means that the block builder is
never in an uninitialized state _(making #4003 needless)._

* #3936
* #4002
* #3588
cratelyn added a commit that referenced this pull request Mar 13, 2024
this tweaks the fast-forward facilities (#3933, #4002) so that we record
the height as a span field per-loop iteration, not as a field in the
encompassing `#[instrument]` span.

see #4005 for an example of the misleading `height: 0` logs this would
generate.
cratelyn added a commit that referenced this pull request Mar 15, 2024
this tweaks the fast-forward facilities (#3933, #4002) so that we record
the height as a span field per-loop iteration, not as a field in the
encompassing `#[instrument]` span.

see #4005 for an example of the misleading `height: 0` logs this would
generate.
cratelyn added a commit that referenced this pull request Mar 15, 2024
this tweaks the fast-forward facilities (#3933, #4002) so that we record
the height as a span field per-loop iteration, not as a field in the
encompassing `#[instrument]` span.

see #4005 for an example of the misleading `height: 0` logs this would
generate.
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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

tests: 🔀 expose fast forward facilities in mock consensus engine
1 participant