summaryrefslogtreecommitdiff
path: root/cd/350c7de4465febc031abaf87f10fcfcd2f68b9
blob: 460402c10f5a468032d322db209ea3edecf5b77f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 017A9DCD
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 30 Apr 2019 04:29:23 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch
	[185.70.40.135])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3E179608
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 30 Apr 2019 04:29:21 +0000 (UTC)
Date: Tue, 30 Apr 2019 04:29:18 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
	s=default; t=1556598559;
	bh=+/ur1j5so4mZ6i/JA3LuOJ6AVq8+9YmlolMuTmL3dSA=;
	h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:
	Feedback-ID:From;
	b=Xqwyszt4KTWKYdWLxoxaP0WUJ4bFCR2b5K5+GiQZy44sofubq7WCZmjG7YYUIKa/9
	CpFuauO0TJ4jrWcE2nQrUA2mHU3YqvUkTVb+YjwAqHNWB3oxGDb038jKOBkBh4wajT
	RKTuHjP8ylRLVZcAjo1ySiW0ByaXSZLDIXmg7FSs=
To: Aymeric Vitte <vitteaymeric@gmail.com>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <aglJm4Zqda4W5Lrq33myL085DPnxjQTY1Eg6ANYFOe10nXeW8NvBOUUckAF4ASsZIO00xB8KoZ6wOQPPFB9g-uOl8A4gwZ10MYYZzZ2BjU0=@protonmail.com>
In-Reply-To: <56b67b57-dc11-183a-1f4e-5a8c296b64cc@gmail.com>
References: <21346b3c-dad5-c666-9234-8916aa5a56e4@gmail.com>
	<201904290301.43459.luke@dashjr.org>
	<56b67b57-dc11-183a-1f4e-5a8c296b64cc@gmail.com>
Feedback-ID: el4j0RWPRERue64lIQeq9Y2FP-mdB86tFqjmrJyEPR9VAtMovPEo9tvgA0CrTsSHJeeyPXqnoAu6DN-R04uJUg==:Ext:ProtonMail
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Thu, 02 May 2019 23:19:41 +0000
Cc: "bitcoin-dev@lists.linuxfoundation.org"
	<bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] IsStandard
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Apr 2019 04:29:23 -0000

Good morning Aymeric,


Sent with ProtonMail Secure Email.

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Monday, April 29, 2019 5:30 PM, Aymeric Vitte <vitteaymeric@gmail.com> w=
rote:

> ZmnSCPxj, OK, but you can put whatever you like in the different
> standard output script you mention (my example below whether legacy or
> segwit)
>

I am uncertain what you mean by this.

For P2PKH and P2WPKH, you must present a hash of a public key.
You cannot present a hash of anything else.

The P2PKH template can be interpreted as a script, but is actually recogniz=
ed as a template by most current nodes (in a way that is consistent with in=
terpreting it as a script).

For P2SH and P2WSH, you must present a hash of a script.

It is more helpful to consider that *today* nodes recognize particular patt=
erns (P2PKH, P2WPKH, P2SH, P2WSH) as templates and not as scripts to be exe=
cuted.

In any case, if you want to make anything more complicated than "single sig=
ner" you should use P2SH or P2WSH regardless, and give your script.
If you want to assure somebody that a particular P2SH or P2WSH commits to a=
 particular policy, just expose the policy script to them and have them (i.=
e. their client software) verify that the policy is what the user wants and=
 that when hashed it matches the P2SH/P2WSH.

As Luke said, nodes can have any policy for propagating transactions.
However it is generally expected that P2PKH, P2WPKH, P2SH, and P2WSH will b=
e propagated by a majority of nodes, if only because those are reliably "pa=
ssed" by `isStandard` in the default latest Bitcoin Core and most people wi=
ll not modify the Core code.

Generally, anything that isn't P2PKH, P2WPKH, P2SH, or P2WSH will not likel=
y be propagated by the network.
You *could* still coordinate with one or more miners to get it mined: you c=
an put anything in the block, it is simply that most nodes will not inform =
miners about transactions that do not pay out to P2PKH, P2WPKH, P2SH, or P2=
WSH.

Regards,
ZmnSCPxj