Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
What is the difference between semantic policy and concrete policy in a Miniscript context?
The difference between Policy and Miniscript is defined here.
Andrew Poelstra discussed semantic policy and concrete policy at this Miniscript workshop at Advancing Bitcoin 2020.
There are two types of Policies in rust-miniscript. There are semantic Policies which are the ones you get where you start with a Miniscript and throw away all the extra information. Those are what you use to do analysis and stuff. Then there are concrete Policies and those have weights on the branches. You can always get to a semantic Policy by throwing away information. We have a function called
Lift
that I think we use later on. We’ve imported theLiftable
trait. We create this concrete Policy, we parse it and you can see it looks kind of like Miniscript. We parse it in the usual way using thefrom_str
trait. Then we call this functionhtlc_policy.compile
. The compile turns a concrete Policy into a Miniscript.
You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.
Comments