mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
This modifies commits provided by @petertodd to use the terms "pubkey script" and "signature script" instead of other terms. * Rename "scriptPubKey" and "output script" to "pubkey script" (suggested by @luke-jr). We leave a token "scriptPubKey" at the point where we define pubkey script so that searchers can find it. * Rename "scriptSig" to "signature script" (suggested by @luke-jr). We also leave a token "scriptSig" at this definition point. * Rename "redeemScript" to "redeem script" * Defined ECDSA on secp256k1 curve as the crypto used in the Transaction section and added references to secp256k1 private/public keys and signatures. * Removed "The Parts Of A Transaction" illustration by commenting it out in the HTML. Shoehorning the pubkey/signature script terms into this image was becoming difficult, and I'm not very fond of that illustration anyway. I'll see if I can think of a nicer replacement illustration for some point in the future. * Add a short paraphrased version @petertodd's description of scripts as generalized crypto. * Updated all the illustrations which referred to either pubkey scripts or signature scripts to use these terms.
146 lines
4.9 KiB
Text
146 lines
4.9 KiB
Text
digraph blockchain {
|
|
|
|
size=6.25;
|
|
splines = "false";
|
|
//rankdir=LR;
|
|
//ranksep=0.1;
|
|
//splines=ortho;
|
|
|
|
node [ fontname="Sans", shape = box ];
|
|
edge [ fontname="Sans", style = invis, minlen = 1 ];
|
|
graph [ fontname="Sans" ];
|
|
//fixedsize
|
|
nodesep = 0.05;
|
|
//concentrate = true;
|
|
|
|
subgraph cluster_alice {
|
|
bgcolor = grey;
|
|
alice_opchecksig [ label = "CHECKSIG" ];
|
|
alice_opequalverify [ label = "OP_EQUALVERIFY" ];
|
|
alice_pubkeyhash [ label = "Pk Hash", shape = "" ];
|
|
alice_ophash [ label = "OP_HASH160" ];
|
|
alice_opdup [ label = "OP_DUP" ];
|
|
alice_pubkey [style = invis, label="PubKey", shape = "" ];
|
|
alice_sig [style = invis, label="Sig", shape = "" ];
|
|
|
|
label = "Instructions And Data Provided By Alice In Transaction #1's Pubkey Script"
|
|
/* label = "Data Provided By Spender 1 To Spend Output" */
|
|
}
|
|
|
|
subgraph cluster_bob {
|
|
bgcolor = grey;
|
|
bob_opchecksig [ label = "CHECKSIG", style = invis ];
|
|
bob_opequalverify [ label = "OP_EQUALVERIFY", style = invis ];
|
|
bob_pubkeyhash [ label = "Pk Hash", style = invis, shape = "" ];
|
|
bob_ophash [ label = "OP_HASH160", style = invis ];
|
|
bob_opdup [ label = "OP_DUP", style = invis ];
|
|
bob_pubkey [style = unfilled, label="PubKey", shape = "" ];
|
|
bob_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
label = "Data Provided By Bob In Transaction #2's Input Signature Script"
|
|
}
|
|
|
|
alice_sig -> bob_sig;
|
|
alice_pubkey -> bob_pubkey;
|
|
alice_opdup -> bob_opdup;
|
|
alice_ophash -> bob_ophash;
|
|
alice_pubkeyhash -> bob_pubkeyhash;
|
|
alice_opequalverify -> bob_opequalverify;
|
|
alice_opchecksig -> bob_opchecksig;
|
|
|
|
subgraph invis {
|
|
node [ style = invis, label="", width=0, height=0 ];
|
|
invis0_0;
|
|
invis0_1;
|
|
invis0_2;
|
|
invis0_3;
|
|
|
|
invis1_0;
|
|
invis1_1;
|
|
invis1_2;
|
|
|
|
invis2_0;
|
|
invis2_1;
|
|
|
|
invis3_0;
|
|
|
|
invis4_0;
|
|
|
|
invis5_0;
|
|
invis5_1;
|
|
|
|
invis6_0;
|
|
invis6_1;
|
|
invis6_2;
|
|
invis6_3;
|
|
invis6_4;
|
|
invis6_5;
|
|
invis6_6;
|
|
}
|
|
stack7_opchecksig [style = filled, label="OP_CHECKSIG" ];
|
|
stack7_pubkey [style = filled, label="PubKey", shape = "" ];
|
|
stack7_sig [style = filled, label="Sig", shape = "" ];
|
|
|
|
stack6_opequalverify [style = filled, label="OP_EQUALVERIFY" ];
|
|
stack6_pubkeyhash [style = filled, label="Pk Hash", shape = "" ];
|
|
stack6_ophash [style = filled, label="Pk Hash" ];
|
|
stack6_pubkey [style = unfilled, label="PubKey", shape = "" ];
|
|
stack6_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
stack5_pubkeyhash [style = unfilled, label="Pk Hash", shape = "" ];
|
|
stack5_ophash [style = unfilled, label="Pk Hash" ];
|
|
stack5_pubkey [style = unfilled, label="PubKey", shape = "" ];
|
|
stack5_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
stack4_ophash [style = filled, label="OP_HASH160" ];
|
|
stack4_opdup [style = filled, label="PubKey" ];
|
|
stack4_pubkey [style = unfilled, label="PubKey", shape = "" ];
|
|
stack4_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
stack3_opdup [style = filled, label="OP_DUP" ];
|
|
stack3_pubkey [style = filled, label="PubKey", shape = "" ];
|
|
stack3_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
stack2_pubkey [style = unfilled, label="PubKey", shape = "" ];
|
|
stack2_sig [style = unfilled, label="Sig", shape = "" ];
|
|
stack1_sig [style = unfilled, label="Sig", shape = "" ];
|
|
|
|
bob_sig -> invis0_0 -> invis0_1 -> invis0_2 -> invis0_3 -> stack1_sig;
|
|
bob_sig -> invis0_1 [ style = "dotted" ];
|
|
|
|
bob_pubkey -> invis1_0 -> invis1_1 -> invis1_2 -> stack2_pubkey;
|
|
bob_pubkey -> stack2_pubkey; stack2_pubkey -> stack2_sig;
|
|
|
|
|
|
bob_opdup -> invis2_0 -> invis2_1 -> stack3_opdup;
|
|
alice_opdup -> invis2_1 [ constraint = false, style = "dotted" ]; stack3_opdup -> stack3_pubkey -> stack3_sig;
|
|
|
|
bob_ophash -> invis3_0 -> stack4_ophash;
|
|
bob_ophash -> stack4_ophash; stack4_ophash -> stack4_opdup -> stack4_pubkey -> stack4_sig;
|
|
|
|
bob_pubkeyhash -> invis4_0 -> stack5_pubkeyhash;
|
|
bob_pubkeyhash -> stack5_pubkeyhash; stack5_pubkeyhash -> stack5_ophash -> stack5_pubkey -> stack5_sig;
|
|
|
|
bob_opequalverify -> stack6_opequalverify; stack6_opequalverify -> stack6_pubkeyhash -> stack6_ophash -> stack6_pubkey -> stack6_sig
|
|
|
|
bob_opchecksig -> invis5_0 -> invis5_1 -> stack7_opchecksig;
|
|
bob_opchecksig -> stack7_opchecksig; stack7_opchecksig -> stack7_pubkey -> stack7_sig
|
|
|
|
invis6_0 -> invis6_1 -> invis6_2 -> invis6_3 -> invis6_4 -> invis6_5 -> TRUE;
|
|
stack7_opchecksig -> TRUE [ style = "", minlen = 2 ];
|
|
|
|
|
|
stack3_opdup -> stack4_opdup [ constraint = false, style = "" ];
|
|
stack3_pubkey -> stack3_opdup [ style = "" ];
|
|
|
|
stack4_ophash -> stack5_ophash [ constraint = false, style = "" ];
|
|
stack4_opdup -> stack4_ophash [ style = "" ];
|
|
|
|
stack6_pubkeyhash -> stack6_opequalverify [ style = "" ];
|
|
stack6_ophash -> stack6_pubkeyhash [ style = "" ];
|
|
|
|
stack7_pubkey -> stack7_opchecksig [ style = "" ];
|
|
stack7_sig -> stack7_pubkey [ style = "" ];
|
|
|
|
label = "Evaluation Stack Over Time During Succesful P2PKH Script Validation"
|
|
}
|