You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed, when experimenting with your excellent demo, that the chains on the blockchain and distributed tabs behave differently.
For example, on the blockchain tab when you modify the data field on the second block, which breaks the hash signature as expected, the next block in the chain reflects the proper (broken) hash in the Prev field. Also, when you mine the current block again, generating a good signature for the block, the next block in the chain (and all following) reflect the newly generated hashes in the Prev field as well. This works as expected.
However, on the Distributed tab, which to my thinking should behave identically, just with three parallel blockchains, the next and all following blocks do NOT update the Prev value to reflect reality. This means you would need to carry those values forward manually, where I should just be able to kepp clicking mine on successive blocks to get one of the chains to be divergent from all of the others (while still being internally consistent).
After cloning and testing it out I believe changing line 55 in the distributed code with the following diff would fix it:
I noticed, when experimenting with your excellent demo, that the chains on the
blockchain
anddistributed
tabs behave differently.For example, on the blockchain tab when you modify the data field on the second block, which breaks the hash signature as expected, the next block in the chain reflects the proper (broken) hash in the
Prev
field. Also, when you mine the current block again, generating a good signature for the block, the next block in the chain (and all following) reflect the newly generated hashes in thePrev
field as well. This works as expected.However, on the
Distributed
tab, which to my thinking should behave identically, just with three parallel blockchains, the next and all following blocks do NOT update thePrev
value to reflect reality. This means you would need to carry those values forward manually, where I should just be able to kepp clickingmine
on successive blocks to get one of the chains to be divergent from all of the others (while still being internally consistent).After cloning and testing it out I believe changing line 55 in the distributed code with the following diff would fix it:
https://github.com/anders94/blockchain-demo/blob/master/views/distributed.jade#L55
I think this also fixes the token page which does not currently break signatures if you modify a value in the data block.
The text was updated successfully, but these errors were encountered: