quote:
Op zaterdag 28 februari 2015 16:28 schreef RemcoDelft het volgende:[..]
Hoe wordt die 51% bepaald? Want je hebt niet met alle deelnemers tegelijk contact. Dat zou dus betekenen dat je van de 51/100 confirmaties krijgt! Dat klinkt nou niet bepaald overtuigend...
Zodra een block gevonden is wordt dit gebroadcast via de nodes en bereikt dit iedere client die met 1 of meerdere nodes van het netwerk verbonden is.
Omdat iedereen op dezelfde blockchain aan het minen is, heb je automatisch al een 100% meerderheid.
Zou het internet wegvallen dan zal een gedeeltje hebben waar bijvoorbeeld 51% of meer van de miners aan het minen is en een gedeelte waar 49% of minder van de miners aan het minen is.
Je zal dus automatisch 1 blockchain krijgen waar de blokken sneller gevonden worden en het laatste blocknummer hoger is op het moment dat de verbinding hersteld wordt.
Dit wordt automatisch de hoofdchain.
Overigens is zo'n block met nieuwe coins ook pas weer volwassen ("mature") zodra er 120 nieuwe blokken gevonden zijn. De transacties zijn al sneller gevalideerd, na 6 blokken of minder als je daar genoegen mee wil nemen.
De confirmaties gebeuren ook op de blockchain (door het minen, ofwel vinden van nieuwe blokken) en transacties die niet op de hoofdchain staan worden dan ook automatisch verworpen zodra je weer met de hoofdchain verbonden zou worden.
Het heeft verder weinig met het broadcasten te maken waar jij op lijkt te doelen: als er een block wordt gevonden wordt dit via de nodes gebroadcast en iedereen in het Bitcoinnetwerk is altijd met 1 of meerdere nodes verbonden en zal dus hiervan op de hoogte worden gesteld waarbij ook gelijk het nieuwe block wordt binnengehaald.
Technisch verhaal erachter: hieronder staat uitgelegd wat er in zo'n block staat en op welke manier de transacties in een block gevalideerd worden, hashes, nonces, merkleroots, coinbase en meer techno-babble waar je hoofdpijn van kan krijgen.
https://en.bitcoin.it/wiki/Block_hashing_algorithmNog een mooie uitleg over de nonces:
quote:
Basically, there is no such thing as a "correct" nonce, only a set of possible "correct" blocks which can use any nonce they wish to obtain an acceptable hash. So the nonce is just "some arbitrary number". But in order to understand how nonces work, you first have to understand the hashing process by which blocks are produced.
Cryptographic hashes are a mathematical way of turning any set of data into a random number, called a hash. The hashing process is designed so that it's easy to calculate the hash of some data but nearly impossible to find data which will fit a specific hash, having even a slightly different set of data will produce a totally different hash, and so that the only way to find a hash with a particular property (say, being below a certain number) is to calculate lots of them until you get lucky.
In the Bitcoin network, only blocks with certain hashes get accepted and included in the official list. The criteria for which blocks "count" is that their hash has to be below a certain number called the difficulty. The network adjusts this number up and down according to how frequently blocks are passing the test--this is how it's able to keep the rate of block production at an average of 10 minutes per block. So if the difficulty is
00000692856290566183958127638592383846392938562929689273923968
then a block with a hash of
00000739485762992939239823472938472569106923385616929838472389
won't be accepted, but blocks with hashes of
00000683060299472046094517810601040976920106812102601296720934
00000000000000000000000000000000000000000000000000000000453737
or
00000692856290566183958127638592383846392938562929689273923967
will all pass with flying colours. These aren't real hashes--they're just examples.
A miner is taking a list of checked and valid transactions, putting them together in the right format, and then calculating their cryptographic hash. But let's say that the hash they get doesn't meet the criteria (as most of them don't). What are they supposed to do? The only way to get a different hash is to use at least slightly different data. So instead of messing up their list of valid transactions or anything like that, blocks have something called a nonce in them. The nonce is just a meaningless number that can be changed as many times as you like so that you can check a bunch of different hashes and see whether they pass the network's difficulty check. So when a miner is checking billions of hashes per second (as many of them are) they are just changing the nonce to something else, checking the hash of the whole block; changing the nonce to something else, checking the hash of the (now slightly different) block; changing the nonce again, etc.
In this sense a "correct" nonce is simply the one that allows the block to hash to an acceptable number. Just like there are many acceptable hashes, there are many different nonces which will work for the same block. But a miner only has to find one of them. Whichever one they find first is just fine.
[ Bericht 4% gewijzigd door TheFreshPrince op 28-02-2015 17:16:15 ]