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

feat: mpool: Cache state nonces #8005

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Jan 26, 2022

Proposed Changes

This PR adds a simple address:tipset -> nonce cache for state nonces to mpool nonce getter. This massively speeds up lite node startup when the node has sent a lot of messages over its life (in my case node startup time went down from 13 minutes to 2.5 seconds)

@magik6k magik6k requested a review from a team as a code owner January 26, 2022 14:42
@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #8005 (176ecd4) into master (06d2ac6) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8005      +/-   ##
==========================================
- Coverage   39.22%   39.14%   -0.09%     
==========================================
  Files         660      660              
  Lines       71411    71420       +9     
==========================================
- Hits        28009    27955      -54     
- Misses      38591    38638      +47     
- Partials     4811     4827      +16     
Impacted Files Coverage Δ
chain/messagepool/messagepool.go 58.50% <100.00%> (-0.29%) ⬇️
chain/events/message_cache.go 87.50% <0.00%> (-12.50%) ⬇️
markets/loggers/loggers.go 88.88% <0.00%> (-11.12%) ⬇️
storage/wdpost_sched.go 77.45% <0.00%> (-9.81%) ⬇️
extern/sector-storage/worker_tracked.go 79.09% <0.00%> (-7.28%) ⬇️
chain/events/observer.go 71.64% <0.00%> (-6.72%) ⬇️
chain/messagepool/repub.go 51.61% <0.00%> (-4.31%) ⬇️
extern/sector-storage/sched.go 83.12% <0.00%> (-2.47%) ⬇️
chain/events/events_called.go 83.90% <0.00%> (-1.96%) ⬇️
storage/wdpost_changehandler.go 97.64% <0.00%> (-1.89%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06d2ac6...176ecd4. Read the comment docs.

@magik6k magik6k merged commit 3e6c482 into master Jan 26, 2022
@magik6k magik6k deleted the feat/mpool-cache-statenonces branch January 26, 2022 15:22
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.

2 participants