8

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 stack stack. If execution aborts, fail. Execute the scriptPubKey with stack as input, and call the resulting stack result. If execution aborts, fail. If result ...


7

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 that public key. Your link is to a block, which is not signed itself. However, let's look at a transaction from your block: https://www.blockchain.com/btc/tx/...


6

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 combinerawtransaction to take two separate transactions and create a new one which has the inputs and outputs of both transactions. (or perhaps take two ...


4

Segregated witness therefore takes advantage of this opportunity to raise the block size limit to nearly 4 MB, and adds a new cost limit to ensure blocks remain balanced in their resource use (this effectively results in an effective limit closer to 1.6 to 2 MB). https://bitcoincore.org/en/2016/01/26/segwit-benefits/#block-capacitysize-increase The maximum ...


4

The UTXO set cache is not a fixed size and the limit isn't a hard limit. New entries can be added to the cache without regards for the maximum cache size. In fact, the cache object itself doesn't even know what the limit is. Rather what happens is that the cache is flushed periodically. Because the UTXO set only changes during block validation (mempool UTXO ...


4

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 Transaction Output set. Transactions destroy coins and create new coins. A new transaction attempting to spend a coin that has been destroyed is simply invalid. Your ...


4

A bitcoin transaction will create outputs, which can later be used as input to a new transaction. Each output will be locked to what is called a scriptpubkey, which basically sets up the cryptographic puzzle that must be satisfied (ie, return true when run) in order for those coins to be spent. Any transaction spending those coins will need to provide a ...


4

I understand that bitcoin wallet is nothing but transaction record performed on block chain. A bitcoin wallet stores keypairs, and allows the use to interact with the network by sending/receiving bitcoin transactions. How are transaction details updated in decentralised block chain? A 'full node' can be run by a user that wants to independently verify the ...


3

The tweet seems very confused. Most likely, they meant "60% of the hashrate" rather than supply. It's not clear from the tweet what they mean with "verify a fake transaction". Charitably, one might interpret that they could execute a Finney attack, or execute a doublespend attack by reorganizing the chaintip in a form of majority attack. ...


3

First of all a meta note: lots of information on https://bitcoin.it is seriously outdated, including this. I don't really understand which of these two interpretations is meant here: The output referenced by the input must not be referenced by another input of a transaction already in the pool. The output referenced by the input must not be present in a ...


3

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? Before the activation of segwit, the block was limited to 1,000,000 bytes. This limit got replaced by a blockweight limit of 4,000,000 weight units (WU) with the activation of segwit. A byte of ...


2

OP_CHECKSIG needs to have the whole transaction to hash and to verify the tx. Btcdeb has the feature of allowing the tx as an argument however the website you linked doesn't hence this opcode is doomed to fail every time on this website. It is reasonable to expect supplying the signature to verify the script/tx because otherwise to steal his coins, I would ...


2

Bitcoin Core, in its BIP37 implementation, will compute the Merkle proofs on the fly. It does not store the blocks' Merkle trees anywhere (only its root is stored).


2

Yes, these kinds of attack do effect Bitcoin and are known and described. Bitcoin does not have any consensus level mitigations for them because doing so requires consensus changes which are difficult to do. It is known that Bitcoin's merkle tree design has multiple vulnerabilities. The particular attack described on wikipedia is that an internal level can ...


2

Inner working of conditionals in Bitcoin Script The conditionals in Bitcoin Script are conceptually implemented using a stack of booleans, each boolean indicating whether to execute the current opcode when iterating through the Script for each depth of the conditional (nested IF / ELSE). To grasp the functioning, let's first consider a single-boolean ...


2

If the output value was only constrained by their sum being smaller than that of the inputs, you could e.g. set one output to a negative value and create new money in a second output. You can also do more creative stuff: I think the rule might have been introduced as a response to the value overflow incident on 2010-08-15. A transaction in a (now invalid) ...


2

I understand that bitcoin wallet is nothing but transaction record performed on block chain. Bitcoin wallet is mainly used for secure key management. But wallets also show transaction history associated with the addresses which are derived from keys or added as watch-only in the wallet. How are transaction details updated in decentralised block chain? I ...


1

You can't cancel a transaction. You can broadcast another transaction with a higher transaction fee (replace-by-fee) sending back to an address you own and hope that gets confirmed before the original transaction (miner is incentivized to mine this replacement transaction rather than the original one). Or alternatively you can ask the recipient to send the ...


1

This appears to be a bug in BitcoinIDE. The issue is that it is computing the hash differently from what it actually is. Because it finds a different hash, the comparison that checks that the hashes match (the OP_EQUALVERIFY) fails. However the hash does match. If you compute the hash manually, you get a different hash than what BitcoinIDE is showing. Using ...


1

While a miner is building a block template, they are maintaining a "virtual" UTXO set to keep track of the consumed UTXOs and the newly created UTXOs. A transaction can only be included in a block once all of its inputs are available for spending, so this approach is also sufficient to achieve the required topological order of transactions.


1

why is there a need to track transactions? Why cant we just track the balance in every account? Well, for a start, the Bitcoin protocol has no concept of accounts or balances. To change Bitcoin to work on the basis of balances would throw up some interesting problems how does a node calculate the balance in the first place? how do we relate transactions to ...


1

No, this is not a palpable concern. Multisig is generally implemented by means of Pay to Script Hash (P2SH) addresses. Hereby, the receiver defines a script that they'll use to spend the funds, and forms an address from a hash of the script. Later, when spending, the original script is revealed and must be fulfilled. In the case of a 2-of-3 multisig, this ...


1

I think if you add two more steps at the start then it makes more sense. Transaction creation. (when User A sends coin to user B) Transaction verification. The transaction is transmitted to the neighbouring nodes and those nodes verify the transaction. If the transaction is valid those nodes transmit it further to their neighbouring nodes in the network. ...


1

You can initiate a transaction with the wrong key, but it will actually get stopped before the transaction gets to the miners. All Bitcoin transactions are reviewed by the Nodes, to make sure they are sending valid amounts of Bitcoin and were signed by the correct private key. If there is anything wrong with the transaction (wrong signature, not enough BTC), ...


1

Well, you can initiate the transaction with same input referenced, but the node in the network will not add your transaction in their mempool, since they already have an transaction with same input. What you can do- Wait till the first transaction gets discarded from mempool(it may take long time, tho) and then re-initiate a transaction with significant ...


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