Victor Hugo
-
Sinalizar
como inapropriado
-
Mostrar
Show review history
It is called "stale", instead of "orphan" in other places. Because "orphan" has no parents, and the only block meeting this definition, is the Genesis Block, where its previous block hash is set to zero. I think you should try mining something with signet-like difficulty on CPU, to see that in practice. In general, when hashes are grinded, then from time to time, you can get a close match. And then, you have two pieces of Proof of Work, which are equally valid. The first-seen block header is the one, which miners will work on, but both are valid, until someone will share a new block, which would be created on top of it. See: Here, some miner successfully grinded "Hello, world!" data, with "nonce", equal to "4250". At the same time, a different miner could find a different text, with a different nonce, but also with 16 leading zero bits. And then, you have two valid blocks: one contains "Hello, world!" with nonce "4250", and another one contains "Foo, bar!" with nonce "9764". Which one is valid? Both of them are, and then, the next miner produces the next valid block, and then, everyone switches to the stronger chain, with more Proof of Work. Some Bash scripts for testing things: Code:nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Hello, world!""$nonce" | sha256sum >> hello.txt ((nonce=nonce+1)) done nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Foo, bar!""$nonce" | sha256sum >> foobar.txt ((nonce=nonce+1)) done
It is called "stale", instead of "orphan" in other places. Because "orphan" has no parents, and the only block meeting this definition, is the Genesis Block, where its previous block hash is set to zero. I think you should try mining something with signet-like difficulty on CPU, to see that in practice. In general, when hashes are grinded, then from time to time, you can get a close match. And then, you have two pieces of Proof of Work, which are equally valid. The first-seen block header is the one, which miners will work on, but both are valid, until someone will share a new block, which would be created on top of it. See: Here, some miner successfully grinded "Hello, world!" data, with "nonce", equal to "4250". At the same time, a different miner could find a different text, with a different nonce, but also with 16 leading zero bits. And then, you have two valid blocks: one contains "Hello, world!" with nonce "4250", and another one contains "Foo, bar!" with nonce "9764". Which one is valid? Both of them are, and then, the next miner produces the next valid block, and then, everyone switches to the stronger chain, with more Proof of Work. Some Bash scripts for testing things: Code:nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Hello, world!""$nonce" | sha256sum >> hello.txt ((nonce=nonce+1)) done nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Foo, bar!""$nonce" | sha256sum >> foobar.txt ((nonce=nonce+1)) done
This review was marked as helpful by
6 people
Rui Costa Pimenta
-
Sinalizar
como inapropriado
It is called "stale", instead of "orphan" in other places. Because "orphan" has no parents, and the only block meeting this definition, is the Genesis Block, where its previous block hash is set to zero. I think you should try mining something with signet-like difficulty on CPU, to see that in practice. In general, when hashes are grinded, then from time to time, you can get a close match. And then, you have two pieces of Proof of Work, which are equally valid. The first-seen block header is the one, which miners will work on, but both are valid, until someone will share a new block, which would be created on top of it. See: Here, some miner successfully grinded "Hello, world!" data, with "nonce", equal to "4250". At the same time, a different miner could find a different text, with a different nonce, but also with 16 leading zero bits. And then, you have two valid blocks: one contains "Hello, world!" with nonce "4250", and another one contains "Foo, bar!" with nonce "9764". Which one is valid? Both of them are, and then, the next miner produces the next valid block, and then, everyone switches to the stronger chain, with more Proof of Work. Some Bash scripts for testing things: Code:nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Hello, world!""$nonce" | sha256sum >> hello.txt ((nonce=nonce+1)) done nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Foo, bar!""$nonce" | sha256sum >> foobar.txt ((nonce=nonce+1)) done
This review was marked as helpful by
72 people
HyBrax
-
Sinalizar
como inapropriado
-
Show history of
It is called "stale", instead of "orphan" in other places. Because "orphan" has no parents, and the only block meeting this definition, is the Genesis Block, where its previous block hash is set to zero. I think you should try mining something with signet-like difficulty on CPU, to see that in practice. In general, when hashes are grinded, then from time to time, you can get a close match. And then, you have two pieces of Proof of Work, which are equally valid. The first-seen block header is the one, which miners will work on, but both are valid, until someone will share a new block, which would be created on top of it. See: Here, some miner successfully grinded "Hello, world!" data, with "nonce", equal to "4250". At the same time, a different miner could find a different text, with a different nonce, but also with 16 leading zero bits. And then, you have two valid blocks: one contains "Hello, world!" with nonce "4250", and another one contains "Foo, bar!" with nonce "9764". Which one is valid? Both of them are, and then, the next miner produces the next valid block, and then, everyone switches to the stronger chain, with more Proof of Work. Some Bash scripts for testing things: Code:nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Hello, world!""$nonce" | sha256sum >> hello.txt ((nonce=nonce+1)) done nonce=0 while [ "$nonce" -lt "20000" ] do echo -n "Foo, bar!""$nonce" | sha256sum >> foobar.txt ((nonce=nonce+1)) done
This review was marked as helpful
by 251 people