-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ring buffer for pending Ether Deposits #13783
Comments
I'd like to try this |
I think we can just modulo ID by the ringBufferSize? Haven't looked at the code much for this but I think that's how our other ring buffers are implemented. |
When the buffer is full and a new deposit is made, we overwrite the oldest deposit, is that correct?
In this case I think it's different because we need to track the oldest deposit because when we process deposits we go from the oldest to the newest. So we need at least size and nextIndex variable to keep track of everything. |
@Venoox I assigned this feature to you. Do you think you can give us an ETA? |
A few days would be my best guess |
I got it done here: #13868 |
Oh I've just finished working on it :/ |
Good |
As of now, the
EthDeposit[] ethDeposits
is an ever growing array. It can be turned into a ring buffer for reducing gas cost. This will be a very good first issue for community developer to implement.The text was updated successfully, but these errors were encountered: