LayerXcom / cbc-casper-simulator

CBC Casper simulator
MIT License
5 stars 1 forks source link

[Impl] LMD GHOST tie-breaking #44

Closed nrryuya closed 5 years ago

nrryuya commented 5 years ago

For now, it depends on max() and returns the first one encountered. (see docs)

https://github.com/LayerXcom/cbc-casper-simulator/blob/2bd7b8e6595152c1827c2f7f203a85e317f54122/cbc_casper_simulator/estimator/lmd_ghost_estimator.py#L16

yudetamago commented 5 years ago

Do you have any idea about deterministic block selection when tie exists? One of the simple way is to choice the block with the smallest hash. https://github.com/LayerXcom/cbc-casper-simulator/blob/d2e84a5eeeeaf1faf3a925b23eefc61afc49c7a5/cbc_casper_simulator/block.py#L13 For now, block hash is just a random number but will be the sha3 hash of its content or something in the real situation.

nrryuya commented 5 years ago

One of the simple way is to choice the block with the smallest hash.

That would be sufficient for now!