diff --git a/contracts/root/RootChainManager/RootChainManager.sol b/contracts/root/RootChainManager/RootChainManager.sol index 73c58d89..5ba9ef99 100644 --- a/contracts/root/RootChainManager/RootChainManager.sol +++ b/contracts/root/RootChainManager/RootChainManager.sol @@ -340,10 +340,8 @@ contract RootChainManager is * 9 - receiptLogIndex - Log Index to read from the receipt */ function exit(bytes calldata inputData) external override { - require(inputData.length == 10, "RootChainManager: BAD_PAYLOAD"); - ExitPayloadReader.ExitPayload memory payload = inputData.toExitPayload(); - + bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); // checking if exit has already been processed // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) diff --git a/contracts/tunnel/BaseRootTunnel.sol b/contracts/tunnel/BaseRootTunnel.sol index e59246fd..6b106a51 100644 --- a/contracts/tunnel/BaseRootTunnel.sol +++ b/contracts/tunnel/BaseRootTunnel.sol @@ -92,9 +92,7 @@ abstract contract BaseRootTunnel is AccessControlMixin { stateSender.syncState(childTunnel, message); } - function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { - require(inputData.length == 10, "RootTunnel: BAD_PAYLOAD"); - + function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { ExitPayloadReader.ExitPayload memory payload = inputData.toExitPayload(); bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); diff --git a/flat/RootChainManager.sol b/flat/RootChainManager.sol index a20e32ca..c4309b86 100644 --- a/flat/RootChainManager.sol +++ b/flat/RootChainManager.sol @@ -2247,10 +2247,8 @@ contract RootChainManager is * 9 - receiptLogIndex - Log Index to read from the receipt */ function exit(bytes calldata inputData) external override { - require(inputData.length == 10, "RootChainManager: BAD_PAYLOAD"); - ExitPayloadReader.ExitPayload memory payload = inputData.toExitPayload(); - + bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); // checking if exit has already been processed // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)