29
votes
Accepted
How are bitcoin transactions and the blockchain transferred over the internet?
The Bitcoin P2P network
The Bitcoin P2P network is a randomly-wired gossip network. This means that all nodes make arbitrary connections to other peers (using various ways to discover new addresses) ...
- 94.2k
23
votes
Accepted
What are the advantages of Schnorr vs ECDSA?
Your question seems to assume that the only goal is minimizing on-chain transaction size. Reducing size and related costs is certainly something that can be improved upon, but it's far from the only ...
- 94.2k
14
votes
Accepted
How is SegWit a soft fork?
You're confusing transactions (the abstract object) and their serialization (the bytes on the wire in the P2P protocol or on disk).
Sure, SegWit introduces an extension to the P2P protocol (BIP144), ...
- 94.2k
11
votes
Accepted
How to verify if it's Segwit Transaction or not?
A transaction is a segwit tx if at least one of the inputs contain a witness. Or if you are inspecting the raw tx then you check the 5th byte (the input count) and if it is 0x00 then it is a segwit tx....
- 3,404
10
votes
Accepted
If Bitcoin transactions require ~10 min to clear, how can payments get recognized within seconds?
When you create a transaction, your Bitcoin wallet broadcasts it to a few full nodes on the Bitcoin peer-to-peer network. Those full nodes quickly relay it to other full nodes, and it eventually ends ...
- 11.5k
8
votes
Where the P2SH script gets written?
The script is maintained by the intended recipient; he is the one responsible to keep it and not to lose it. The nodes do not store any database of the scripts.
The script is provided by the spender ...
- 1,012
8
votes
Accepted
If I set assumevalid=0 after syncing the blockchain will Bitcoin Core go back and validate historical blocks?
No, it won't.
That's also not possible without rebuilding the UTXO set from scratch, as the unspent outputs being spent need to be known to validate spends against.
If you want to force a ...
- 94.2k
8
votes
Accepted
Full list of "special cases" during Bitcoin Script execution (p2sh, p2wsh, etc.)?
As of January 2021, "high-level" script validation with all active consensus rules on the network is approximately this:
Top level evaluation
Execute the scriptSig, and call the resulting ...
- 94.2k
8
votes
Accepted
Why does IsCoinBase() check if there is exactly one input?
A coinbase transaction is not allowed to have any other inputs, hence this check. Furthermore, because this check is part of consensus code, it is the definition for a coinbase transaction, so this ...
- 65.7k
7
votes
Accepted
Does value 'True' at the middle of stack is valid transaction?
Contrary to the book Mastering Bitcoin, there is no boolean value of "True" in Bitcoin Script. An executed transaction script is valid when the top item remaining in the stack at the conclusion of ...
- 15.3k
7
votes
Accepted
How many bitcoin transactions can be verified per second on commodity hardware in 2020?
As others have pointed out, this largely depends on what kind of transaction you're verifying. More inputs and more signatures means longer verification, and for pre-SegWit inputs the computational ...
- 4,124
7
votes
Accepted
How are transactions verified with only the Bitcoin address, not the public key?
When you spend from a Bitcoin address, your transaction includes both the public key corresponding to the hashed address you're trying to spend from, as well as a signature that can be verified with ...
- 2,040
6
votes
Accepted
How do miners understand what a transaction does?
Determining the fee of a transaction is actually very easy.
As you know, a transaction has inputs and outputs, where each output has an associated amount and a script, and each input is a link to an ...
- 22.9k
6
votes
Accepted
Is the SPV client model scalable?
Generally speaking, BIP37 bloom filtering SPV has atrocious scaling though it is hard to say exactly how poor it is in the real works.
Every peer must sync the entire block chain from the last they ...
- 15.3k
6
votes
Why do nodes trust other nodes to approve their transactions?
I know that the blockchain technologie works so well, because
everybody has basically a copy of the last ledger.
Yes, every full bitcoin node has a copy of the blockchain (aka ledger).
Therefore,...
- 2,254
6
votes
Different error messages under "Mandatory script verify flag failed."
But aren't both errors just variant of a failure in executing the OP_EQUALVERIFY? At what step of the evaluation each error is thrown and what can we make out of it?
No, they're different errors. ...
- 29k
6
votes
Accepted
How Blockchain transaction verification takes place?
Each node stores the entire history of transactions (the blockchain). When a node hears about a new transaction, it performs a series of checks to make sure that transaction is valid.
So, when ...
- 17.7k
6
votes
Accepted
Where is sum(vin) > sum(vout) check in Bitcoin Core?
https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&unscoped_q=bad-txns-in-belowout
const CAmount value_out = tx.GetValueOut();
if (nValueIn < value_out) {
return state.DoS(...
- 6,724
6
votes
Accepted
Why is there no such thing as a redirected, forged, or fake transaction?
The Bitcoin protocol follows a Unspent Transaction Output system to track the existence and state of all Bitcoin in the system. These are known as UTXOs.
All transactions that transfer Bitcoin do so ...
- 16.7k
6
votes
Accepted
Function combinerawtransaction is not working
The issue here is that the two transactions are different, and combinerawtransaction does not operate on different transactions (it apparently just silently does nothing). It sounds like you expect ...
- 65.7k
5
votes
Which sender is banned in case of invalid transactions or blocks?
There is no way to know which node created a transaction or block, unless they publish that information themselves. Nodes should not have an identity that leaks into transaction or block data.
So ...
- 94.2k
5
votes
Accepted
Satoshi Nakamoto's Transaction Chain Diagram Hash Value
Can anyone confirm exactly how the Hash value shown is computed
By taking the raw data for the transaction (as in the bytes that are sent over the wire for the transaction) and passing it through a ...
- 65.7k
5
votes
Accepted
Why are only specific transaction types accepted into the mempool?
Any script can be used in P2SH/P2WSH technique. Using arbitrary scripts in transaction outputs cause grows of UTXO database and other problems.
- 6,724
5
votes
Accepted
Bitcoin transactions validation process
Everything MCCCS wrote is good, but just to clarify on your last question:
How many nodes must approve/verify the winning hash before it is accepted into the bitcoin network as the next block to be ...
- 17.7k
5
votes
Accepted
Is verification of a blockchain computationally cheaper than recreating it?
Is verification of blockchain computationally cheaper than recreating it?
Yes, far easier
How do you verify the blockchain integrity? Don't you also have to recalculate all the values to see whether ...
- 22.2k
5
votes
Accepted
Verifying a bitcoin Signature and what is the transaction data that is signed?
What you described only works for transactions with one input and one output.
In general, what you do is you take the transaction that you want to verify, remove the scriptSigs from all of the inputs,...
- 65.7k
5
votes
Accepted
how does bitcoin solve the same chain replay attack?
In all cases what you are describing is a double-spend. Bitcoin uses a UTXO model (not an account based model) which means that there is a set of coins also known as the UTXO set or Unspent ...
- 4,892
5
votes
Accepted
How does validating a transaction get more and more hard?
Bitcoin nodes keep track of what's called the UTXO set – the set of all unspent transaction outputs. Every valid transaction must only spend existing and not previously spent outputs, so this is ...
- 4,124
5
votes
Accepted
When was the 10,000 B limit for scripts introduced?
It was introduced in v0.3.7, dated July 31 2010, in commit 73aa262647, titled "fixed segfault in bignum.h, additional security limits, refactoring -- version 0.3.7":
vector<valtype&...
- 94.2k
5
votes
Accepted
Does running a standard Bitcoin full node mean your node verifies transactions of other members?
The purpose of a full node in Bitcoin is to independently verify the consensus rules for transactions and blocks. This means your node will check every transaction and every block before accepting it ...
- 631
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
transaction-verification × 282transactions × 96
bitcoin-core × 27
blockchain × 23
script × 23
mining-theory × 22
verification × 20
signature × 19
validation × 15
block-validity × 15
unconfirmed-transactions × 14
raw-transaction × 12
transaction-fees × 11
segregated-witness × 9
public-key × 9
utxo × 9
bitcoind × 8
private-key × 8
block × 8
doublespend × 8
merkle-tree × 8
security × 7
hash × 7
protocol × 7
mempool × 7