Replies: 1 comment 1 reply
-
hey @yutianwu thanks for bringing this up. this is indeed not trivial atm, but we could make this possible. in the most primitive form this would be an as you mentioned, the biggest limitation rn is that DB input is not clone. we likely need a new executor impl reth/crates/ethereum/evm/src/execute.rs Lines 353 to 369 in 892d5dd and then a way to wrap the given Database |
Beta Was this translation helpful? Give feedback.
-
Hi, we have been working on enhancing the live sync performance for opBNB. One of our strategies is to warm up the storage by executing block transactions in parallel during block insertion, similar to our approach in opBNB.
We aim to implement this in a simple manner, but we have encountered some problems.
One issue is that the State we use to execute the block in the executor can't be shared across threads like in opBNB.
If the storage fetched from the database to
cache
ordatabase
can be shared across the threads, we can increase performance by executing the transactions in parallel to warm up the cache. ButCacheState
orDB
are not designed to do so. However, to change this would involve a lot of work.Then we decided to execute the transactions in parallel in the executor, but we encountered another issue.
Since DB does not implement the Clone trait and there are many traits in the executor and provider, it is very difficult to handle concurrency due to the constraints or features of Rust. We need a dedicated design to handle concurrency effectively.
Overall, we want to help to improve the performance of the live syncing but we encountered some issues due to the lack of insights of the design and the constraints of the Rust language itself.
Can you give us some suggestions on this or we can work out a design for this to achieve the 1 giga gas goal together. Thanks for your reply~
Beta Was this translation helpful? Give feedback.
All reactions