Skip to content
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

TODO: Process deposits in order #389

Closed
ralexstokes opened this issue Jan 3, 2019 · 4 comments
Closed

TODO: Process deposits in order #389

ralexstokes opened this issue Jan 3, 2019 · 4 comments
Labels
general:enhancement New feature or request

Comments

@ralexstokes
Copy link
Member

From the spec:

[TODO: add logic to ensure that deposits from 1.0 chain are processed in order]

Do we just mean to process deposits in a given block by the deposit_data.timestamp?

If so, I can make a PR w/ this change. Wasn't sure if there was something more involved here around making sure the entire mechanism works e.g. across updates to the deposit_root.

@djrtwo
Copy link
Contributor

djrtwo commented Jan 4, 2019

This would need to be a stronger validity condition than timestamp. We would likely either use the previous_receipt_root and force the deposits to be processed in a valid chain. Or we could add an index to the Deposit events from the pow chain and just process the indices in order.

@mkalinin
Copy link
Collaborator

There is an idea of merklizing merkle_tree_index or deposit_count value within the other deposit_data in the contract. This would allow to avoid querying a deposit contract which is needed to match indexes in deposit records of processing block. This option, also, requires to keep latest_deposit_index in the state.

@Nashatyrev
Copy link
Member

I would also suggest in advance that if we are going to store latest_deposit_index in the BeaconState it would be implementation friendly to store latest_deposit_eth1_data : Eth1Data (either instead or together with the latest_deposit_index).
That will help to avoid maintaining additional index for proposer to fetch next Deposits for block creation.

@hwwhww hwwhww added the general:enhancement New feature or request label Jan 28, 2019
@djrtwo
Copy link
Contributor

djrtwo commented Feb 12, 2019

closed via #594

@djrtwo djrtwo closed this as completed Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants