Closed legengliu closed 5 years ago
in validateTransactionExitInputs, can we have checks to make sure that oIndex <= 1 and txIndex <= 2 16 to ensure that two positions can't map to same priority shouldn't happen in valid block. But validator could create a block with tx's > 2 16, and still claim he put in less in submit block. i don't believe an attack is possible here anyway, since you would have to create other arguments to startExit that still passed merkle proof checks and other full nodes would consider this an invalid block anyway. Still an abundance of caution is good
Added
startFeeExit
method on the rootchain contract to allow a validator to claim a fee for a block.Note that in the current implementation, if the validator attempts to exit a fee UTXO that has already been spent in a later block, the exit can be challenged through
startTransactionExit
the same way as a regular transaction exit. However, if the fee UTXO has not been spent, but the validator claims the incorrect fee amount for a block, users should watch and exit (there's no explicit check for the correct fee amount on the contract).