Questions tagged [transaction-verification]

The process in which every Bitcoin node checks every part of every Bitcoin transaction worldwide for conformance to standard rules and uses the complete history of all previous Bitcoin transactions to check that money being spent in a transaction has not previously been spent in any earlier transaction since the beginning of Bitcoin.

Filter by
Sorted by
Tagged with
1 vote
1 answer
68 views

What exactly does the "For each input, if the referenced output exists in any other tx in the pool, reject this transaction." tx validation rule mean?

I am currently following the "tx" messages section of en.bitcoin.it/wiki website, and I need some clarity about the following rule regarding the validity of a transaction: For each input, ...
starikcetin's user avatar
3 votes
2 answers
1k views

How are transactions verified with only the Bitcoin address, not the public key?

I understand how asymmetric cryptosystems and digital signatures work: You generate a (private key, public key) pair. You never share the private key, you make the public key ... well, public. You ...
Martin Thoma's user avatar
1 vote
1 answer
93 views

How does a miner verify a transaction which is spending an output of another transaction in the same block?

It is mentioned in this post that: If all validation of all transactions in a block succeeds, the consumed inputs are removed from the database, and all outputs of those transactions added as fresh ...
MHT's user avatar
  • 13
2 votes
0 answers
155 views

How do i debug a bitcoin transaction

My main problem is understanding how to convert the response from bitcoin-cli "decoderawtransaction" to the script format i am supposed to put in the debugginng tool. i.e my problem is ...
akinmail's user avatar
  • 121
0 votes
1 answer
168 views

Verifying a P2WSH by hand

To test my understanding of the signing and verifying process i tried to verify some random Bitcoin transactions by hand. Sadly i got stuck with a P2WSH transaction, i choose the following transaction ...
ASP's user avatar
  • 3
0 votes
1 answer
215 views

Can't Make Sense of Why OP_CHECKSIG Fails Here

I'm try to get to grips with verifying the signature of a P2PKH transaction. I have an example transaction: 9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1 I am trying to verify the ...
Martin's user avatar
  • 329
10 votes
1 answer
673 views

Full list of "special cases" during Bitcoin Script execution (p2sh, p2wsh, etc.)?

When executing a Bitcoin Script, there are some "special cases" where the interpreter performs extra verification beyond just executing scriptSig and then scriptPubKey. For example, if the ...
Elliott's user avatar
  • 227
6 votes
1 answer
346 views

When the UTXO in the cache is full, what strategy is used to replace one UTXO with another in the cache?

The UTXO set is stored on the disk, but some UTXOs are also stored in the cache. When validating a transaction, you need to query the UTXO pointed to by the input of the transaction. First, you go to ...
GoneV's user avatar
  • 175
0 votes
1 answer
159 views

why is transaction history from genesis to date necessary to store on the blockchain to prevent double spending?

I am beginning to understand the mechanism of bitcoin blockchain, and I was wondering something. The transactions history represents the 'state' of the bitcoin at any point (or EVM according to the ...
asami's user avatar
  • 3
0 votes
1 answer
170 views

How can be proven that a signature is valid with it's public key

If someone wants to make a transaction, they need to sign the transaction data with their private key. For example Sign(transactionData, privateKey) creates the signature. What is exactly this Sign ...
Stijn de Vries's user avatar
0 votes
1 answer
97 views

Will the Bitcoin network discredit a transaction if you do a simple transfer on a multi-sig after you found the collision on that address?

Let's say you found a collision for an address on the Bitcoin network. You have its private key. Will you be able to transfer any money around or will the network prevent it or does it get verified? ...
Mojtahedi's user avatar
1 vote
1 answer
597 views

how does bitcoin solve the same chain replay attack?

Let's say I send 10BTC to Bob. I have 30 BTC. So after transferring, I should have 20. Now, after I transfered 10, transaction can be copied and broadcasted to the network again by Bob(he might have ...
Nika Kurashvili's user avatar
3 votes
1 answer
584 views

Do full nodes store the complete merkle tree or do they regenerate it when creating a merkle proof?

I understand what the merkle root is for. And I understand that blocks don't store the merkle tree. Question 1) Is there any place that the complete merkle trees get stored? I don't mean the merkle ...
Nika Kurashvili's user avatar
1 vote
1 answer
205 views

Is this Merkle hash root problem existent in Bitcoin?

In the Wikipedia article about Merkle trees, I was just reading this, unable to understand where the problem lies: Second preimage attack The Merkle hash root does not indicate the tree depth, ...
Marcus's user avatar
  • 115
3 votes
2 answers
2k views

What's the blocksize limit after segwit and how do legacy nodes deal with segwit transactions?

Normally, I heard that the bitcoin blocksize is 1MB, but with the Segwit update the blocksize can be up to 4MB, so we should say that the blocksize is 4MB, right? Moreover legacy nodes only receive ...
Anh Dũng Lê's user avatar
1 vote
2 answers
70 views

Time allowed to a node to react to verify a transaction and number of verifications?

Do the person acting as full nodes have to be active and online around for a particular decided time, like a job where you have to be around your machine because a transaction for verification can pop ...
priyanshu bindal's user avatar
1 vote
1 answer
212 views

How do SPV clients acquire transactions from other nodes and verify that they are part of the blockchain?

I explored SPV clients as a subject from a lot of different resources, but there are a few of things that are keeping me confused: I found out that SPV clients have no mempool even though SPV clients ...
ddavi031's user avatar
  • 459
1 vote
1 answer
708 views

How to verify if a transaction is signed correctly?

Given an arbitrary signed raw transaction, how can we easily verify if all inputs are correctly signed (assuming all inputs are existent/unspent and the fee is higher than zero)? Bitcoin core's RPC ...
Pedro's user avatar
  • 743
2 votes
3 answers
240 views

Basic question about transaction verification

I am fairly new to crypto and had some questions about how transactions are verified by the nodes Would it be correct to say that the full nodes check to see if the sender(Alice’s) signature is valid. ...
vf990's user avatar
  • 21
3 votes
2 answers
131 views

Can an unsynchronized node create a valid transaction?

I'm trying to understand how bitcoin transactions work. From what I understand, in the Bitcoin network nodes hold different versions of the Blockchain and after some time the different chains start ...
Light's user avatar
  • 131
1 vote
1 answer
151 views

What can I do with "unspent" transactions? Can I transmit them to a chain?

I withdrew some bitcoin from a service's account I maintain. The transaction shows up in my wallet, but it has been marked as "unspent" ever since. What does this mean?
Alma's user avatar
  • 11
0 votes
2 answers
162 views

Why is 'script' used in a transaction instead of the output address?

I see transactions contain script for each output, but this "script" seems to be deterministically derived from the address associated with the output. Why does the bitcoin protocol opt for the use ...
Albert Renshaw's user avatar
0 votes
0 answers
64 views

Unspent bitcoin transaction [duplicate]

So about two weeks ago i sent bitcoin to a friend, and it was confirmed but in the summary it was listed unspent, he claimed not to have received. I was really confused since then, now this morning i ...
Omodudu's user avatar
8 votes
1 answer
1k views

Why is there no such thing as a redirected, forged, or fake transaction?

In the past, we had numerous questions about "fake" or "forged" transactions. Such transactions could supposedly be created even without holding any bitcoins, yet would end up in the mempool or even ...
Murch's user avatar
  • 72.6k
2 votes
4 answers
318 views

If two parties submit a conflicting transaction between each other, how does the network decide which one is correct?

Let's say parties A and B both submit a transaction to the blockchain with a different version of what happened. Party A submits a transaction saying Party B gave him 3 BTC and Party B submits a ...
bitsearch's user avatar
15 votes
1 answer
826 views

How many bitcoin transactions can be verified per second on commodity hardware in 2020?

I am trying to figure out how many Bitcoin transactions could be verified per second. Am I correct that signature verification is more expensive than computing Merkletrees and hashes and therefore ...
Rene Pickhardt's user avatar
1 vote
1 answer
71 views

Is there any open source tool to verify segwit transaction without publishing it?

I have created below transaction: ...
Vizeet Srivastava's user avatar
0 votes
1 answer
213 views

Given a Bitcoin transaction as JSON data, how can I determine the number of confirmations?

According to blockchain.info, 4,198 confirmations have been received on the following Bitcoin transaction at the time of this writing. Give then following Bitcoin transaction as JSON (ref: transaction ...
MikeyE's user avatar
  • 101
0 votes
1 answer
372 views

Is it possible to skip verification of blockchain data when using bitcoin core?

Because I need bitcoin core client only for JSON-RPC requests. Will I need pruned initialization or normal initialization of bitcoin core client for successfully running such requests? (I guess client ...
wowfactory's user avatar
1 vote
2 answers
199 views

How do people using thin clients know the correct merkle path of transactions they've sent without knowing the full block?

User A send a transaction to user B. Those transactions are bundled together into a merkle tree. User A and B can both use the transaction plus the merkle root, plus the merkle path to prove the ...
Matthew Czarnek's user avatar
2 votes
0 answers
56 views

Transaction validation cost

what relation is between transaction size or a number of input and validation cost? for example, It's o(n) or o(n^2)?
Maha's user avatar
  • 41
0 votes
0 answers
134 views

Bitcoins stuck in memory pool [duplicate]

I sent my 0.1 bitcoin on the 8th of January from an offline wallet (Bitcoin Core), to an online wallet. Still haven't got the btc in my new wallet. The status on the offline wallet says: "unconfirmed, ...
Jaym's user avatar
  • 1
1 vote
2 answers
799 views

How do nodes validate that a UTXO in a new transaction is unspent?

Does it check every block in between where the UTXO first appeared and the current time to make sure it didn't get spent then? Or is there some other caching or other method to make the check faster?
Andrew's user avatar
  • 113
0 votes
1 answer
96 views

How can a receiver verify that transaction data was not altered by 3rd party?

My scenario: My web server: Generates private and public, and a wallet address from the public key for a user website account Server can not connect to the outside (Can not connect to the Bitcoin ...
Skills's user avatar
  • 1
4 votes
1 answer
90 views

At what block height may locktimed transactions get included?

Transactions with outputs whose sequence is smaller than UINT_MAX are interpreted as locked until the timestamp or block height specified in nLockTime is reached. Specifically regarding the block ...
Murch's user avatar
  • 72.6k
1 vote
3 answers
3k views

Get transaction data from full node

Background Information I am building an application that requires the ability to query any bitcoin full node (from a python script using raw tcp sockets) in order to read the OP_Return value listed ...
Dimitree's user avatar
2 votes
1 answer
174 views

Can attackers change transactions during a 51% attack?

If in a 51% attack transactions can be reversed, isn't it possible that the chain with more hash rate also changes transactions (for example if x sent 5 btc to y, they would change it to x sent 500 ...
Abhishek Mishra's user avatar
0 votes
1 answer
578 views

How to verify locking and unlocking scripts?

I've selected an arbitrary transaction id and retrieved its associated transaction details using the blockcypher explorer as follows: from blockcypher import get_transaction_details ...
Mike's user avatar
  • 103
0 votes
2 answers
356 views

Verify Bitcoin Transaction

Following the great post [Redeeming a raw transaction step by step example required, I came up with code below but the verification failed. // pubkeyBytes, len: 65 // ...
YongJiang Zhang's user avatar
0 votes
2 answers
121 views

Sent BTC from Coinbase, blockchain explorer says Confirmed. Is recipient lying or could something else be the issue? [duplicate]

Sent BTC (approx $500) from Coinbase, Blockchain explorer says Confirmed. Is recipient lying they have not received or could something else be the issue such as his wallet? Recipient says it could be ...
NewAtBTC's user avatar
0 votes
1 answer
59 views

What stopping miner from altering value in transaction to increase transaction fee?

I'm learning bitcoin through this book "Mastering Bitcoin, 2nd Edition by Andreas M. Antonopoulos". I'm at Chapter 6 "Transactions". Here is my doubt: Example there is node A, received transaction ...
Charan2628's user avatar
0 votes
1 answer
156 views

Not able to Spend 2-2 MultiSig UTXO

I created 2-2 Multisig Account 2NECouPA4UVNMzX1K7kekc4W3VudDhMdFkM from msrFNhKwLu9GrT3hFoizz21xEwJ61xMsym and n1NPFEJHBA8j63B5dgJ3aQcufA8VmrN27U, I tried spending UTXO from this account but got an ...
Yash Madhwal's user avatar
3 votes
1 answer
349 views

How to tell if a transaction is valid?

So I have been reading up on bitcoin and blockchain for awhile now, but I have yet to fully understand it. I understand that bitcoin leverage on DLT, which uses cryptography to verify transaction. ...
Jason Tay's user avatar
1 vote
1 answer
273 views

Clarification on the script P2SH, how is executed to Bitcoin core?

This question is a continuation of the my post yesterday. Today I have a question on P2SH execution so, an example of the script should be this OP_0 <A Signature> <B Signature> OP_2 <...
vincenzopalazzo's user avatar
0 votes
1 answer
316 views

Bitcoin check if the transaction is valid

When a node receives a new transaction, that node will check if the one broadcasting the transaction has enough coins to initiate it. Bitcoin follows a UTXO model, therefore the node has to check in ...
Fadi's user avatar
  • 3
0 votes
1 answer
686 views

How does this simple script use the OP_CHECKSIG opcode?

I have this Script P2PKH <A Signature> <A Public Key> OP_DUP OP_HASH160 <A Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG The bitcoin.org documentation say this The entire ...
vincenzopalazzo's user avatar
0 votes
1 answer
257 views

Bitcoin Signature Verification

I am trying to implement the OP_CHECKSIG opcode of Bitcoin and verify whether a signature is valid or not. I have the signature that I recieve from the transaction data and the public key(the hex ...
Shubham Saxena's user avatar
2 votes
1 answer
1k views

Verifying a bitcoin Signature and what is the transaction data that is signed?

Given a bitcoin transaction where it is able to redeem it's UTXO's, how can I verify in Java if the signature is actually a valid signature or not. I was trying to use the Bouncy Castle library where ...
Shubham Saxena's user avatar
4 votes
1 answer
3k views

How does OP_CHECKSIG work

Hi I am learning bitcoin and learning how scripting works and how to use P2PKH. I was wondering how does OP_CHECKSIG work. I want to understand what is the data that the private key signs to create ...
Shubham Saxena's user avatar
2 votes
1 answer
152 views

How to prevent double spending Bitcoins?

If I create a transaction, my node will check my UTXO's and if i have enough BTC to do this transaction it will be mined. So let's say I want to spend 12 BTC to Anna. The System will check if i ...
Beanssss's user avatar