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

fix: do not rebind nodes if child ViewDU is not changed #380

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Jul 11, 2024

Motivation

There are some read-only operations during state transition, for example: state.balances.length, state.validators.length, state.latestBlockHeaders

although the data is not changed, ViewDU still track it as changed node and blindly rebind nodes, which takes time to rebind and compute roots

Description

@twoeths twoeths requested a review from a team as a code owner July 11, 2024 02:52
@github-actions github-actions bot added the ssz label Jul 11, 2024
@twoeths
Copy link
Contributor Author

twoeths commented Jul 11, 2024

commit time is not worse than te/batch_hash_tree_root (actually it's ~ 2ms faster)

  • this branch
Screenshot 2024-07-11 at 10 04 16
  • te/batch_hash_tree_root
Screenshot 2024-07-11 at 10 04 41

hashTreeRoot() is ~10ms faster due to less hash computations, but this nogroup node has no validator vs feat1-1k

@twoeths twoeths merged commit deecd52 into te/batch_hash_tree_root Jul 11, 2024
7 checks passed
@twoeths twoeths deleted the te/handle_unchanged_child_viewdu_2 branch July 11, 2024 03:07
twoeths added a commit that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant