Skip to content

Ability to define multiple subnets in SUBNET_FILTER #718

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

Open
zipiju opened this issue Apr 9, 2025 · 2 comments
Open

Ability to define multiple subnets in SUBNET_FILTER #718

zipiju opened this issue Apr 9, 2025 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@zipiju
Copy link
Contributor

zipiju commented Apr 9, 2025

It currently looks like you can only define single allowed subnet in SUBNET_FILTER, such as SUBNET_FILTER=spark.
Trying to do SUBNET_FILTER=spark,arweave causes the node to run no subnets (tried with --experimental flag, where while omitting the SUBNET_FILTER the node runs all currently available subnets - three at the moment).
The reason to run node in this configuration might for example be RAM constraints, where you would be able to run two subnets, but running three would cause an OOM condition.
Would it be possible to modify the code so it would parse for example comma separated SUBNET_FILTER, to allow users to define which specific subnets to run?
Thank you.

@bajtos
Copy link
Member

bajtos commented Apr 10, 2025

Here is the relevant code:

node/lib/zinnia.js

Lines 87 to 88 in 8bcce7e

const matchesSubnetFilter = (subnet) =>
SUBNET_FILTER === '' || subnet === SUBNET_FILTER

Would you like to contribute the change yourself and submit a pull request?

@bajtos bajtos added the good first issue Good for newcomers label Apr 10, 2025
@zipiju
Copy link
Contributor Author

zipiju commented Apr 10, 2025

Sure, this will hopefully do #719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants