ethereum / research

MIT License
1.82k stars 591 forks source link

Bitwise ghost implementation - clear winner tie #100

Open AgeManning opened 5 years ago

AgeManning commented 5 years ago

This issue refers to the bitwise LMD Ghost implementation: https://github.com/ethereum/research/blob/master/ghost/ghost.py

In the event a chain has two children of equal weight and the log lookup is successful, the implementation calls get_clear_winner(). This will choose a winner based on the ordering of the python dictionary (in contrast to the bitwise selection which breaks ties based on lowest hash of the block). See line: https://github.com/ethereum/research/blob/7db6b87cf8642a8671dd9890909586912a0929c9/ghost/ghost.py#L67

Should this perhaps be > rather than >= as it seems that a clear winner is not obvious for equally weighted children.