nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.15k stars 228 forks source link

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

Closed chenyukang closed 3 months ago

chenyukang commented 3 months ago

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

Release note

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