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

pevm: fallback to sequencial processor when the TxDAG is too deep #251

Open
wants to merge 3 commits into
base: feature/TxDAG-PEVM
Choose a base branch
from

Conversation

andyzhang2023
Copy link
Contributor

@andyzhang2023 andyzhang2023 commented Jan 10, 2025

Description

A new option is added to improve the performance when the TxDAG contains a deep dependency chain. The performance might become poor when many transactions depend on each other in a block. So we add a threshold option under which the parallel EVM will be enabled, otherwise, the block will be processed by the original EVM in sequential.

Example

Add flag --parallel.txdag-max-depth-ratio to enable this feature. Default to be not enabled.

Copy link
Collaborator

@sunny2022da sunny2022da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM. just minor suggestion of the default threshold.

ParallelTxDATMaxDepthRatioFlag = &cli.Float64Flag{
Name: "parallel.txdag-max-depth-ratio",
Usage: "A ratio to decide whether or not to execute transactions in parallel, it will fallback to sequencial processor if the depth is larger than this value (default = 1.0)",
Value: 1.0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be we can set the default value to 0.9? it seems 1.0 means there is almost 1 tx in every level. so PEVM is expected to degrade the performance in this case.

Copy link
Collaborator

@sunny2022da sunny2022da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants