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

[Project tracking] State witness distribution improvements #11911

Closed
pugachAG opened this issue Aug 8, 2024 · 1 comment
Closed

[Project tracking] State witness distribution improvements #11911

pugachAG opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
A-stateless-validation Area: stateless validation C-tracking-issue Category: a tracking issue

Comments

@pugachAG
Copy link
Contributor

pugachAG commented Aug 8, 2024

Project goal: to ensure that blockchain performance is not bottlenecked around chunk state witness.

Decrease witness size

Decreasing witness size results in faster witness distribution. We already implemented compression as part of the initial release, but more promising ideas described #10780 would potentially result in significantly more size reduction.
Dedicated issue: #11911

Optimise distribution

This includes changes on the network side to reduce witness distribution latency.
Low level network optimisations such as using UDP instead of TCP requires further investigations and probably significant implementation effort.
@saketh-are mentioned that we still have quite some room for improvement with low-level network optimisations while using TCP.

High level optimisations such as changing the way we distribute partial witness can also be considered. In particular we need more robust design around assigning part owners which takes validators stake into account. It was pointed out that this is more of a security/availability concern.

Adjust witness size limits

We might want to do a thorough analysis around witness distribution capabilities and adjust various state witness limits to reflect that more precisely. Currently we have to be very strict with the size limits since chunk resulting in large state witness will block the shard from making further progress. This can changes once we address #11546, so limits can be tuned around average usage instead of extreme edge cases.

Avoid including transactions from both previous and current chunk as part of state witness

Requires further investigations, see #11581.

Exclude contract code from state witness and distribute it separately.

See #11099 for details.

@walnut-the-cat
Copy link
Contributor

  • Ran a quick experiment to confirm that it reduces witness size significantly: shadow-validate-large-state-values-cache branch
  • Discussed the approach with Bowen, decided to consider this along with Shared contract code to avoid duplicate effort later
  • Spent the rest of the time trying to come up with a design for MVP, still working on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stateless-validation Area: stateless validation C-tracking-issue Category: a tracking issue
Projects
None yet
Development

No branches or pull requests

2 participants