See https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-block-headers
Note that we have a minor difference in behavior vs Fulcrum:
Fulcrum has an additional check that height, cp_height and start_height are < Storage::MAX_HEADERS (100'000'000), and returns a "Invalid height/cp_height" error message in such a case. We don't return such an error before these values hit max_int32.
I don't see any value in hardcoding such an additional limit, as these params are all bound by more restrictive values (tip_height, max_count=2016) before we even do any computation. So we still get an error in the same situation, but a different one.