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

Make size limit of orphan witnesses configurable #10650

Closed
jancionear opened this issue Feb 23, 2024 · 1 comment
Closed

Make size limit of orphan witnesses configurable #10650

jancionear opened this issue Feb 23, 2024 · 1 comment
Assignees
Labels
A-stateless-validation Area: stateless validation C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.

Comments

@jancionear
Copy link
Contributor

jancionear commented Feb 23, 2024

The size of orphaned chunk state witnesses admitted to the OrphanStateWitnessPool is limited by the constant MAX_ORPHAN_WITNESS_SIZE. Value of MAX_ORPHAN_WITNESS_SIZE was chosen based on the observed values, but this estimation might not be perfect. If the limit turns out to be too small, it could lead to discarding valid orphaned witnesses. This isn't a big problem, but it could increase the number of missing chunks.
It would be nice to allow node operators to control this limit from config.json, just like it's possible to control the pool size by using the orphan_state_witness_pool_size config parameter.

Refs: #10613 (comment)

@jancionear jancionear added C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. A-stateless-validation Area: stateless validation labels Feb 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 22, 2024
…n config.json (#10847)

Addresses a TODO in #10650.

The default value is 40MB and currently represented as a constant
MAX_ORPHAN_WITNESS_SIZE.
This change replaces this constant with a config field named
"orphan_state_witness_max_size."

Example from generated config.json with init command:
```
...
"orphan_state_witness_pool_size": 25,
"orphan_state_witness_max_size": 40000000
```
@tayfunelmas tayfunelmas self-assigned this Mar 26, 2024
@tayfunelmas
Copy link
Contributor

Addressed in PR #10847.

In config.json the orphan witness data size can be specified as follows:

"orphan_state_witness_max_size": 40000000

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-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.
Projects
None yet
Development

No branches or pull requests

2 participants