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

processEth1Data performance issue #3082

Closed
2 tasks
dapplion opened this issue Sep 3, 2021 · 4 comments · Fixed by #3760
Closed
2 tasks

processEth1Data performance issue #3082

dapplion opened this issue Sep 3, 2021 · 4 comments · Fixed by #3760
Labels
prio-medium Resolve this some time soon (tm). scope-performance Performance issue and ideas to improve performance.

Comments

@dapplion
Copy link
Contributor

dapplion commented Sep 3, 2021

Describe the bug

processEth1Data takes more time than it should (5-6ms, 25% of phase0 block processing times). Looks like iteration takes signficant time + it has to convert the root of each entry from hashObject to Uint8Array and then compare. A bit stupid when it could just use the hashObject numbers

Screenshot from 2021-09-03 19-29-31

Screenshot from 2021-09-03 19-29-52


From duplicate issue #2453

In Prater our node spends 1400 ms processing Eth1Data. This happens on every block when there's no majority vote.

Screenshot from 2021-05-01 15-20-47

Same cost every block

Screenshot from 2021-05-01 15-22-05

detail of the stack

Screenshot from 2021-05-01 15-23-11

  • Add a dedicated performance test
  • Optimize
@dapplion dapplion added the scope-performance Performance issue and ideas to improve performance. label Sep 3, 2021
@dapplion
Copy link
Contributor Author

@wemeetagain noted that the performance test should use a TreeBacked block which makes equality cheaper in our current SSZ implementation. However this function may take a struct or a TreeBacked block. In both cases the code should be fast.

@dapplion
Copy link
Contributor Author

See #2453 for more detailed CPU profiles

@philknows philknows added the prio-medium Resolve this some time soon (tm). label Nov 29, 2021
@philknows
Copy link
Member

Note to tag this issue with SSZ refactor PR when it's ready.

@dapplion
Copy link
Contributor Author

@dapplion dapplion mentioned this issue May 10, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-medium Resolve this some time soon (tm). scope-performance Performance issue and ideas to improve performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants