People who code: we want your input. Take the Survey

Questions tagged [validation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
1answer
469 views

Schnorr's batch validation

In the recent BIP about Schnorr's standardization, Pieter Wuille presents an algorithm for batch validation. In my understanding the most heavy operation is the multiplication by a scalar: to make ...
13
votes
1answer
6k views

What is SPV mining, and how did it (inadvertently) cause the fork after BIP66 was activated?

I'm curious to hear an in-depth explanation of the hard fork and how it was caused; I've heard/read a great deal but I'm lacking a cohesive explanation.
11
votes
1answer
436 views

Did the introduction of VerifyScript cause a backwards incompatible change to consensus?

My question is about the changes to bitcoin done by commit range [a75560d8, 6ff5f718], and their effect on consensus. Out of this range of four commits (all attributed to satoshi) during the dates ...
10
votes
1answer
610 views

When Schnorr signatures are part of Bitcoin will it be possible validate each block with only one signature validation?

In a recent talk Pieter Wuille talked about speed up verification when using Schnorr signatures and various algorithms for verifying multiple signatures. Would it really be possible to verify one ...
8
votes
3answers
8k views

How long does block validation take?

Assume a miner receives a new block from a connected peer. Please correct me if I'm wrong: The miner validates the newly received block before using it themself and sending it to their other connected ...
8
votes
2answers
2k views

How to prevent a miner from stealing another miner's block?

Many articles only contain a phrasing like A miner A solves the hash problem and gives the result to the network to check. Once a majority of the network confirms, A gets the reward. But how does ...
6
votes
4answers
8k views

how to evaluate if this (or any) bitcoin public key / private key combination is valid?

Let's say some software gave me the following combination: public key: 13YcHBzsBX8SxHoBftb69cXJkdXLfAVQos private key: KwfNqMip1ZdgG2o6wYQUBXv8BqkMQ8VWWeScVU5TLPZp31M5EHeq And let's say that for ...
6
votes
1answer
182 views

How does copying main stack prevent malformed unlocking scripts vulnerabilities?

https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch06.asciidoc In the original bitcoin client, the unlocking and locking scripts were concatenated and executed in sequence. For security ...
5
votes
2answers
214 views

Would moving a transaction from an old block to a new one allow more pruning?

At Pruning the branches in Merkle Tree Nick ODell writes "A leaf (transaction) can be pruned when all of its outputs have been spent." So I was thinking that if a transaction is one of the last few in ...
5
votes
1answer
229 views

Schnorr batch validation speed statistics

In this question Schnorr vs ECDSA I see in the Peter Wuille's answer the following comment about Schnorr signature batch validation: "Improving verification speed, by supporting batch validation of ...
5
votes
2answers
236 views

How are blocks verified?

I see in the bitcoin wiki there is something called "script" which compiles down to some bytecode to be run by a very very basic virtual machine. Does this mean that each block is actually just a ...
4
votes
1answer
338 views

which transactions does bitcoind validate?

which types of transactions does bitcoind v0.10 perform checksig validation on? blockchain transactions belonging to a wallet with known private key blockchain transactions belonging to watch-only-...
4
votes
2answers
936 views

Sender, nodes or miners? Who validates transactions?

I have been reading a lot about the validation of transactions. I understand the actual method in which a transaction is composed (inputs and outputs). However, I don't know what happens with that ...
4
votes
1answer
389 views

How does Proof of Stake prevents dishonest behaviour compared to PoW?

I know that in Proof of Work (PoW) once a node has found the solution (the nonce) they announce it to the network. Then the rest of the nodes can easily verify the correctness of the block hash and ...
3
votes
2answers
237 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 ...
3
votes
2answers
241 views

What forces transactions to be visible to all miners?

How are transactions provided to the miners? And what keeps the following scenario from occurring? A valid transaction is initially reported to a "rogue" node, A, in the network. If that node is a ...
3
votes
1answer
2k views

How do you validate a bitcoin address using bitcoinjs library in javascript?

How would one validate a bitcoin address using the bitcoinjs library? Or is there another way to do this via javascript?
3
votes
1answer
283 views

Is it theoretically possible to have an inverted nLockTime?

For example, an nLockTime == 500 prevents a transaction from being included in any blocks before the block 500. Why isn't there a parameter like nExpireTime == 500 that prevented a transaction from ...
3
votes
1answer
189 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. ...
3
votes
1answer
175 views

Why every node needs to validate a transaction in Bitcoin

I am just understanding the Bitcoin network, and now understand that every block and every transaction is propagated to every node in the Bitcoin network (not sure yet the difference between full vs. ...
3
votes
1answer
176 views

A couple of questions on Schnorr sig

In the BIP by Pieter Wuille it is told that the key prefixed version of Schnorr signature is needed when the scheme is used in combination with BIP32's unhardened derivation. Could someone provide an ...
3
votes
1answer
283 views

Validate a payment using bitcoind and json rpc

I need to implement a BTC payment system on my web-store. But I'm still not sure about the mechanisms I'm supposed to use for payment confirmation. For example, a user registered on my store and I ...
3
votes
1answer
165 views

Can transaction validation really be free?

If you don't validate a transaction, then you are at risk for relying on it, propagating it, or including it in a block you're mining. For this reason, the default behavior is to validate every ...
2
votes
1answer
75 views

Does Bitcoin Core validate signatures by default?

There have been claims recently of Bitcoin Core not validating the signatures in a block by default. If this is true, can Bitcoin Core even claim to be a full node?
2
votes
1answer
1k views

How to validate bitcoin address

How I can validate a standard bitcoin address?
2
votes
1answer
72 views

block verification cost

When a node receives a block, is it enough to validate root of Merkel tree ? How does block size affect the validation cost? What is the difference between the cost of validation 1mg-size block and ...
2
votes
1answer
342 views

What prevents anyone from spending utxos from a native segwit address?

I read that transactions spending utxos from a native segwit address ( an address starting with bc1) are seen as anyone can spend transactions by legacy nodes. So what prevents someone from taking a ...
2
votes
1answer
643 views

Block #338819 deemed invalid by v0.15.1

I am attempting to sync from scratch a full node (v0.15.1) on a linux machine (Linux Mint running Ubuntu precise 12.04.1 LTS). The sync grinds to a halt on block #338818. From examining debug.log I ...
2
votes
2answers
344 views

What is the duration of a ban?

I read somewhere that a node is banned for 24 hours. However I found the Misbehaving() function which makes state->fShouldBan = true;. But I could not find any other function that makes state->...
2
votes
1answer
763 views

Can a transaction be in two blocks?

What happens with a valid block which contains a transaction which was already included in previous blocks? Is such a block accepted by other nodes in the network or discarded?
2
votes
2answers
2k views

What’s the difference between a validation by nodes and a verification by miners?

In Mastering Bitcoin, it says: The transaction is then broadcasted on the bitcoin network, where each network node (participant) validates and propagates the transaction until it reaches (...
2
votes
1answer
352 views

What if the miners allowed invalid transactions, and other nodes did validation?

Here Peter Todd writes: [A]s an optimization Bitcoin goes a step further and disallows invalid transactions to be published in the blockchain at all, but that's the thing: that's just an ...
2
votes
1answer
61 views

Would a normalized, hashed, protected chainstate reduce miner storage costs?

Spending freshly generated coins is prohibited by the protocol until there are at least 100 blocks on top of the block from which they came. This is because the chances of a 100-block reorg is ...
2
votes
0answers
145 views

How to Validate Signature with SigScript length 8b?

I created a raw Transaction: ...
1
vote
3answers
94 views

Does each block contain all the Bitcoin transactions for that time period?

When a miner validates a block, does the block contain all transactions in Bitcoin for that time period? So does a miner validate an individual transaction between two parties, or are they validating ...
1
vote
1answer
110 views

How is a bitcoin transaction validated?

w.r.t. a bitcoin transaction, I am really struggling to understand how does bitcoin network validate that I 1) have the bitcoin that I want to send, and 2) haven’t already sent it to someone else. If ...
1
vote
1answer
62 views

What kind of bug does bitcoin core possess that have to be replicated

In order to build a bitcoin client accepted by the current bitcoin nodes we to have to emulate the C++ code present in the bitcoin core client, with all its attributes even the bugs. For example the ...
1
vote
1answer
114 views

Besides transaction validation, are there any other uses of the Script language in Bitcoin

Script's stack operations are used to validate signatures and scripts of transaction inputs and outputs. Is Script also used to validate block, network, or any other data? Seem like there are a lot ...
1
vote
1answer
223 views

How long does it take to validate a full block?

I'm interested to know how long does it take to validate a Bitcoin block on average home pc. I'm less interested in a precise number. I'm fully aware that it can be different between different ...
1
vote
1answer
52 views

What is the correct use of the term “validating”?

First, in the Bitcoin context what does validating mean? Second, is it incorrect to say something like " the average time it takes to validate a block by the network is 10 minutes." The way, I ...
1
vote
2answers
739 views

How can i create an Anyone can spend output?

How can i create an Anyone can spend transaction using p2pkh outputs? Also how would such a transaction in hex look like?
1
vote
2answers
458 views

What would a full node do if it finds an error?

Full Nodes are supposed to validate every transaction and block in the blockchain, and provide valuable links for distributing blocks. And because the consensus algorithm is extremely good, there are ...
1
vote
1answer
156 views

Possibility of contructing a valid transaction without knowning private key

From here you get that in step 2 of ECDSA sign process, you use z, the Ln leftmost bits of e = HASH(message/transaction) in both the process of generating and verifing the signature. I understand ...
1
vote
1answer
39 views

Which sender is banned in case of nvalid transactions or blocks?

When a node receives an invalid transaction or block, as far as I know, it bans the sender for 24 hours. However, I didn't exactly get which sender is banned. Is it the neighbor node that provides the ...
1
vote
1answer
48 views

What valid transactions are not broadcastable?

Many valid transactions are not broadcastable by default in bitcoin core to avoid attacks that could harm the network. These would rarely be found in a node's mempool but could, however, be found in ...
1
vote
1answer
180 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 ...
1
vote
1answer
136 views

When exactly do the transactions get validated?

I have some gaps in my understanding to the life cycle of the transaction that I want someone to help me fill them specially with the validation. What I understand about the life cycle with my ...
1
vote
1answer
222 views

How does a node decide whether a block is valid?

I'm a software developer, and I've been trying to figure out how a node decides whether a block is valid, I do understand the hashes in bitcoin, the merkle root, and all those aspects but my question ...
1
vote
1answer
38 views

What would happen if I publish a modified version of an earlier block? Would it be rejected immediately by peer nodes?

I am reading the book "Mastering Bitcoin" and have finished reading Chapter 2 and 10, but I still don't find the answer. Suppose the current main chain has 5 blocks: B0 <- B1 <- B2 <- B3 &...
1
vote
2answers
123 views

How nodes verify if the hash on a P2SH output is from a valid script?

I understand how the validation works if someone wants to spend coins from a multisig address. But what if the receiver makes a mistake and provides an invalid script hash to the sender? Is there ...