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

draft: Change to speed up block processing by around 7x #3225

Closed
wants to merge 1 commit into from

Conversation

gregorycoppola
Copy link
Contributor

@gregorycoppola gregorycoppola commented Jul 27, 2022

Description

This PR shows how to "pre-cache" the list of transactions to try on a call to stacks-inspect try-mine.

We have shown that, using this change, we can get a block made 6x faster than the baseline in develop. With this change, we get a block made in 2.4s instead of around 15s in develop.

new:

DEBG [1658941143.197815] [src/chainstate/stacks/miner.rs:2163] [main] Miner: mined anchored block, block_hash: 4f5308cac19c76c0749168a1b407f638eaf3c18ea0764abf4b58cb16e9492570, height: 69059, tx_count: 71, parent_stacks_block_hash: 3e39db238c15dfb2f07d0d0c1c25a3fbd90e085d072bcb608ce5460637a9f2ca, parent_stacks_microblock: 0000000000000000000000000000000000000000000000000000000000000000, parent_stacks_microblock_seq: 0, block_size: 24964, execution_consumed: {"runtime": 39377540, "write_len": 44822, "write_cnt": 569, "read_len": 9288054, "read_cnt": 4139}, assembly_time_ms: 2438, tx_fees_microstacks: 4065566

baseline:

DEBG [1658883820.474547] [src/chainstate/stacks/miner.rs:2179] [main] Miner: mined anchored block, block_hash: 99fd3a1e5bca342db0a0279f90837062a5cac88fbabd87cd02684ce9587f4cce, height: 69059, tx_count: 71, parent_stacks_block_hash: 3e39db238c15dfb2f07d0d0c1c25a3fbd90e085d072bcb608ce5460637a9f2ca, parent_stacks_microblock: 0000000000000000000000000000000000000000000000000000000000000000, parent_stacks_microblock_seq: 0, block_size: 24964, execution_consumed: {"runtime": 39377540, "write_len": 44822, "write_cnt": 569, "read_len": 9288054, "read_cnt": 4139}, assembly_time_ms: 15742, tx_fees_microstacks: 4065566

@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #3225 (1d77456) into develop (e2c69be) will decrease coverage by 24.48%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           develop    #3225       +/-   ##
============================================
- Coverage    82.80%   58.31%   -24.49%     
============================================
  Files          261        1      -260     
  Lines       204178      571   -203607     
============================================
- Hits        169068      333   -168735     
+ Misses       35110      238    -34872     
Impacted Files Coverage Δ
src/chainstate/stacks/miner.rs
src/core/mempool.rs
src/main.rs
testnet/stacks-node/src/operations.rs
src/net/dns.rs
clarity/src/vm/analysis/analysis_db.rs
src/burnchains/burnchain.rs
src/cost_estimates/tests/fee_medians.rs
src/cost_estimates/tests/mod.rs
clarity/src/vm/tests/assets.rs
... and 250 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants