Bitcoin Forum
April 24, 2024, 02:58:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to judge illegal transactions?  (Read 1085 times)
stdo (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 26, 2017, 02:15:08 PM
 #1

I wonder how the bitcoin protocol judge illegal transactions. As they say, the miner will look throughout the public ledger to make sure the transaction is alright. There are thousands of transactions in each block, if the miner has to check throughout the public ledger for each transaction, this would be very inefficient.
1713970735
Hero Member
*
Offline Offline

Posts: 1713970735

View Profile Personal Message (Offline)

Ignore
1713970735
Reply with quote  #2

1713970735
Report to moderator
1713970735
Hero Member
*
Offline Offline

Posts: 1713970735

View Profile Personal Message (Offline)

Ignore
1713970735
Reply with quote  #2

1713970735
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
August 26, 2017, 04:29:06 PM
Merited by ABCbits (1)
 #2

You really just need to look for transactions that you would include in blocks, the highest fee ones. Miners already look through all the transactions, that is how they know which are the highest fee onces. They even check if their parent transaction is not confirmed and if they both average out at a high enough fee and so on for their parent's parent transaction, hence the Child-pay-for-parent method of getting your transactions confirmed.

There would also be no real way of forcing miners to check for legality of transactions, since miners can be anonymous, just like other Bitcoin users.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
August 26, 2017, 04:32:24 PM
Merited by ABCbits (2)
 #3

Every single full node (not just miners) fully verifies every single transaction it receives. It does the same for every block. Since blocks and transactions can be mostly validated in parallel, it really isn't all that slow. Furthermore, the entire blockchain is not rechecked for every block, nor does it need to be rescanned for every block. Node software has more efficient ways of checking up transaction by storing various data separately, e.g. maintaining a separate database for the UTXO set which is used for checking transaction validity. Furthermore transactions in new blocks don't need to be revalidated if you have already seen them in your mempool. So that saves validation time as well.

zertsekel
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
August 26, 2017, 04:40:05 PM
 #4

I wonder if Bitcoin Core, when first installed, rechecks **all** the transactions from the genesis block...
Does anyone know?
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
August 26, 2017, 04:46:54 PM
Merited by ABCbits (1)
 #5

I wonder if Bitcoin Core, when first installed, rechecks **all** the transactions from the genesis block...
Does anyone know?

Yes. It does it while it is downloading them.
zertsekel
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
August 26, 2017, 04:55:53 PM
 #6

I wonder if Bitcoin Core, when first installed, rechecks **all** the transactions from the genesis block...
Does anyone know?

Yes. It does it while it is downloading them.

What if I download the Bitcoin Blockchain via torrent?
Do all the pre-existing transactions get checked as well?
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
August 26, 2017, 05:04:12 PM
 #7

I think only the last couple of them. Maybe if you don't download the chainstate files then it will have to in order to generate them. otherwise with downloading a whole data directory, I think only a couple of last ones.

There isn't really a benefit of downloading from a torrent, just a risk. Bitcoin is already peer to peer so downloading a blockchain is already like a torrent, it is just slower because it checks them. Maybe there is even an option for Bitcoin Core not to check them while downloading so you get the same effect, but maybe still safer, since you get it from the network and not just some guy.
zertsekel
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
August 26, 2017, 05:16:25 PM
 #8

I think there is a bitcoin daemon configuration flag that enables to "trust" pre-existing blocks... Not sure though...
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
August 26, 2017, 05:24:14 PM
Merited by ABCbits (1)
 #9

What if I download the Bitcoin Blockchain via torrent?
Do all the pre-existing transactions get checked as well?
Yes. It will check all transactions and blocks it knows of. If a transaction is in a block that has a specific descendant block (the assumevalid block), then signatures are not checked. Everything else is still checked. Note that using the bootstrap.dat torrent will be slower than syncing from p2p.

HeroC
Legendary
*
Offline Offline

Activity: 858
Merit: 1000



View Profile
August 26, 2017, 05:26:50 PM
 #10

I think there is a bitcoin daemon configuration flag that enables to "trust" pre-existing blocks... Not sure though...

Not sure why you'd need to use it, syncing is much faster now and verifying transactions doesn't take that much CPU power.
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1016



View Profile
August 28, 2017, 11:04:46 PM
 #11

I wonder how the bitcoin protocol judge illegal transactions. As they say, the miner will look throughout the public ledger to make sure the transaction is alright. There are thousands of transactions in each block, if the miner has to check throughout the public ledger for each transaction, this would be very inefficient.

Every full node does this.  That's why syncing takes forever.  Yes, it's inefficient.  But it's also the only way we know how to have such a system operate.

AGD
Legendary
*
Offline Offline

Activity: 2069
Merit: 1164


Keeper of the Private Key


View Profile
September 08, 2017, 11:13:21 AM
 #12

I wonder how the bitcoin protocol judge illegal transactions. As they say, the miner will look throughout the public ledger to make sure the transaction is alright. There are thousands of transactions in each block, if the miner has to check throughout the public ledger for each transaction, this would be very inefficient.

There are valid inputs and valid (because authorized by a signature of a private key) outputs. There is no need to check the whole public ledger (blockchain). If an address had no valid (like illegal) input, there will be a balance of 0. If the address had a valid input, which already was confirmed by the network, it can be spent by signing with the private key.

Bitcoin is not a bubble, it's the pin!
+++ GPG Public key FFBD756C24B54962E6A772EA1C680D74DB714D40 +++ http://pgp.mit.edu/pks/lookup?op=get&search=0x1C680D74DB714D40
jal007
Full Member
***
Offline Offline

Activity: 138
Merit: 100


View Profile
September 08, 2017, 04:29:28 PM
 #13

you should learn about blockchain and how transactions are saved there
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
September 08, 2017, 07:40:15 PM
 #14

I wonder how the bitcoin protocol judge illegal transactions. As they say, the miner will look throughout the public ledger to make sure the transaction is alright. There are thousands of transactions in each block, if the miner has to check throughout the public ledger for each transaction, this would be very inefficient.

What would you rather have, inefficiency or inaccuracy for a monetary system?

Buy & Hold
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!