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

perf: remove unnecessary state clone #4763

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

rkrasiuk
Copy link
Member

Description

StateRootProvider should not take ownership of the BundleStateWithReceipts as it forces an unnecessary clone of the bundle state. The need for cloning should be dictated by the implementation.

@rkrasiuk rkrasiuk added C-perf A change motivated by improving speed, memory usage or disk footprint A-trie Related to Merkle Patricia Trie implementation labels Sep 25, 2023
@rkrasiuk rkrasiuk force-pushed the rkrasiuk/perf-unnecessary-state-clone branch from 7085231 to d0681bd Compare September 25, 2023 12:13
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #4763 (d0681bd) into main (f67f850) will decrease coverage by 0.04%.
Report is 1 commits behind head on main.
The diff coverage is 38.46%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/auto-seal/src/lib.rs 0.00% <0.00%> (ø)
crates/payload/basic/src/lib.rs 0.00% <0.00%> (ø)
crates/revm/src/processor.rs 82.19% <0.00%> (ø)
crates/rpc/rpc/src/eth/api/pending_block.rs 0.00% <0.00%> (ø)
...storage/provider/src/providers/state/historical.rs 86.34% <0.00%> (ø)
...tes/storage/provider/src/providers/state/macros.rs 100.00% <ø> (ø)
crates/storage/provider/src/test_utils/mock.rs 22.42% <0.00%> (ø)
crates/storage/provider/src/test_utils/noop.rs 28.46% <0.00%> (ø)
crates/storage/provider/src/traits/state.rs 27.11% <ø> (ø)
crates/blockchain-tree/src/chain.rs 77.37% <100.00%> (ø)
... and 2 more

... and 7 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.54% <0.00%> (+<0.01%) ⬆️
unit-tests 63.48% <38.46%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 32.11% <ø> (ø)
blockchain tree 83.73% <100.00%> (ø)
pipeline 88.53% <ø> (ø)
storage (db) 73.70% <57.14%> (ø)
trie 94.73% <ø> (-0.04%) ⬇️
txpool 49.50% <ø> (-0.48%) ⬇️
networking 77.11% <ø> (+0.01%) ⬆️
rpc 57.67% <0.00%> (-0.01%) ⬇️
consensus 63.09% <0.00%> (ø)
revm 28.33% <0.00%> (ø)
payload builder 8.32% <0.00%> (ø)
primitives 86.52% <ø> (-0.04%) ⬇️

@rkrasiuk rkrasiuk added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit 0f9def0 Sep 25, 2023
22 checks passed
@rkrasiuk rkrasiuk deleted the rkrasiuk/perf-unnecessary-state-clone branch September 25, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants