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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newsletters: add 61 (2019-08-28) #217

Merged
merged 2 commits into from Aug 28, 2019

Conversation

@harding
Copy link
Contributor

harding commented Aug 26, 2019

Sorry it's late.

Copy link
Contributor

bitschmidty left a comment

Pushed a commit for Stack Exchange section this week.

Looks good @harding ! Get well.

support hasn't been added by then. -->

- **Miniscript request for comments:** the developers of this language
for creating Bitcoin script templates have requested community

This comment has been minimized.

Copy link
@bitschmidty

bitschmidty Aug 27, 2019

Contributor

I dont have strong preference but this could be an Action item vs News.

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

no strong preference either. We could split this into two:

Action items

  • Review the [miniscript proposal](link to miniscript news item) and reply on the mailing list if you have feedback. This is important because the proposal authors plan to begin work on getting parts of it added to various wallets and other software, after which changing the language will become more difficult. See the news section for more details of the proposal.

News

  • Miniscript proposal: Miniscript is a policy language...

This comment has been minimized.

Copy link
@jonatack

jonatack Aug 27, 2019

Placing the miniscript feedback request in the Action items might be more fruitful.

Copy link
Contributor

jnewbery left a comment

A few nits. I also think we need to clarify language around 'policy language'/'minscript' in the miniscript section.

support hasn't been added by then. -->

- **Miniscript request for comments:** the developers of this language
for creating Bitcoin script templates have requested community

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

no strong preference either. We could split this into two:

Action items

  • Review the [miniscript proposal](link to miniscript news item) and reply on the mailing list if you have feedback. This is important because the proposal authors plan to begin work on getting parts of it added to various wallets and other software, after which changing the language will become more difficult. See the news section for more details of the proposal.

News

  • Miniscript proposal: Miniscript is a policy language...
software, after which changing the language will become more
difficult.

Miniscript is a policy language that makes it much easier for

This comment has been minimized.

Copy link
@jnewbery
software, after which changing the language will become more
difficult.

Miniscript is a policy language that makes it much easier for

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

Miniscript is a policy language

Not quite. Policy is a description of the spending conditions of the UTXO. Miniscript is a "language for writing (a subset of) Bitcoin Scripts in a structured way". Policy is compiled into minscript, which can then be translated into Script. (eg see the "Policy to Miniscript compiler" section here: http://bitcoin.sipa.be/miniscript/.)

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

I know it's confusing, but indeed. Miniscript is a 1-to-1 translation of a subset of script, and has 3 ways of writing an and, 4 ways of writing an or, 2 ways of writing a pubkey check, has various wrappers to make arguments match the calling convention of the parents, ... The policy language is much simpler and only encodes semantics and probability. Policy can be compiled to miniscript, but this is a 1-way operation.

miniscript. For example, imagine Alice has a 2-of-3 policy that
involves a hot wallet, a hardware wallet, and a fallback cold wallet:

thresh(2, pk(A_hot), pk(A_hard), pk(A_cold))

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

I believe all your examples here are policy rather than miniscript.


The miniscript compiler converts the miniscript into an efficient
P2WSH script and checks that it doesn't violate any of Bitcoin's
consensus rules or Bitcoin Core's standard transaction rules. If

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

Change this to "Bitcoin's consensus rules or Bitcoin Core's transaction relay policy" (I don't think 'standard transaction rules' is widely understood)

integrated into wallets, it'll become easier for users to secure their
bitcoins using sophisticated and multi-wallet security policies.
Review and feedback is requested to catch any potential problems now
while they're probably still easy to correct.

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

remove 'probably'

By our efforts and by the efforts of many other Bitcoiners, we think
we're on the brink of success: 82% <!-- 19/23 --> of the 23 popular
wallets and services we've [evaluated][bech32 compat] are ready to pay
bech32 addresses (up 8% from last week) and 17% <!-- 4/23 --> already

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

Remove 'up 8% from last week'. The percentage numbers are somewhat unscientific because they weight all tested applications equally (instead of by usage), and we only selected a subset of applications to test. I understand wanting to use numbers, and am ok with the headline 82% / 17% numbers, but I'd like to drop the '8% change'.

This comment has been minimized.

Copy link
@harding

harding Aug 27, 2019

Author Contributor

I included the percentage here because we included the percentage from last week in last week's section, so readers of the single-page version https://bitcoinops.org/en/bech32-sending-support/ are going to see inconsistent statistics. The change percentage is an attempt to mitigate that discontinuity.

This comment has been minimized.

Copy link
@jnewbery

jnewbery Aug 27, 2019

Contributor

I'd prefer wording like '(up since last week as we've become aware of two more wallets' support for sending to bech32 addresses)' or similar

This comment has been minimized.

Copy link
@harding

harding Aug 27, 2019

Author Contributor

That doesn't read well to me, so I'm just going to drop the percentages and say "k of n wallets". That way only someone who calculates their own percentages would notice the incongruity between last week's section and this week's section.

_posts/en/newsletters/2019-08-28-newsletter.md Outdated Show resolved Hide resolved
developers to design and analyze scripts enforcing a particular
security scheme. More than that, though, policies from several
miniscripts can easily be composed together into a more complex
miniscript. For example, imagine Alice has a 2-of-3 policy that

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

Miniscript is composable, but not in the way that it's presented here (you can't arbitrarily substitute any script subexpression with another; the types need to match up). I think you mean the policies are composable.


and(thresh(2, pk(A_hot), pk(A_hard), pk(A_cold)), older(26000))

The miniscript compiler converts the miniscript into an efficient

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

Again, it's the policy compiler that converts the policy into miniscript (which maps to a specific script).

This comment has been minimized.

Copy link
@harding

harding Aug 27, 2019

Author Contributor

Yep. Making edits for that now based on @jnewbery's earlier comment.

Copy link

jonatack left a comment

One typo, one nit, and one suggestion for your perusal. Hope you feel better soon.

infer how they should sign and finalize a larger variety of scripts.

Miniscript as it exists today is already a powerful tool for helping
developers craft advanced security policies, and it now has a its own

This comment has been minimized.

Copy link
@jonatack

jonatack Aug 27, 2019

s/has a its/has its/

*[Bitcoin StackExchange][bitcoin.se] is one of the first places Optech
contributors look for answers to their questions---or when we have a
few spare moments of time to help curious or confused users. In
this monthly feature, we highlight some of the top voted questions and

This comment has been minimized.

Copy link
@jonatack

jonatack Aug 27, 2019

nit: s/top voted/top-voted/

miners to cooperate with other miners by building on their blocks. PoW is also
used to regulate block times (and thus protect against denial of service)
since the difficulty adjustment makes it expensive to reliably produce blocks
more often than, on average, every 10 minutes.

This comment has been minimized.

Copy link
@jonatack

jonatack Aug 27, 2019

suggestion: s/than, on average, every 10 minutes/than every 10 minutes, on average/.

support hasn't been added by then. -->

- **Miniscript request for comments:** the developers of this language
for creating Bitcoin script templates have requested community

This comment has been minimized.

Copy link
@jonatack

jonatack Aug 27, 2019

Placing the miniscript feedback request in the Action items might be more fruitful.


## News

<!-- FIXME: JS miniscript compiler currently doesn't accept whitespace,

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

Fixed: spaces will be ignored in the compiler and analyzer input on the site.

This comment has been minimized.

Copy link
@harding

harding Aug 27, 2019

Author Contributor

Thanks!

P2WSH script and checks that it doesn't violate any of Bitcoin's
consensus rules or Bitcoin Core's standard transaction rules. If
script changes are added to the Bitcoin protocol, such as
[taproot][bip-taproot], the miniscript compiler can be changed in a

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

Miniscript is currently specific to P2WSH (and P2SH-P2WSH). Once Taproot lands we can define a new (but similar) language Miniscript-Taproot or so that maps to Taproot scripts.

The policy language will likely remain unchanged entirely, and you'd have the option to compile to a P2WSH miniscript, or to a (tree of) Taproot miniscripts.

Transactions (PSBTs), allowing signers and combiners to automatically
infer how they should sign and finalize a larger variety of scripts.

Miniscript as it exists today is already a powerful tool for helping

This comment has been minimized.

Copy link
@sipa

sipa Aug 27, 2019

This article seems to focus on the policy-to-miniscript compiler, which is an important part of what we've designed, but I don't think it's the most interesting part. Similar things have existed for a while (e.g. Ivy).

What Miniscript primarily adds is a way to reason programmatically about Script. The idea is that Script can be trivially converted to Miniscript (if it is compatible), and in that form it can be analyzed for:

  • Correctness
  • Whether non-malleable witnesses for it always exist
  • Under what conditions it can be spent
  • Whether it might exceed any limits (ops, stack size, ...)

In addition, in Miniscript form you can have a generic signer which produces a valid witness given enough signatures. That's actually how Miniscript came to be: a way to avoid needing ad-hoc template matching in rust-bitcoin's PSBT signer.

I personally think that's much more of a breakthrough, as it means designing a new script doesn't need to be accompanied with development of specific application logic (and sometimes protocols) to produce witnesses for it. In theory, applications could construct scripts on the fly based on necessities. E.g. one application needs a 2-of-3 somethings; one of the participants is another application that provides a timelocked 2FA based signing service, and they can just at runtime construct a script for the composition of the policies, and all Miniscript-compatible software without modification would be able to participate in signing spends of the resulting outputs.

@harding

This comment has been minimized.

Copy link
Contributor Author

harding commented Aug 27, 2019

Pushed a commit ("news61: rewrite miniscript section") that significantly rewrites the miniscript section based on @sipa's comment here (plus all the other feedback). This really needs to be reviewed by one of the miniscript developers before we publish, as I made some extrapolations from Pieter's description that I haven't tried to verify yet.

Thank you everyone for the feedback and sorry I made such a mess of the earlier version. I'll be addressing the other feedback on this PR in a separate commit.

@bitschmidty

This comment has been minimized.

Copy link
Contributor

bitschmidty commented Aug 28, 2019

tACK 66535ae

@bitschmidty

This comment has been minimized.

Copy link
Contributor

bitschmidty commented Aug 28, 2019

Waiting a bit on potential review from miniscript devs per @harding 's comment before publishing

@sanket1729

This comment has been minimized.

Copy link

sanket1729 commented Aug 28, 2019

Hi all, 66535ae is correct and addresses @sipa's comment.

Can I also request to advertise rust-miniscript here?
https://github.com/apoelstra/rust-miniscript/

EDIT:
I see that this is meant to be feedback for Miniscript proposal in general, so it might be okay not mentioning rust-miniscript library.

@jonatack

This comment has been minimized.

Copy link

jonatack commented Aug 28, 2019

ACK 66535ae, read changes, verified new links. Edit/note: It's great what one can learn from participating in Optech review and this newletter was no exception.

@jnewbery

This comment has been minimized.

Copy link
Contributor

jnewbery commented Aug 28, 2019

ACK 66535ae

Special thanks to @sipa and @sanket1729 for reviewing the miniscript section this week.

Seems reasonable to add a link to rust-miniscript, but I'll leave the final decision to Dave.

@harding

This comment has been minimized.

Copy link
Contributor Author

harding commented Aug 28, 2019

Thank you for the early morning reviews! I've pushed several additional miniscript links, including to the Rust implementation.

@jonatack

This comment has been minimized.

Copy link

jonatack commented Aug 28, 2019

New links work for me, including the last relative url for the miniscript summary if appended to https://bitcoinops.org.

harding and others added 2 commits Aug 26, 2019
@harding harding force-pushed the harding:2019-08-28-newsletter branch from f248c22 to accf632 Aug 28, 2019
@jnewbery

This comment has been minimized.

Copy link
Contributor

jnewbery commented Aug 28, 2019

ACK accf632

@bitschmidty

This comment has been minimized.

Copy link
Contributor

bitschmidty commented Aug 28, 2019

tACK accf632

@sipa

This comment has been minimized.

Copy link

sipa commented Aug 28, 2019

ACK miniscript section, thanks!

@bitschmidty bitschmidty merged commit 87d715f into bitcoinops:master Aug 28, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
netlify/bitcoinops/deploy-preview Deploy preview ready!
Details
@bitschmidty

This comment has been minimized.

Copy link
Contributor

bitschmidty commented Aug 28, 2019

newsletter draft needed correction
@sipa givin' ACK on the miniscript section

bitcoin wallets better support send
since the bech32 segments come to an end

@harding thanks for the heroics getting this one out!
@sipa and @sanket1729 thank you for the miniscript feedback
@jonatack and @jnewbery thanks for your reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.