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

Skip storing all zero cycles in db when disable script #4452

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented May 9, 2024

What problem does this PR solve?

When run ckb run without disabling assume-valid-target, all the cycles in blocks are zero, since we skipped verification in this scenario.

What is changed and how it works?

Don't store all zeros in db, set ext.cycles to None.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Release note

Title Only: Include only the PR title in the release note.

@chenyukang chenyukang requested a review from a team as a code owner May 9, 2024 23:21
@chenyukang chenyukang requested review from quake and removed request for a team May 9, 2024 23:21
Copy link
Collaborator

@eval-exec eval-exec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about change ContextualBlockVerifier::verifier's return type to Option<Cycle, ...>?

@zhangsoledad zhangsoledad added this pull request to the merge queue May 10, 2024
Merged via the queue into nervosnetwork:develop with commit cc11673 May 10, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants