Skip to content

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

Merged
zhangsoledad merged 2 commits intonervosnetwork:developfrom
chenyukang:yukang-skip-zero-cycles-for-disable-script
May 10, 2024
Merged

Skip storing all zero cycles in db when disable script#4452
zhangsoledad merged 2 commits intonervosnetwork:developfrom
chenyukang:yukang-skip-zero-cycles-for-disable-script

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