You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After syncing 1 million Transactions, and the accompanying 1 million VerificationPackets, Meros will overflow the counter it uses for SyncRequests (a counter used to give each request an unique ID). Nim will then have its checks kill the program. The solution is two-fold:
Confirm IDs can be re-used if the old request has completed. Using every ID would then require creating 2 billion sync requests in less than 5 seconds. This should be okay thanks to a mix of table-indexing and because I believe we cleanup the metadata (as to not cause a memory leak).
Change the int to an uint. Not only does this double our space, Nim doesn't mind if uints are overflown.
The text was updated successfully, but these errors were encountered:
kayabaNerve
changed the title
Meros will crash after syncing ~1 million Transactions.
Meros will crash after syncing ~1 billion Transactions.
Jun 5, 2020
For some reason, my mind thinks 2^32 is 4 million; not 4 billion (rounded, of course).
I'm not sure this is feasible to test with such a large quantity, not to mention it'd take years to trigger naturally. I do want to theoretically fix it, but I don't see any value in doing more than that.
After syncing 1 million Transactions, and the accompanying 1 million VerificationPackets, Meros will overflow the counter it uses for SyncRequests (a counter used to give each request an unique ID). Nim will then have its checks kill the program. The solution is two-fold:
Confirm IDs can be re-used if the old request has completed. Using every ID would then require creating 2 billion sync requests in less than 5 seconds. This should be okay thanks to a mix of table-indexing and because I believe we cleanup the metadata (as to not cause a memory leak).
Change the int to an uint. Not only does this double our space, Nim doesn't mind if uints are overflown.
The text was updated successfully, but these errors were encountered: