Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce some policy constants from Bitcoin Core #584

Merged
merged 3 commits into from May 29, 2021

Commits on May 18, 2021

  1. policy: introduce p2p constants from the reference implementation

    This introduces some constants defined by Bitcoin Core which as a
    consequence define some network rules in a new 'policy' module.
    
    Only some were picked, which are very unlikely to change. Nonetheless a
    Warning has been put in the module documentation.
    
    Script-level constants are left into rust-miniscript where they are
    already defined (src/miniscript/limits.rs).
    darosior committed May 18, 2021
    Configuration menu
    Copy the full SHA
    2b77748 View commit details
    Browse the repository at this point in the history
  2. blockdata/script: use policy's constant in dust computation

    Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
    darosior committed May 18, 2021
    Configuration menu
    Copy the full SHA
    2e9d62a View commit details
    Browse the repository at this point in the history
  3. policy: add a function to get the virtual transaction size

    It's very useful to Bitcoin applications, and especially "L2" ones, to
    effectively compute feerates. Currently (and this is very unlikely to
    change) bitcoind nodes compute the virtual size as a rounded-up division
    of the size in witness units by 4, with a penalty for transactions that
    are essentially >5% full of sigops.
    
    Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
    darosior committed May 18, 2021
    Configuration menu
    Copy the full SHA
    7345aa6 View commit details
    Browse the repository at this point in the history