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) ...
user avatar
21 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 ...
user avatar
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), ...
user avatar
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 ...
user avatar
9 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....
user avatar
  • 3,185
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 ...
user avatar
  • 992
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 ...
user avatar
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 ...
user avatar
  • 15k
7 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 ...
user avatar
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 ...
user avatar
  • 1,992
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,...
user avatar
  • 2,204
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 ...
user avatar
  • 15k
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 ...
user avatar
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. ...
user avatar
  • 28.7k
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 ...
user avatar
  • 17.3k
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(...
user avatar
  • 6,612
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 ...
user avatar
  • 16.5k
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 ...
user avatar
  • 61.4k
5 votes
Accepted

Transaction's maximum size

There is a maximum standard transaction size since Bitcoin 0.8.2 of 100k per transaction. There are a number of other limits that influence the validation and propagation of a transaction though. ...
user avatar
  • 886
5 votes

What is the chance of transactions being processed in different order that they are broadcast

The clients receiving B->C first will keep it in the memory (transaction pool) and denote is as an orphaned transaction, until they find A->B. So unless network propagation is terribly slow: no, it ...
user avatar
  • 1,570
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 ...
user avatar
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 ...
user avatar
  • 61.4k
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.
user avatar
  • 6,612
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 ...
user avatar
  • 17.3k
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,...
user avatar
  • 61.4k
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 ...
user avatar
  • 4,676
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 ...
user avatar
4 votes
Accepted

What is an "insecure transaction type", as mentioned by Bitcoin Wallet for Android?

TL;DR: It seems that Bitcoin Wallet for Android incorrectly labels nLockTime transactions as OptInRBF due to a bug in bitcoinj. The issue has been reported. You don't need to do anything. Apparently,...
user avatar
  • 63.5k
4 votes

Does every full node verify every transaction TWO separate times?

It is an accurate abstraction. However, the most computationally expensive part of transaction verification is ECDSA signature verification. And the results of verification are cached and reused when ...
user avatar
4 votes
Accepted

Confirm own incoming transactions

This might only be an issue with the terminology, but when a transaction is "mined", it is included in a block. You could do that of course, if you were contributing blocks to the Bitcoin network, but ...
user avatar
  • 63.5k

Only top scored, non community-wiki answers of a minimum length are eligible