added anyonecanpay to sighash doc

This commit is contained in:
fbock
2024-05-08 18:34:02 +02:00
parent cb7705b1cf
commit 2421074a74
3 changed files with 14 additions and 22 deletions

View File

@ -4,22 +4,15 @@
"type": "split",
"children": [
{
"id": "569fa596d7e5f0e4",
"id": "83f3e4f8fc8a23bd",
"type": "tabs",
"children": [
{
"id": "a55c01f7d8f62386",
"id": "a6f226df420e6a1a",
"type": "leaf",
"state": {
"type": "canvas",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"viewState": {
"x": 1051.5,
"y": -8.026990156291024,
"zoom": -0.28644350006291147
}
}
"type": "empty",
"state": {}
}
}
]
@ -88,7 +81,6 @@
"state": {
"type": "backlink",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -105,7 +97,6 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@ -127,9 +118,7 @@
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas"
}
"state": {}
}
}
]
@ -149,11 +138,12 @@
"command-palette:Open command palette": false
}
},
"active": "a55c01f7d8f62386",
"active": "a6f226df420e6a1a",
"lastOpenFiles": [
"Research/Trade Pipelines/current trade flow.canvas",
"Research/Bitcoin fundamentals/Signature and Flags.canvas",
"assets/anyonecanpay.webp",
"Research/Bitcoin fundamentals/Spending Taproot UTXOs.md",
"Research/Trade Pipelines/current trade flow.canvas",
"Research/Bitcoin fundamentals/Taproot output structure.canvas",
"Research/Implementation/UI ideas.canvas",
"Research/Implementation/Libraries.md",

View File

@ -8,9 +8,10 @@
{"id":"8526cdb3e9883674","type":"text","text":"For **SIGHASH** **ALL**, given a transaction Tx, the signature applies to all of Txs inputs and all its outputs\n\nThe transaction is rendered invalid if any of its details are changed because the signature will change too and be invalid.","x":1100,"y":-356,"width":391,"height":200,"color":"5"},
{"id":"39bb6307899c5d87","type":"text","text":"1. Create a copy of the transaction\n2. Empty each script_sig for all inputs and replace with the script_pubkey they reference\n3. Empty out all output fields\n4. Serialize the transaction\n5. Append 0x02 to **Tx_ser**, hash, and then sign","x":1620,"y":-169,"width":660,"height":207,"color":"1"},
{"id":"0e6dda772fa0f997","type":"text","text":"For **SIGHASH** **NONE**, the signature applies to all of Txs inputs but to none of the outputs.","x":1100,"y":-104,"width":400,"height":78,"color":"1"},
{"id":"4783ea786041b3c4","x":1100,"y":38,"width":400,"height":200,"color":"4","type":"text","text":"For **SIGHASH** **SINGLE**, all the inputs of the given transaction Tx are signed and one output that has the same index of one of the inputs being signed. This is essentially “authorizing all other inputs to go with a specific output” (Song, 2019, p. 133)."},
{"id":"17953abf6e32fa3d","x":1620,"y":121,"width":660,"height":199,"color":"4","type":"text","text":"1. Create a copy of the transaction\n2. Empty script_sigs for each input and replace with the script_pubkey they reference\n3. Empty out all output fields bar the specific output\n4. Serialize the transaction\n5. Append 0x03 to **Tx_ser**, hash, and then sign"},
{"id":"ee8fd83cff1ef0ba","x":1018,"y":-662,"width":473,"height":222,"color":"2","type":"text","text":"An **ANYONECANPAY** modifier flag exists that can be added to the aforementioned flags that apply to a **single** input in a transaction. Rosenbaum (2019) considers the ANYONECANPAY modifier flag as a way to commit to inputs only, by setting or not setting it, and the existing SIGHASH types (ALL, NONE, SINGLE) as a way to commit to outputs only."}
{"id":"4783ea786041b3c4","type":"text","text":"For **SIGHASH** **SINGLE**, all the inputs of the given transaction Tx are signed and one output that has the same index of one of the inputs being signed. This is essentially “authorizing all other inputs to go with a specific output” (Song, 2019, p. 133).","x":1100,"y":38,"width":400,"height":200,"color":"4"},
{"id":"17953abf6e32fa3d","type":"text","text":"1. Create a copy of the transaction\n2. Empty script_sigs for each input and replace with the script_pubkey they reference\n3. Empty out all output fields bar the specific output\n4. Serialize the transaction\n5. Append 0x03 to **Tx_ser**, hash, and then sign","x":1620,"y":121,"width":660,"height":199,"color":"4"},
{"id":"ee8fd83cff1ef0ba","type":"text","text":"An **ANYONECANPAY** modifier flag exists that can be added to the aforementioned flags that apply to a **single** input in a transaction. Rosenbaum (2019) considers the ANYONECANPAY modifier flag as a way to commit to inputs only, by setting or not setting it, and the existing SIGHASH types (ALL, NONE, SINGLE) as a way to commit to outputs only.","x":1018,"y":-662,"width":473,"height":222,"color":"2"},
{"id":"b93d1dd0b0feb448","x":1055,"y":-1000,"width":400,"height":297,"type":"file","file":"assets/anyonecanpay.webp"}
],
"edges":[
{"id":"1c3a1e2cc3bf2afa","fromNode":"64e37547f27f3e55","fromSide":"right","toNode":"64c991bc18fbc277","toSide":"left"},
@ -20,6 +21,7 @@
{"id":"3f4068b0a4c19f71","fromNode":"0e6dda772fa0f997","fromSide":"right","toNode":"39bb6307899c5d87","toSide":"left"},
{"id":"a9eb41d7c10ebe6d","fromNode":"64c991bc18fbc277","fromSide":"right","toNode":"4783ea786041b3c4","toSide":"left"},
{"id":"df5f1dd7d4be7955","fromNode":"4783ea786041b3c4","fromSide":"right","toNode":"17953abf6e32fa3d","toSide":"left"},
{"id":"ffddd1b2b5019de2","fromNode":"64c991bc18fbc277","fromSide":"top","toNode":"ee8fd83cff1ef0ba","toSide":"left"}
{"id":"ffddd1b2b5019de2","fromNode":"64c991bc18fbc277","fromSide":"top","toNode":"ee8fd83cff1ef0ba","toSide":"left"},
{"id":"4f220c13ebdf58ab","fromNode":"ee8fd83cff1ef0ba","fromSide":"top","toNode":"b93d1dd0b0feb448","toSide":"bottom"}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB