Akagi201 / blockstm-go

General Block-STM execution engine for EVM in Go
Apache License 2.0
4 stars 1 forks source link

Should the verification phase be multi-threaded #3

Open xuyi33333 opened 1 month ago

xuyi33333 commented 1 month ago

Hello, I noticed that the verification phase in the block-stm paper is supposed to be parallel. However, after looking at the code, I found that the verification phase in block-stm does not seem to have implemented multi-threaded validation.

dev-ape-ai[bot] commented 1 month ago

Hey @xuyi33333 😊👋,

Thanks for bringing up the issue regarding the parallelism in the verification phase of our block-stm-go implementation. After reviewing the current code and some additional research, it seems the project does not currently implement multithreading or parallel processing during the verification phase within the code explicitly. Here are some insights and findings:

Insights:

Related Code Unfortunately, after conducting a search in the relevant code files (`block_executor.go` and `executor.go`), there are no direct references or implementations pointing towards multithreading or parallel execution for the verification phase.
Related Search Results - [Papers with Code - Block-STM: Scaling Blockchain Execution by Turning ...](https://paperswithcode.com/paper/block-stm-scaling-blockchain-execution-by): Describes Block-STM's leveraging of execution order to dynamically detect dependencies and reduce conflicts during speculative transaction execution. - [PDF arXiv:2203.06871v1 [cs.DC] 14 Mar 2022](https://arxiv.org/pdf/2203.06871v1.pdf): Discusses Block-STM's implementation details on Diem Blockchain, demonstrating the benefits of adaptive use of parallelism in different workload scenarios. - [GitHub - crypto-org-chain/go-block-stm: block-stm implementation in ...](https://github.com/crypto-org-chain/go-block-stm): Another implementation example but with mechanisms to handle dependencies more efficiently. - [Block-STM - arXiv.org](https://arxiv.org/pdf/2203.06871): An in-depth paper detailing full algorithmic implementation and evaluations of Block-STM. - [Block-STM: How We Execute Over 160k Transactions Per Second on the ...](https://medium.com/aptoslabs/block-stm-how-we-execute-over-160k-transactions-per-second-on-the-aptos-blockchain-3b003657e4ba): Provides insights into optimizations like multi-version data structures to avoid write-write conflicts in a multithreaded context.

Let's explore further a possible enhancement by considering the integration of Go's concurrency patterns, such as goroutines and channels, into our verification phase. What are your thoughts on this?