Closed ggs134 closed 6 years ago
I actually think we should revert here so that current_block_number
is required. @DavidKnott?
@kfichter I concur, block number is important to protect against miner transaction reordering invalidating the child chain.
@DavidKnott @kfichter aren't we protected against reordering-by-miner by nonces of authority
account?
@paulperegud hmm. I think yes, as long as there aren't any feasible client-side race conditions where block N is submitted before block N-1. Even something like an intermittent failure to connect to the RPC server could stop the submission of block N-1, but I feel like we should be handling those cases anyway.
Requiring the block # seems like an absolute way to make sure that the blocks can't accidentally be submitted in the wrong order. It also adds very little complexity.
Fixed in #102
https://github.com/omisego/plasma-mvp/blob/1683070b28bb64b0193f7dd4220957849fd6d317/plasma/child_chain/child_chain.py#L84
At child_chain.py, passing 2 parameters(block.merkle.root, self.current_block_number)
but at RootChain.sol, submitBlock() function recieves only 1 parameter(bytes32 root).