Closed mikeshultz closed 8 months ago
Alright, found a (the?) stream that triggers this error on Sepolia:
0x588eBB657Ca52d6fbDf8F52C760D53C1474e37Ed
54
9999999999229756
It appears that it's not even a large amount of tokens, but a very small amount_per_second
causing the issue:
>>> now = int(datetime.utcnow().timestamp())
>>> last_pull = 1697577384
>>> funded_amount = 1000000000008640000
>>> amount_per_second = 100
>>> amount_unlocked = min((now - last_pull) * amount_per_second, funded_amount)
>>> amount_unlocked
87882700
>>> (funded_amount - amount_unlocked) / amount_per_second
9999999999207572.0
>>> int(9999999999207572.0)
9999999999207572
>>> timedelta(seconds=9999999999207572)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C int
So it seems to be a limitation in timedelta. Which honestly is fair, because this stream is funded for over 317 million years.
So it seems to be a limitation in timedelta. Which honestly is fair, because this stream is funded for over 317 million years.
yeah, so like... probably should just raise, since that's unlikely to be a legitimate time to use
Seen just now on sepolia. Will see about instrumenting more tomorrow: