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

Add "last known good" cache for virtual state #399

Merged
merged 9 commits into from
Jan 21, 2024

Conversation

michaelsutton
Copy link
Contributor

  • Optimizes many frequent P2P operations which now don't require waiting for the virtual store lock
  • Improves responsiveness of RPC get metrics call

Copy link
Collaborator

@coderofstuff coderofstuff left a comment

Choose a reason for hiding this comment

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

I have a few questions and requests.

Testing over mainnet looks to be stable. Will test in TN11 shortly

rpc/service/src/service.rs Outdated Show resolved Hide resolved
components/consensusmanager/src/session.rs Show resolved Hide resolved
rpc/service/src/service.rs Show resolved Hide resolved
---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
@michaelsutton michaelsutton merged commit 401aa16 into kaspanet:master Jan 21, 2024
6 checks passed
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jan 22, 2024
* make a better estimation of header count (during IBD this will now count for the headers phase)

* rpc service responsiveness: use `transaction_count_sample` for inferring mempool size

* use counters snapshot

* introduce last known good virtual state cache

* move processing counters to consensus core and remove rpc service crate dep on consensus

* extract consensus stats to a single call

* turn some consensus session calls into non-async + fix get_block_dag_info_call

* use saturating_sub instead of checked_sub + unwrap_or_default

* use join over all async calls

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jan 23, 2024
* make a better estimation of header count (during IBD this will now count for the headers phase)

* rpc service responsiveness: use `transaction_count_sample` for inferring mempool size

* use counters snapshot

* introduce last known good virtual state cache

* move processing counters to consensus core and remove rpc service crate dep on consensus

* extract consensus stats to a single call

* turn some consensus session calls into non-async + fix get_block_dag_info_call

* use saturating_sub instead of checked_sub + unwrap_or_default

* use join over all async calls

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
@humoud19801
Copy link

In summary, this pull request is all about making P2P operations more efficient by removing the need for waiting on virtual store locks. Simultaneously, it aims to improve the responsiveness of the RPC get metrics call, providing faster access to important system metrics. These optimizations contribute to an overall enhancement of system performance and responsiveness.

KashProtocol pushed a commit to Kash-Protocol/rusty-kash that referenced this pull request Jan 24, 2024
* make a better estimation of header count (during IBD this will now count for the headers phase)

* rpc service responsiveness: use `transaction_count_sample` for inferring mempool size

* use counters snapshot

* introduce last known good virtual state cache

* move processing counters to consensus core and remove rpc service crate dep on consensus

* extract consensus stats to a single call

* turn some consensus session calls into non-async + fix get_block_dag_info_call

* use saturating_sub instead of checked_sub + unwrap_or_default

* use join over all async calls

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
* make a better estimation of header count (during IBD this will now count for the headers phase)

* rpc service responsiveness: use `transaction_count_sample` for inferring mempool size

* use counters snapshot

* introduce last known good virtual state cache

* move processing counters to consensus core and remove rpc service crate dep on consensus

* extract consensus stats to a single call

* turn some consensus session calls into non-async + fix get_block_dag_info_call

* use saturating_sub instead of checked_sub + unwrap_or_default

* use join over all async calls

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>

---------

Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
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