Skip to content

Use v5_strategy in Arbitrary for Transaction #1826

Closed

Description

Is your feature request related to a problem? Please describe.

In #1824, we added a v5_strategy for transaction proptests. In #1823, we add a NU5 network upgrade.

Once those PRs merge, we need to use v5_strategy in Arbitrary for Transaction.

Describe the solution you'd like

  • Wait until Add initial support for NU5 to zebra #1823 and Add transaction version 5 #1824 have merged
  • Use v4_strategy or v5_strategy when the network upgrade is NU5 (both are valid)
  • Move the transaction version check in transaction::Verifier::call into a new Transaction::is_valid_for_network_upgrade
    • this might be useful in the Arbitrary impl, or the proptests
  • Design: work out how to run NU5 proptests when it doesn't have an activation height
    • currently, the code is unreachable, because LedgerState only contains network and height

Describe alternatives you've considered

Design alternatives:

  • add an optional network_upgrade_override to LedgerState
  • pass network_upgrade_override as an additional argument to the Arbitrary impl
  • add a network_upgrade method to LedgerState, and use it for all Arbitrary impls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-consensusArea: Consensus rule updatesA-rustArea: Updates to Rust codeC-cleanupCategory: This is a cleanupC-enhancementCategory: This is an improvementNU-5Network Upgrade: NU5 specific tasks

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions