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

chore: make parameterizible cache size #2322

Open
Ivansete-status opened this issue Dec 28, 2023 · 1 comment
Open

chore: make parameterizible cache size #2322

Ivansete-status opened this issue Dec 28, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Ivansete-status
Copy link
Collaborator

Background

The nwaku node has multiple caches and they have a default and hard-coded cache size.
We need to make the cache sizes configurable so that they can be easily changed.

Details

This issue was originally detected by @fbarbu15, who tried to use the /filter/v2/messages REST service from both nim-waku and go-waku , and found discrepancies between them.

The place where we have the max message size hard-coded:

const DefaultMessageCacheCapacity: int = 50

Ideally, we need to have these two similar parameters in nwaku:
https://github.com/waku-org/go-waku/blob/master/cmd/waku/flags.go#L541-L553

Original Discord conversation:
image

Acceptance criteria

Have the same level of cache-size reconfigurability that we have in go-waku.

@SionoiS
Copy link
Contributor

SionoiS commented Jan 3, 2024

You can configure caches but not at the app level I guess?

func init*(T: type MessageCache, capacity=DefaultMessageCacheCapacity): T =

@chair28980 chair28980 added the enhancement New feature or request label Jan 16, 2024
@SionoiS SionoiS added the good first issue Good for newcomers label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: To Do
Development

No branches or pull requests

3 participants