Closed nrryuya closed 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.
One of the simple way is to choice the block with the smallest hash.
That would be sufficient for now!
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