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

Generate checkpoints in CI #6367

Closed
8 tasks done
teor2345 opened this issue Mar 21, 2023 · 3 comments · Fixed by #6581
Closed
8 tasks done

Generate checkpoints in CI #6367

teor2345 opened this issue Mar 21, 2023 · 3 comments · Fixed by #6581
Assignees
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles A-rpc Area: Remote Procedure Call interfaces A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement C-testing Category: These are tests S-needs-triage Status: A bug report needs triage

Comments

@teor2345
Copy link
Contributor

teor2345 commented Mar 21, 2023

Motivation

We want to generate checkpoints from the cached states in Zebra's CI, so that developers can do releases easily.

Complex Code or Requirements

  • We currently call zcash-cli in the checkpoint binary, we'll need to switch to making RPC requests directly.
  • Set up a test harness that launches zebrad with RPCs, and connects zebra-checkpoints to it. This should be simple, we have existing test code that launches zebrad with RPCs.
    • The mainnet version needs to use the cached state for efficiency, this slightly reduces our security, because we also test the checkpoints against the same cached state.
    • The testnet version can also use a new testnet cached state, failures should be ignored because testnet can be unstable.

Originally I said that testnet can do a full sync from an empty state, but it turns out that's complicated to configure in our test harness.

Testing

  • Compare manually generated checkpoints from zcashd and the checkpoints in CI.
  • Add a unit test that verifies that the generated checkpoints obey maximum checkpoint height gap, and that the minimum gap is at least 17 (the maximum checkpoint bytes divided by the maximum block size). This helps detect copy-paste mistakes.

DevOps

Testnet failures are expected occasionally, so we don't want to require that job.

@teor2345 teor2345 added A-devops Area: Pipelines, CI/CD and Dockerfiles C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium ⚡ C-testing Category: These are tests labels Mar 21, 2023
@teor2345 teor2345 self-assigned this Mar 21, 2023
@teor2345 teor2345 added the A-rpc Area: Remote Procedure Call interfaces label Mar 21, 2023
@mpguerra mpguerra added this to Zebra Mar 21, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Mar 21, 2023
@mpguerra
Copy link
Contributor

Let's wait until @gustavovalverde is back before starting this one

@teor2345 teor2345 added the A-rust Area: Updates to Rust code label Mar 23, 2023
@teor2345
Copy link
Contributor Author

Let's wait until @gustavovalverde is back before starting this one

This ticket also needs some changes to the Rust code of the checkpoint generation command, is that also blocked by Gustavo being away?

@mpguerra
Copy link
Contributor

Let's wait until @gustavovalverde is back before starting this one

This ticket also needs some changes to the Rust code of the checkpoint generation command, is that also blocked by Gustavo being away?

No, but we should be prioritising audit fixes, shouldn't be doing a release for a while and we're going to be short-staffed so we might as well wait until Sprint 8 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles A-rpc Area: Remote Procedure Call interfaces A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement C-testing Category: These are tests S-needs-triage Status: A bug report needs triage
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants