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

Store Previously Requested ETH1.0 Logs Block Number #1430

Closed
rauljordan opened this issue Jan 30, 2019 · 9 comments
Closed

Store Previously Requested ETH1.0 Logs Block Number #1430

rauljordan opened this issue Jan 30, 2019 · 9 comments
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed Priority: High High priority item

Comments

@rauljordan
Copy link
Contributor

rauljordan commented Jan 30, 2019

Hi all,

Currently our powchain service reads all historical logs from the deposit contract from ETH1.0. As the contract grows even more, we should be persisting the last requested block number for logs to disk in the powchain service to avoid looping through all of these logs every time the node is launched. a PR for this would store the last requested ETH1.0 block number for log fetching in BoltDB. Next time the node spins up, we can request logs started from this block number + 1. Thanks @nisdas for bringing this up.

@rauljordan rauljordan added Help Wanted Extra attention is needed Good First Issue Good for newcomers Priority: Low Low priority item labels Jan 30, 2019
@rauljordan rauljordan added this to the Sapphire milestone Jan 30, 2019
@prestonvanloon
Copy link
Member

Whoever takes this issue should outline a plan for caching these logs.

They need to consider how to do this after 2 million or 50 million PoW blocks without overwhelming the process memory.

@shayzluf
Copy link
Contributor

shayzluf commented Feb 28, 2019

I am working on this task

Looking into the current code first

@shayzluf
Copy link
Contributor

@prestonvanloon caching the last block read index (big.Int) in boltdb and reading it shouldn't be an issue for the process memory . Am I missing something here?

@nisdas
Copy link
Member

nisdas commented Mar 1, 2019

Clarified with @shayzluf in chat https://discordapp.com/channels/476244492043812875/483017808658169866/550915035895955466 , about the requirements for the issue

@nisdas nisdas modified the milestones: Sapphire, Diamond May 30, 2019
@prestonvanloon prestonvanloon added Priority: High High priority item and removed Priority: Low Low priority item labels Dec 16, 2019
@prestonvanloon
Copy link
Member

This is a mainnet config requirement. Reading 16k logs on start up takes several minutes.

@rauljordan
Copy link
Contributor Author

Hey @prestonvanloon could you try this again with #4299

This was referenced Dec 17, 2019
@prestonvanloon
Copy link
Member

#4299 adds significant improvement from 3 minutes to under 1 minute, but this is still unsatisfactory for node restarts.

@rauljordan
Copy link
Contributor Author

I believe this is resolved by #4329, right @nisdas?

@nisdas nisdas mentioned this issue Dec 26, 2019
4 tasks
@nisdas
Copy link
Member

nisdas commented Dec 31, 2019

Yeap @rauljordan, this is resolved by #4329

@nisdas nisdas closed this as completed Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed Priority: High High priority item
Projects
None yet
Development

No branches or pull requests

4 participants