Closed ruuda closed 2 years ago
Hum... I wonder if we should start fixing such edge-cases. Of course a malicious RPC node could answer bogus data, but a malicious RPC node also has opportunity to mess with the system in a lot of levels. At a normal conditions, epoch is overflow will happen in billion of years, a time in which I hope there's something better than Solana out there 🙈
Hum... I wonder if we should start fixing such edge-cases.
Yes, we should still fix it, even if this is not a problem in practice, for a few reasons:
In case of a very high epoch number, the computation for
start_slot + QUERY_SLOT_OFFSET
could overflow. This will not occur in practice, and it’s not triggered by a user input. It could only be triggered by a malicious RPC node. Still, we should fix it, if only to unblock the fuzzer for finding other issues.