digraph blockchain {

size="6.25";

splines = "false";
rankdir=TB;
ranksep=-0.1;
//splines=ortho;
overlap = true;
nodesep = 0.1;

node [ shape = box, penwidth = 1.75 ];
edge [ penwidth = 1.75, minlen = 2 ];
penwidth = 1.75;

subgraph cluster_tx1 {
    tx1_txid [ label = "TXID" ];
    tx1_vout [ label = "Output Index Number" ];
    tx1_script [ label = "Pubkey Script" ];

    label = "Transaction 1 (TX 1)"
}



subgraph cluster_sig {
    node [ style = "invis", label = "", height=0 ];

    sig_tx1_txid [ width = 0.7 ];
    sig_tx1_vout [ width = 2.3 ];
    sig_tx1_script [ width = 1.6 ];
    //nil_pubkey [ width = 1.3 ];
    sig_tx2t_script [ width = 1.65 ];
    sig_tx2t_amount [ width = 0.95 ];
    signature [ width = 1.25 ];


    label = "           Signed Data"
}

subgraph cluster_tx2 {
    tx2_tx1_txid [ label = "TXID" ];
    tx2_tx1_vout [ label = "Output Index Number" ];
    tx2_script [ label = "Pubkey Script" ];
    public_key [ label = "Full Public Key" ];
    tx2_amount [ label = "Amount" ];
    tx2_signature [ label = "Signature" ];

    label = "Transaction 2"
}

subgraph cluster_bob {
    private_key [ label = "Private Key" ];

    label = "Bob's Computer"
subgraph cluster_tx2t {
    tx2t_script [ label = "Pubkey Script" ];
    tx2t_amount [ label = "Amount" ];

    label = "TX2 Template"
}

}

{
edge [ arrowhead = "dot" ];
tx1_script -> sig_tx1_script;
tx1_txid -> sig_tx1_txid [ style = "invis" ];
tx1_vout -> sig_tx1_vout [ style = "invis" ];
tx2t_script -> sig_tx2t_script [ style = "invis" ];
tx2t_amount -> sig_tx2t_amount [ style = "invis" ];
private_key -> signature [ style = "dotted" ];
}


sig_tx1_txid -> tx2_tx1_txid [ style = "invis" ];
sig_tx1_vout -> tx2_tx1_vout [ style = "invis" ];
sig_tx2t_script -> tx2_script [ style = "invis" ];
sig_tx2t_amount -> tx2_amount [ style = "invis" ];
signature -> tx2_signature;


tx1_txid -> tx2_tx1_txid [ constraint = false ];
tx1_vout -> tx2_tx1_vout [ constraint = false ];
tx2t_script -> tx2_script [ constraint = false ];
tx2t_amount -> tx2_amount [ constraint = false ];


label = "Some Of The Data Signed By Default"
}
