Add EIP: Double speed for hash_tree_root
✅ All reviewers have approved.
The commit dc941835155b531c76dafa419c22393890963572 (as a parent of 76bcc8338588b882c745fd62e0e55309d2875046) contains errors. Please inspect the Run Summary for details.
@twoeths could you help review this new EIP PR having work considerably on ssz sha256 internals
the change makes a lot of sense to me. For lodestar on holesky, it takes ~530ms for hash_tree_root on epoch transition with wasm sha256 and going to be 130ms - 150ms with hashtree so this helps a lot. I'm curious to know the hash_tree_root time at epoch transition for other clients, do you have this statistic for Nimbus @etan-status ?
Per block, the main effort is for the epoch participation flags. On epoch transition, the balance changes increase the load. Both of these scale with number of validators. I don't have exact timings for Nimbus, but if necessary we should create a reference state with 2 epochs worth of blocks for proper measurement. I have added this as an open item to the Ethereum Magicians thread.
I think we need to evaluate this in a post-MaxEB world. I suspect, it is not going to be a significant improvement when less hashes change in the merkle tree. It is quite an invasive change and benefit is not super obvious imo. we could also make use of different hash functions such as blake3 which is also consistently faster than sha256 (14x)