    function getLatestContext() external view returns (bytes memory) {
        uint256 i = _oracle.latestOutputIndex();
        //@audit when `_minAgeSec == 0` it uses the the latest proposed output node, which is unfinalized
        uint256 t = block.timestamp - _minAgeSec;
        while (true) {
            Types.OutputProposal memory output = _oracle.getL2Output(i);
            if (output.timestamp <= t) {
                return abi.encode(i);
            }
            if (i == 0) break;
            --i;
        }
		revert('OP: no output');
    }
    function getStorageValues(
        bytes memory context,
        GatewayRequest memory req,
        bytes memory proof
    ) external view returns (bytes[] memory, uint8 exitCode) {
        uint256 outputIndex1 = abi.decode(context, (uint256));
        GatewayProof memory p = abi.decode(proof, (GatewayProof));
        Types.OutputProposal memory output = _oracle.getL2Output(p.outputIndex);
        if (p.outputIndex != outputIndex1) {
            //@audit missing check to ensure that the output node is finalized when `minAgeSec == 0`
            Types.OutputProposal memory output1 = _oracle.getL2Output(
                outputIndex1
            );
            _checkWindow(output1.timestamp, output.timestamp);
        }
