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

test(state): Test that Zebra resets correctly when committing blocks fails #5349

Closed
wants to merge 119 commits into from

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 6, 2022

Motivation

We want to test if the checkpoint verifier, state queues, and block write task are correctly reset on errors.

Closes #2654

Designs

We might want to randomly fail some blocks in some tests, at low probability (1 in 1000 to 1 in 100,000).

We might want to cause errors the first time we reach a height, then validate the block properly the second time.

Solution

  • Pick some places where we can cause errors at random

Review

This PR is incomplete.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-enhancement Category: This is an improvement P-Medium ⚡ C-testing Category: These are tests A-state Area: State / database changes labels Oct 6, 2022
@teor2345 teor2345 changed the title test(state): Test test(state): Test that Zebra resets correctly when committing blocks fails Oct 6, 2022
@teor2345 teor2345 changed the base branch from main to non-finalized-block-commit-channel October 6, 2022 02:42
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 6, 2022

@upbqdn you might want to keep on working on this, I didn't get as far as I thought!

@teor2345 teor2345 changed the base branch from non-finalized-block-commit-channel to main October 6, 2022 22:23
@teor2345 teor2345 changed the base branch from main to non-finalized-block-commit-channel October 6, 2022 22:23
@teor2345
Copy link
Contributor Author

teor2345 commented Oct 6, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 6, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor Author

Automating these tests is out of scope, so I'm going to close this PR now.

@teor2345 teor2345 closed this Oct 10, 2022
@upbqdn upbqdn reopened this Oct 11, 2022
@upbqdn upbqdn changed the base branch from non-finalized-block-commit-channel to main October 11, 2022 00:21
oxarbitrage and others added 10 commits October 10, 2022 17:21
…, to improve test coverage (#5164)

* Add RPC timing to zcash-rpc-diff

* Use transaction hash index for verbose block requests, rather than block data

* check if we are at tip for lightwallet wallet tests

* move function

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Combine the lightwalletd sync and gRPC test APIs

* Rewrite the gRPC and full sync tests for the new APIs

* Make zebra_rpc_address optional because only some tests need it

* Check for the zebrad RPC port to open in the right place

* Do the quick lightwalletd integration tests first in the sequential test function

* Ignore the lightwalletd cached state env var in tests that don't want it

* Don't replace the state path in RPC tests

* Enable IO (and timers) on the tip check tokio runtime

* Stop waiting for sync if either waiter thread errors or panics

* Try to speed up slow lightwalletd full syncs

* Don't wait for the tip in send transaction tests, and try to speed up full lightwalletd syncs

* Remove redundant is_lightwalletd_finished store

Co-authored-by: Arya <aryasolhi@gmail.com>

* Fix unused variable error

* Actually create the lightwalletd cached state

* Fix lwd cache check logic

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…will appear (#5312)

* Add latest and edge tags to Docker images

* Document how latest tag actually works

* Try a different syntax for is_default_branch

* Try again

* One last try

* Revert changes that don't work

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 29.0.7 to 32.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v29.0.7...v32.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…5368)

Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](reviewdog/action-actionlint@v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@upbqdn upbqdn closed this Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-state Area: State / database changes C-enhancement Category: This is an improvement C-testing Category: These are tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test if checkpoint verifier and state service are correctly reset on block commit errors
4 participants