near / near-indexer-events

7 stars 1 forks source link

Change events enumeration logic #15

Closed telezhnaya closed 1 year ago

telezhnaya commented 2 years ago

Now we suppose we may have max 10k events per shard; sweatcoin produced 2700 events in this block: https://explorer.near.org/blocks/DjMc3wUuNazky2VHRB8stTSpV7hReENqYjK7GJhFhQ1N. It's only one contract, and I feel scared we can potentially overflow. My suggestion: we should have 100k or even 1M events as the upper bound just to be sure we do not reach the overflow with our enumeration.

@frol what do you think?

frol commented 1 year ago

@telezhnaya Sounds good to me. As far as I remember, we have plenty of digits at our disposal, right? If so, sure, go ahead with whatever you know will work the best.

telezhnaya commented 1 year ago

Yeah, we have some digits for such cases :)

telezhnaya commented 1 year ago

We also can't cut timestamp to millis because of https://github.com/near/near-explorer/issues/1110 Just found this issue https://github.com/near/near-indexer-balances/issues/7

telezhnaya commented 1 year ago

Fixed by https://github.com/near/near-indexer-events/commit/ddbc7a2a1a01aa01abcf211988a797e5ee69cfe1