Skip to content

Refactor(miner): replace block_on with async spawn + timeout + atomic… #4445

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

Merged
merged 3 commits into from
Mar 29, 2025

Conversation

sanlee42
Copy link
Member

@sanlee42 sanlee42 commented Mar 28, 2025

… flag

Avoid potential deadlock by removing blocking block_on. Use ctx.spawn + timeout + Arc to ensure only one task runs at a time.

Preserves original minting logic while improving reliability.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

Summary by CodeRabbit

  • New Features
    • Enhanced background task management to prevent overlapping operations, ensuring a more reliable processing flow.
    • Improved scheduling for block processing events, leading to more efficient and robust handling.
    • Introduced new service request structures for improved task handling: SyncBlockTemplateRequest, DispatchMintBlockTemplate, and DelayGenerateBlockEvent.
  • Chores
    • Clarified deployment conditions in workflow configuration.

Copy link

coderabbitai bot commented Mar 28, 2025

Walkthrough

This pull request involves minor formatting changes in the Cargo.toml file for the miner project and significant modifications to the MinerService implementation in miner/src/lib.rs. A new atomic boolean flag, task_flag, is introduced to manage concurrent task execution. The dispatch_task method is updated to check this flag, preventing overlapping task dispatches while handling block template requests asynchronously. Additionally, three new service request structs are added, and logging improvements are made in service lifecycle methods.

Changes

File Change Summary
miner/Cargo.toml Removed a blank line between dependencies and dev-dependencies sections.
miner/src/lib.rs - Introduced task_flag: Arc<AtomicBool> in MinerService for concurrency control.
- Modified dispatch_task to check task_flag, set it before asynchronous block template creation with a 2000ms timeout, and handle the result accordingly.
- Added new public structs: SyncBlockTemplateRequest, DispatchMintBlockTemplate, DelayGenerateBlockEvent.
- Updated logging in started and stopped methods.
.github/workflows/docker_build.yml Updated comment for deployment step and commented out kubectl patch command.

Possibly related PRs

Suggested reviewers

  • jackzhhuang

Poem

I'm just a little rabbit, hopping through the code,
With changes so neat, down every winding road.
The flag is set, the tasks run smooth and true,
Templates are minted, a fresh start in view.
🐇 Cheers to new logic in every byte we load!

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sanlee42 sanlee42 requested a review from jackzhhuang March 28, 2025 02:57
… flag

Avoid potential deadlock by removing blocking block_on.
Use ctx.spawn + timeout + Arc<AtomicBool> to ensure only one task runs at a time.

Preserves original minting logic while improving reliability.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
miner/src/lib.rs (1)

300-308: 🛠️ Refactor suggestion

Consider refactoring dispatch_sleep_task as well

The dispatch_sleep_task method still uses block_on, which contradicts the goal of eliminating blocking operations that could cause deadlocks. Consider refactoring this method similarly to dispatch_task.

-pub fn dispatch_sleep_task(&mut self, ctx: &mut ServiceContext<Self>) -> Result<()> {
-    //create block template should block_on for avoid mint same block template.
-    let response = block_on(async {
-        self.create_block_template_service
-            .send(BlockTemplateRequest)
-            .await?
-    })?;
-    self.dispatch_mint_block_event(ctx, response.template)
+pub fn dispatch_sleep_task(&mut self, ctx: &mut ServiceContext<Self>) -> Result<()> {
+    if self.task_flag.load(Ordering::Relaxed) {
+        debug!("Mint task already running, skip dispatch_sleep_task");
+        return Ok(());
+    }
+    self.task_flag.store(true, Ordering::Relaxed);
+
+    let create_block_template_service = self.create_block_template_service.clone();
+    let addr = ctx.service_ref::<MinerService>()?.clone();
+    let flag = self.task_flag.clone();
+    
+    ctx.spawn(async move {
+        let result = tokio::time::timeout(
+            Duration::from_millis(2000),
+            create_block_template_service.send(BlockTemplateRequest),
+        ).await;
+        
+        match result {
+            Ok(Ok(Ok(response))) => {
+                let _ = addr.send(DispatchMintBlockTemplate { 
+                    block_template: response.template 
+                }).await;
+            },
+            _ => {
+                warn!("Failed to get block template in dispatch_sleep_task");
+            }
+        }
+        
+        flag.store(false, Ordering::Relaxed);
+    });
+    
+    Ok(())
}
🧹 Nitpick comments (3)
miner/src/lib.rs (3)

133-135: Consider reducing log frequency

While it's good to have service health logs, emitting "MinerService is alive" every second might generate excessive logs in production. Consider increasing the interval to 1 minute or using a more detailed heartbeat message with metrics.

-ctx.run_interval(Duration::from_secs(1), |_ctx| {
-    info!("MinerService is alive");
+ctx.run_interval(Duration::from_secs(60), |_ctx| {
+    info!("MinerService heartbeat - tasks in pool: {}", self.task_pool.len());

141-141: Fix typo in log message

There's a small typo in the log message.

-info!("stoped miner_serive ");
+info!("stopped miner_service");

363-367: Clean up TODO comment

This TODO comment mentions "@SANLEE" who appears to be the PR author. Since the refactoring is in progress, consider updating or removing this comment.

-// TODO:: Refactor TaskMisMatchError,remove current @sanlee
+// TODO: Refactor TaskMisMatchError to provide more detailed mismatch information
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0a608a and 55793e1.

📒 Files selected for processing (2)
  • miner/Cargo.toml (1 hunks)
  • miner/src/lib.rs (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Generate code coverage report
🔇 Additional comments (9)
miner/Cargo.toml (1)

33-33: Good addition of Actix dependency

This addition of the Actix actor framework aligns with the PR objectives to replace block_on with asynchronous operations. Actix provides a solid foundation for building robust concurrent systems in Rust.

miner/src/lib.rs (8)

28-28: Appropriate use of atomic primitives

Adding the atomic imports is necessary for the concurrent task management approach described in the PR objectives. This is a good practice for thread-safe flag management.


55-55: Good addition of atomic flag for task coordination

The task_flag field using Arc<AtomicBool> is a good approach to safely coordinate concurrent tasks across multiple threads. This enables the non-blocking behavior mentioned in the PR objectives.


125-125: Clean initialization of the atomic flag

Proper initialization of the atomic flag in the constructor. This ensures the service starts in a non-running state.


163-201: Well-structured async block template handling

The implementation of SyncBlockTemplateRequest is well-structured and properly handles asynchronous block template creation. The approach avoids blocking operations and ensures proper error handling.

A few observations:

  1. The code correctly uses oneshot channels for communication
  2. The spawned task ensures async execution without blocking the service
  3. Block template validation logic is correctly preserved

203-216: Clean implementation of dispatch handler

The DispatchMintBlockTemplate handler is clean and focused, delegating to the existing dispatch_mint_block_event method. This maintains good separation of concerns.


218-233: Good implementation of delayed event dispatch

The DelayGenerateBlockEvent implementation correctly uses run_later to schedule a delayed notification, which helps with handling retry logic in a clean way.


241-244: Good use of atomic flag to prevent concurrent task execution

This check using the atomic flag is a key improvement mentioned in the PR objectives. It prevents multiple concurrent minting tasks from running simultaneously, which could lead to race conditions or resource contention.


247-295: Excellent refactoring of dispatch_task for async handling

This is the core of the PR's improvement. The implementation:

  1. Properly replaces blocking operations with async equivalents
  2. Adds timeout handling to prevent indefinite waits
  3. Includes comprehensive error handling for all failure scenarios
  4. Ensures proper cleanup of the atomic flag in all code paths
  5. Implements a retry mechanism with delay for failed attempts

This implementation aligns perfectly with the PR objectives of replacing block_on with async spawn + timeout + atomic flag management.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/docker_build.yml (1)

61-61: Commented-out kubectl Patch Command Clarification
The kubectl patch command is commented out on purpose. If this disablement is temporary (e.g., for debugging purposes), please consider adding a TODO or a more detailed comment explaining the rationale and under what conditions it should be re-enabled or removed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 55793e1 and 0f1a9d5.

📒 Files selected for processing (1)
  • .github/workflows/docker_build.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build and test
🔇 Additional comments (1)
.github/workflows/docker_build.yml (1)

52-53: Update Deployment Branch Condition for Clarity
The comment and the conditional now clearly restrict the deployment step to the dag-master branch. This aligns well with the PR objective of clarifying deployment on the correct branch.

Copy link

Benchmark for 81f9c53

Click to view benchmark
Test Base PR %
accumulator_append 765.6±111.43µs 750.9±68.00µs -1.92%
block_apply/block_apply_10 372.6±10.17ms 362.9±6.07ms -2.60%
block_apply/block_apply_1000 40.0±0.93s 42.1±1.85s +5.25%
get_with_proof/db_store 43.8±4.14µs 44.5±2.85µs +1.60%
get_with_proof/mem_store 34.9±1.14µs 35.2±1.19µs +0.86%
put_and_commit/db_store/1 110.6±5.68µs 122.4±16.06µs +10.67%
put_and_commit/db_store/10 1055.1±108.27µs 1254.0±418.83µs +18.85%
put_and_commit/db_store/100 9.4±0.65ms 9.9±1.43ms +5.32%
put_and_commit/db_store/5 527.9±21.86µs 542.1±30.62µs +2.69%
put_and_commit/db_store/50 5.0±0.51ms 4.9±0.27ms -2.00%
put_and_commit/mem_store/1 69.4±7.85µs 69.8±6.57µs +0.58%
put_and_commit/mem_store/10 663.5±89.08µs 674.8±86.04µs +1.70%
put_and_commit/mem_store/100 6.1±0.31ms 6.5±0.59ms +6.56%
put_and_commit/mem_store/5 325.0±28.64µs 347.0±54.97µs +6.77%
put_and_commit/mem_store/50 3.2±0.26ms 3.2±0.16ms 0.00%
query_block/query_block_in(10)_times(100) 8.3±0.43ms 8.3±0.45ms 0.00%
query_block/query_block_in(10)_times(1000) 82.8±5.65ms 83.3±3.32ms +0.60%
query_block/query_block_in(10)_times(10000) 832.5±37.09ms 841.9±31.22ms +1.13%
query_block/query_block_in(1000)_times(100) 1244.4±114.60µs 1206.1±40.85µs -3.08%
query_block/query_block_in(1000)_times(1000) 12.0±0.45ms 12.2±0.45ms +1.67%
query_block/query_block_in(1000)_times(10000) 121.9±9.78ms 121.8±2.93ms -0.08%
storage_transaction 1123.0±418.24µs 1106.0±458.22µs -1.51%
vm/transaction_execution/1 391.1±18.04ms 407.0±15.86ms +4.07%
vm/transaction_execution/10 128.7±4.48ms 133.1±9.91ms +3.42%
vm/transaction_execution/20 129.3±12.59ms 119.6±5.92ms -7.50%
vm/transaction_execution/5 158.2±10.89ms 178.9±13.93ms +13.08%
vm/transaction_execution/50 139.2±10.20ms 137.3±4.10ms -1.36%

@nkysg nkysg self-requested a review March 28, 2025 10:23
miner/Cargo.toml Outdated
@@ -30,7 +30,7 @@ tokio = { features = ["full"], workspace = true }
starcoin-dag = { workspace = true }
starcoin-types = { workspace = true }
starcoin-sync = { workspace = true }

actix = {workspace =true}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does it need actix

Copy link
Member Author

Choose a reason for hiding this comment

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

not necessary

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (2)
miner/src/lib.rs (2)

297-305: 🛠️ Refactor suggestion

Consider refactoring dispatch_sleep_task as well

While dispatch_task has been refactored to use asynchronous patterns, dispatch_sleep_task still uses block_on. For consistency and to avoid potential deadlocks, consider refactoring this method to follow the same asynchronous pattern.

- pub fn dispatch_sleep_task(&mut self, ctx: &mut ServiceContext<Self>) -> Result<()> {
-     //create block template should block_on for avoid mint same block template.
-     let response = block_on(async {
-         self.create_block_template_service
-             .send(BlockTemplateRequest)
-             .await?
-     })?;
-     self.dispatch_mint_block_event(ctx, response.template)
- }
+ pub fn dispatch_sleep_task(&mut self, ctx: &mut ServiceContext<Self>) -> Result<()> {
+     if self.task_flag.load(Ordering::Relaxed) {
+         debug!("Mint task already running, skip sleep dispatch");
+         return Ok(());
+     }
+     self.task_flag.store(true, Ordering::Relaxed);
+     
+     let create_block_template_service = self.create_block_template_service.clone();
+     let addr = ctx.service_ref::<MinerService>()?.clone();
+     let flag = self.task_flag.clone();
+     
+     ctx.spawn(async move {
+         match create_block_template_service.send(BlockTemplateRequest).await {
+             Ok(Ok(response)) => {
+                 let _ = addr
+                     .send(DispatchMintBlockTemplate { block_template: response.template })
+                     .await;
+             }
+             _ => {
+                 warn!("Failed to get block template in dispatch_sleep_task");
+             }
+         }
+         flag.store(false, Ordering::Relaxed);
+     });
+     
+     Ok(())
+ }

360-364: 💡 Verification agent

🧩 Analysis chain

Consider implementing the suggested TODO for MinerError

There's a TODO comment that mentions refactoring the TaskMisMatchError. Since you're already refactoring this file, it might be a good opportunity to address this.


🌐 Web query:

What's the best practice for error handling in Rust when comparing expected vs actual values?

💡 Result:

To handle errors effectively when comparing expected vs actual values in Rust, follow these best practices:

Use Structured Error Handling

  1. Leverage Result and Option types for explicit error handling instead of panics:

    // Return Result<T, E> for recoverable errors
    fn compare_values<T: PartialEq>(a: T, b: T) -> Result<(), ComparisonError> {
        if a == b { Ok(()) } else { Err(ComparisonError::Mismatch) }
    }

    Avoid unwrap()/expect() in production code [3][7].

  2. Implement custom error types with thiserror for clarity:

    #[derive(Debug, thiserror::Error)]
    enum ComparisonError {
        #[error("Value mismatch: expected {expected}, got {actual}")]
        Mismatch { expected: String, actual: String },
    }

    [1][10][17]

Testing and Assertions

  1. Use assert_eq! with standardized ordering:

    assert_eq!(actual_value, expected_value); // Preferred order: actual then expected

    The panic message shows left (actual) vs right (expected) [5][9].

  2. For complex comparisons, use specialized crates:

    • assert_matches! for pattern matching:
      assert_matches!(result, Ok(_)); 
    • assert_json_diff for structured JSON comparisons [16]
  3. Handle Option comparisons safely:

    assert!(result.is_none()); // For None checks
    assert_matches!(result, Some(42)); // Pattern matching

    Avoid assert_eq! when types lack PartialEq [11].

Error Propagation and Context

  1. Use ? operator for concise error propagation:

    let expected = parse_input()?;
    let actual = compute_output()?;

    [3][13]

  2. Add context to errors using .map_err() or anyhow:

    read_file()
        .map_err(|e| ComparisonError::IoError { source: e })?;

    [7][17]

Comparison of Approaches

Scenario Recommended Approach Avoid
Simple equality checks assert_eq!(actual, expected) unwrap() comparisons
Complex struct matching assert_matches! Raw match statements
JSON value comparisons assert_json_diff::assert_json_eq Manual field checks
Option/Result unpacking assert!(result.is_some()) assert_eq!(result, Some(...)) without PartialEq

Diagnostic Best Practices

  • Implement Debug for all error and value types to enable meaningful test failure messages [11]
  • Use expect-test crate for self-updating snapshot tests [8]
  • Prefer assert! with diagnostics over unwrapping:
    assert!(
        actual == expected,
        "Mismatch: actual={:?}, expected={:?}",
        actual,
        expected
    );
    [5][16]

By following these patterns, you create maintainable error handling that provides clear diagnostics while adhering to Rust's type-safe error management philosophy.

Citations:


Action Required: Refactor TaskMisMatchError for Structured Error Handling

The TODO in miner/src/lib.rs (lines 360–364) calls for a refactor of TaskMisMatchError. Given best practices in Rust for comparing expected versus actual values, please update the error to use structured error handling. Specifically:

  • Define a Custom Error Variant:
    Instead of simply converting values to strings, create a variant that explicitly contains both the expected and actual values. For example, consider using thiserror for clearer error messages:

    #[derive(Debug, thiserror::Error)]
    pub enum MinerError {
        #[error("Task mismatch: expected {expected}, got {actual}")]
        TaskMisMatchError { expected: String, actual: String },
        // other variants...
    }
  • Provide Meaningful Comparisons:
    Leverage Rust’s Result and Option types for error handling. This ensures that when comparing expected vs. actual values, the error message provides clear diagnostics, avoiding generic error strings.

Please update the corresponding code in miner/src/lib.rs accordingly.

🧹 Nitpick comments (1)
miner/src/lib.rs (1)

138-138: Minor typo in log message

There's a small typo in the log message: "stoped" should be "stopped".

- info!("stoped miner_serive ");
+ info!("stopped miner_service");
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f1a9d5 and 62b34df.

📒 Files selected for processing (2)
  • miner/Cargo.toml (0 hunks)
  • miner/src/lib.rs (5 hunks)
💤 Files with no reviewable changes (1)
  • miner/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Generate code coverage report
🔇 Additional comments (7)
miner/src/lib.rs (7)

28-28: New atomic flag for concurrent task management

The introduction of AtomicBool and addition of task_flag field to the MinerService struct are good changes that will help prevent concurrent task execution issues.

Also applies to: 55-55


125-125: Field initialization looks correct

The task_flag is properly initialized to false with atomic sharing capabilities.


160-198: Good addition of SyncBlockTemplateRequest handler

This new handler properly implements the asynchronous template request pattern, which will help prevent blocking operations. The implementation is thorough with good error handling.


200-213: Well-structured DispatchMintBlockTemplate handler

This handler provides a clean separation of concerns, allowing for dedicated handling of template dispatching.


215-230: Good implementation of delayed event handling

The DelayGenerateBlockEvent handler provides a nice pattern for scheduling future events, which improves the overall system reliability.


237-248: Effective task flag implementation

The check for an already running task and the setting of the flag are implemented correctly. Using Ordering::Relaxed is appropriate for this use case since precise ordering isn't required.


249-293: Excellent refactoring of dispatch_task with timeout handling

The replacement of block_on with an asynchronous approach using timeout is a significant improvement. The code now properly handles timeout scenarios and error cases, retrying after appropriate delays. The atomic flag is correctly reset at the end of the task.

Copy link

Benchmark for b11000d

Click to view benchmark
Test Base PR %
accumulator_append 757.4±73.27µs 763.0±95.87µs +0.74%
block_apply/block_apply_10 372.9±18.77ms 364.3±8.76ms -2.31%
block_apply/block_apply_1000 40.5±1.04s 40.4±0.85s -0.25%
get_with_proof/db_store 44.3±3.36µs 44.6±2.86µs +0.68%
get_with_proof/mem_store 35.2±0.78µs 37.7±5.61µs +7.10%
put_and_commit/db_store/1 119.1±6.41µs 116.4±10.10µs -2.27%
put_and_commit/db_store/10 1063.6±47.05µs 1078.2±116.21µs +1.37%
put_and_commit/db_store/100 9.7±1.02ms 9.6±0.59ms -1.03%
put_and_commit/db_store/5 506.0±23.59µs 545.5±37.21µs +7.81%
put_and_commit/db_store/50 5.1±0.47ms 6.4±1.83ms +25.49%
put_and_commit/mem_store/1 69.1±7.30µs 70.7±8.18µs +2.32%
put_and_commit/mem_store/10 659.3±68.16µs 648.8±69.16µs -1.59%
put_and_commit/mem_store/100 6.6±0.76ms 6.5±0.69ms -1.52%
put_and_commit/mem_store/5 326.5±32.38µs 327.9±37.11µs +0.43%
put_and_commit/mem_store/50 3.2±0.15ms 3.3±0.29ms +3.13%
query_block/query_block_in(10)_times(100) 8.6±0.77ms 8.2±0.50ms -4.65%
query_block/query_block_in(10)_times(1000) 83.1±2.30ms 84.9±3.15ms +2.17%
query_block/query_block_in(10)_times(10000) 834.2±17.33ms 817.1±34.78ms -2.05%
query_block/query_block_in(1000)_times(100) 1182.5±16.77µs 1237.5±38.44µs +4.65%
query_block/query_block_in(1000)_times(1000) 11.6±0.28ms 12.3±0.19ms +6.03%
query_block/query_block_in(1000)_times(10000) 116.9±1.88ms 127.7±2.30ms +9.24%
storage_transaction 1106.0±422.87µs 1195.3±532.22µs +8.07%
vm/transaction_execution/1 407.6±22.41ms 415.6±22.93ms +1.96%
vm/transaction_execution/10 134.5±10.39ms 135.9±10.27ms +1.04%
vm/transaction_execution/20 120.8±10.59ms 120.8±3.81ms 0.00%
vm/transaction_execution/5 156.8±5.82ms 158.2±6.56ms +0.89%
vm/transaction_execution/50 141.1±11.34ms 136.2±4.45ms -3.47%

@sanlee42 sanlee42 merged commit 6f7ab22 into dag-master Mar 29, 2025
4 of 5 checks passed
@sanlee42 sanlee42 deleted the refactor_miner branch March 29, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants