<blockquote>
  <p>Do full nodes have any incentive to validate transactions they're not directly benefiting from? </p>
</blockquote>

<p>Yes. If they did not validate all blocks and transactions, they could end up on a blockchain fork which could be facilitated by an attacker. Validating all blocks and transactions allows them to be sure that the node is on the right blockchain.</p>

<blockquote>
  <p>How often do full nodes actually validate transactions?</p>
</blockquote>

<p>For new blocks and transactions, all the time. Every single new block and transaction received by a node is fully validated according to the node's consensus rules. During the initial blockchain sync, transactions and blocks are only partially validated (signatures aren't validated) up to a certain hard-coded block hash, and only if that block hash is part of the best header's chain.</p>

<blockquote>
  <p>If a full node wanted to validate a transaction but the miner didn't broadcast the witness as part of the new block, who would the full node request the signature from? As far as I understand, there are plans to do witness "pruning" in the long-term to minimize the size of the full blockchain, but what enforces keeping the signatures around in the short-term?</p>
</blockquote>

<p>Segwit nodes will always ask for the block with witnesses. If a block is sent to them without witnesses even though witnesses is asked for, the block will be considered invalid and the node that sent the block will be temporarily disconnected from the node and banned. The same goes for transactions, but without the disconnect and banning IIRC. To always ensure that a block comes with a witness, a segwit node will never request a block from a non-segwit node.</p>

CC BY-SA 3.0
2017-12-15T19:40:00.330Z
Andrew chow .... The same goes for transactions(are you referencing mempool or Tx from that banned miner?), also what is IIRC?
user380208
CC BY-SA 3.0
2017-12-16T00:52:59.717Z
@anacondabitch transactions without witnesses are considered invalid but the node that sent it is not necessarily disconnected and banned. IIRC is short for "If I Remember Correctly".
Ava Chow
CC BY-SA 3.0
2017-06-20T05:19:10.493Z
2017-06-20T05:19:10.493Z
Ava Chow
<p>I'm trying to fill a few gaps in my understanding of transaction verification and would appreciate any insight.</p>

<h2>Without SegWit</h2>

<ol>
<li>Miners broadcast new blocks which contain the signature(s) with every transaction.</li>
<li>Miners can choose to decide whether or not to verify every transaction in the block. They're incentivized to verify every transaction because otherwise the block may be invalid and they would lose their reward.</li>
<li>Full nodes store all the blockchain data and can optionally verify the transactions as well.</li>
</ol>

<p>Q1: Do full nodes have any incentive to validate transactions they're not directly benefiting from? How often do full nodes actually validate transactions?</p>

<h2>With SegWit</h2>

<ol>
<li>Miners broadcast new blocks which may or may not contain the witness.</li>
<li>As before, miners are incentivized to validate the transaction but are also incentivized to omit the witness when broadcasting new blocks to minimize bandwidth.</li>
<li>Full nodes may or may not store the witness data as part of the full blockchain. </li>
</ol>

<p>Q2: If a full node wanted to validate a transaction but the miner didn't broadcast the witness as part of the new block, who would the full node request the signature from? As far as I understand, there are plans to do witness "pruning" in the long-term to minimize the size of the full blockchain, but what enforces keeping the signatures around in the short-term?</p>

<transaction-verification><segregated-witness><full-node><verification>
Transaction verification by miner VS full node with & without SegWit
Olshansky
# Transaction verification by miner VS full node with & without SegWit

(Asked by: username_0 on 2017-06-20)

I'm trying to fill a few gaps in my understanding of transaction verification and would appreciate any insight.

## Without SegWit

1. Miners broadcast new blocks which contain the signature(s) with every transaction.
2. Miners can choose to decide whether or not to verify every transaction in the block. They're incentivized to verify every transaction because otherwise the block may be invalid and they would lose their reward.
3. Full nodes store all the blockchain data and can optionally verify the transactions as well.

Q1: Do full nodes have any incentive to validate transactions they're not directly benefiting from? How often do full nodes actually validate transactions?

## With SegWit

1. Miners broadcast new blocks which may or may not contain the witness.
2. As before, miners are incentivized to validate the transaction but are also incentivized to omit the witness when broadcasting new blocks to minimize bandwidth.
3. Full nodes may or may not store the witness data as part of the full blockchain.

Q2: If a full node wanted to validate a transaction but the miner didn't broadcast the witness as part of the new block, who would the full node request the signature from? As far as I understand, there are plans to do witness "pruning" in the long-term to minimize the size of the full blockchain, but what enforces keeping the signatures around in the short-term?

**Tags:** transaction-verification, segregated-witness, full-node, verification


---

## 1 answers

### Answer by username_1 on 2017-06-20. Score: 4 | Accepted answer

> Do full nodes have any incentive to validate transactions they're not directly benefiting from?

Yes. If they did not validate all blocks and transactions, they could end up on a blockchain fork which could be facilitated by an attacker. Validating all blocks and transactions allows them to be sure that the node is on the right blockchain.

> How often do full nodes actually validate transactions?

For new blocks and transactions, all the time. Every single new block and transaction received by a node is fully validated according to the node's consensus rules. During the initial blockchain sync, transactions and blocks are only partially validated (signatures aren't validated) up to a certain hard-coded block hash, and only if that block hash is part of the best header's chain.

> If a full node wanted to validate a transaction but the miner didn't broadcast the witness as part of the new block, who would the full node request the signature from? As far as I understand, there are plans to do witness "pruning" in the long-term to minimize the size of the full blockchain, but what enforces keeping the signatures around in the short-term?

Segwit nodes will always ask for the block with witnesses. If a block is sent to them without witnesses even though witnesses is asked for, the block will be considered invalid and the node that sent the block will be temporarily disconnected from the node and banned. The same goes for transactions, but without the disconnect and banning IIRC. To always ensure that a block comes with a witness, a segwit node will never request a block from a non-segwit node.

> **Comments:**
> **username_2**: Andrew username_1 .... The same goes for transactions(are you referencing mempool or Tx from that banned miner?), also what is IIRC?  
> **username_1**: @anacondabitch transactions without witnesses are considered invalid but the node that sent it is not necessarily disconnected and banned. IIRC is short for "If I Remember Correctly".  

---

