Skip to content

Commit df3ca76

Browse files
committed
fix: missing tx validation pages
1 parent ef9ee0e commit df3ca76

6 files changed

+6
-7
lines changed

consensus-and-validation.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
= Consensus and Validation
21
:page-nav_order: 20
32
:page-has_children: true
43
include::links-onepage.adoc[]
4+
= Consensus and Validation
55

66
TIP: This section has been updated to Bitcoin Core @ https://github.com/bitcoin/bitcoin/tree/v23.0[v23.0^]
77

input-checks.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:page-title: Input validation
22
:page-nav_order: 20
33
:page-parent: Transaction Validation
4+
:page-grand_parent: Consensus and Validation
45
include::links-onepage.adoc[]
56
[[prechecks]]
67
=== PreChecks

multiple-transactions.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
:page-title: Multiple transactions
22
:page-nav_order: 10
33
:page-parent: Transaction Validation
4+
:page-grand_parent: Consensus and Validation
45
include::links-onepage.adoc[]
5-
66
[#multiple_transactions]
77
=== Multiple transactions (and packages)
88

single-transactions.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:page-title: Single transactions
22
:page-nav_order: 0
33
:page-parent: Transaction Validation
4+
:page-grand_parent: Consensus and Validation
45
:mermaid-puppeteer-config: ./puppeteer-config.json
56
[[single_transactions]]
67
=== Single transactions

transaction-validation.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
== Transaction validation
21
:page-title: Transaction Validation
32
:page-nav_order: 90
43
:page-parent: Consensus and Validation
54
:page-has_children: true
65
:mermaid-puppeteer-config: ./puppeteer-config.json
76
include::links-onepage.adoc[]
8-
97
[#transaction_validation]
8+
== Transaction validation
109
Transactions can originate from the P2P network, the wallet, RPCs or from tests.
1110

1211
Transactions which originate from the wallet, RPCs or individually from the P2P network (from a `NetMsgType::TX` message) will follow a validation pathway which includes adding them to the mempool.

transactions-from-blocks.adoc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:page-title: Transactions from blocks
22
:page-nav_order: 30
33
:page-parent: Transaction Validation
4+
:page-grand_parent: Consensus and Validation
45
:mermaid-puppeteer-config: ./puppeteer-config.json
56
[[transactions_from_blocks]]
67
=== Transactions from blocks
@@ -14,7 +15,6 @@ Transactions learned about from blocks:
1415
This means that we can validate these transactions based only on our copy of the UTXO set and the data contained within the block itself.
1516
We call `ProcessBlock()` when processing new blocks received from the P2P network (in _net_processing.cpp_) from net message types: `NetMsgType::CMPCTBLOCK`, `NetMsgType::BLOCKTXN` and `NetMsgType::BLOCK`.
1617

17-
1818
.Abbreviated block transaction validation
1919
[mermaid,target=block-tx-validation,id=block-tx-validation]
2020
....
@@ -86,7 +86,6 @@ In these cases this block may still be useful to us in the future.
8686

8787
Once the block has been written to disk by `AcceptBlock()` full validation of the block and its transactions begins via `CChainState::ActivateBestChain()` and its inner call to `ActivateBestChainStep()`.
8888

89-
////
9089
As part of `ProcessBlock()` we end up calling `CheckBlock()` twice: once on the inner `ProcessNewBlock()` and, if this first is successful, once again inside of `AcceptBlock()`.
9190
We find the following code comment inside `ProcessBlock()`:
9291

@@ -128,7 +127,6 @@ Therefore we call `CheckBlock()` first, and only try `AcceptBlock()` if this pas
128127

129128
Note here how the developers have had to balance consideration for sensitive validation code, staying in consensus with the rest of the network and avoiding potential P2P DoS attacks.
130129
This type of thinking is common across the codebase.
131-
////
132130

133131
////
134132
TODO: Note that the primary validation occurs inside `ConnectBlock()`, not `CheckBlock()` and `AcceptBlock()`

0 commit comments

Comments
 (0)