Eliminate Signature Checker/Creator Ambiguity w/ LIFETIMEBOUND References #22440

pull JeremyRubin wants to merge 3 commits into bitcoin:master from JeremyRubin:lifetimeboundcheckers changing 23 files +133 −118
  1. JeremyRubin commented at 2:28 am on July 14, 2021: contributor

    Previously, the Checkers stored pointers that were ambiguously null or not for the Transaction and the Precomputed Data. This PR makes the interface always require a reference to a transaction and to a PrecomputedData and remove ambiguity.

    This in turn eliminates some dereferences that were previously not asserted locally, and generally makes the APIs more clear.

    This doesn’t reduce the ability to not precompute data as PrecomputedTransactionData has it’s own internal initialization process – if that is desired, an unitialized PrecomputedTransactionData can be used. This PR does not attempt to distinguish places where an unfilled PrecomputedTransactionData could be used – for the most part, these are non performance sensitive signing code paths.

    Note that the internal representation for CScriptCheck does not change because there is a need to swap pointers (and not the underlying data). To get rid of the pointers altogether, a reference_wrapper could be used.

    fixes https://github.com/bitcoin/bitcoin/issues/22438

  2. Use LIFETIMEBOUND to eliminate ambiguous interfaces from checkers w.r.t. data ownership 11f31c25d1
  3. Use LIFETIMEBOUND in CScriptCheck ce920aa065
  4. Make DataFromTransaction take a PrecomputedTransactionData argument to avoid recomputing where possible f9934b23d8
  5. JeremyRubin force-pushed on Jul 14, 2021
  6. DrahtBot added the label Consensus on Jul 14, 2021
  7. DrahtBot added the label RPC/REST/ZMQ on Jul 14, 2021
  8. DrahtBot added the label Validation on Jul 14, 2021
  9. DrahtBot commented at 5:24 am on July 14, 2021: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22275 (A few follow-ups for taproot signing by sipa)

    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.

  10. MarcoFalke removed the label Consensus on Jul 14, 2021
  11. MarcoFalke removed the label RPC/REST/ZMQ on Jul 14, 2021
  12. MarcoFalke removed the label Validation on Jul 14, 2021
  13. MarcoFalke added the label Refactoring on Jul 14, 2021
  14. DrahtBot added the label Needs rebase on Aug 23, 2021
  15. DrahtBot commented at 4:49 am on August 23, 2021: member

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

    Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a “draft”.

  16. DrahtBot commented at 12:28 pm on December 22, 2021: member
    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it ‘Up for grabs’ with the label, so that it can be picked up in the future.
  17. MarcoFalke commented at 9:30 am on May 6, 2022: member
    Looks like this was picked up in #22793, so this can be closed?
  18. MarcoFalke commented at 9:32 am on May 6, 2022: member
    Closing for now due to inactivity for more than a year. Happy to reopen if you work on this again.
  19. MarcoFalke closed this on May 6, 2022

  20. DrahtBot locked this on May 6, 2023

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: 2024-11-21 18:12 UTC

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