Flag when blocks have had their scripts checked instead of skipped #19790

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:blkindex_scriptschecked_flag changing 2 files +3 −2
  1. luke-jr commented at 4:46 PM on August 24, 2020: member

    We raise blocks to BLOCK_VALID_SCRIPTS regardless of whether we validate scripts or skip them.

    A more obvious change might be to demote scripts-skipped to BLOCK_VALID_CHAIN and allow this status as an ancestor of BLOCK_VALID_SCRIPTS, but that would have compatibility issues at least.

    Instead, just begin setting an additional flag set when we don't skip script checks.

    This could be useful for later going back and verifying scripts of skipped blocks post-sync, but it's not clear to me yet if that's useful with assumeutxo around the corner(?). Regardless, it seems like a good idea to save this detail in case it proves useful.

  2. Flag when blocks have had their scripts checked instead of skipped 65dc7afa5d
  3. DrahtBot added the label Validation on Aug 24, 2020
  4. luke-jr commented at 6:53 PM on August 24, 2020: member

    Hmm, one shortcoming of this approach, is that it doesn't differentiate between "verified with ruleset X" from "verified with ruleset Y" as would occur when you upgrade for a softfork after activation.

    This is still better than nothing at all, but I wonder if we should add logic for the latter? Perhaps just a "ruleset version" in the db, which we can check and clear the flag on blocks appropriately?

  5. sdaftuar commented at 3:29 PM on January 6, 2021: member

    This is still better than nothing at all, but I wonder if we should add logic for the latter? Perhaps just a "ruleset version" in the db, which we can check and clear the flag on blocks appropriately?

    I think I'm a concept ACK on adding something to track which validation rules were applied when validating each block, so that after softfork activation we could efficiently revalidate the blocks that weren't validated with all the rules. I haven't given a lot of thought to how much work it is to do this though.

  6. DrahtBot commented at 8:00 AM on July 24, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22564 ([WIP] refactor: Move mutable globals cleared in ::UnloadBlockIndex to BlockManager by dongcarl)
    • #21526 (validation: UpdateTip/CheckBlockIndex assumeutxo support by jamesob)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. DrahtBot commented at 9:12 PM on September 23, 2021: member

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  8. DrahtBot added the label Needs rebase on Sep 23, 2021
  9. luke-jr commented at 12:02 AM on December 19, 2021: member

    Think this is better off being redone softfork-aware somehow. Closing for now.

  10. luke-jr closed this on Dec 19, 2021

  11. DrahtBot locked this on Dec 19, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me