archethic-foundation / archethic-foundation/archethic-node

Limit the number of parallel mining processes using max_children in the DynamicSupervisor

Open
#1,672 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem?

Currently, each node in the network can launch an unlimited number of mining processes in parallel through the DynamicSupervisor in the distributed workflow. This can lead to system overload, performance degradation, or even crashes.

### Describe the solution you'd like

The proposal is to introduce a `max_children` limit in the `DynamicSupervisor` to restrict the maximum number of concurrent mining processes running on a single node.

Goals are
- Prevent node overload due to excessive mining process concurrency.
- Improve node stability and network resilience.

### Additional context

_No response_

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

Locate the DynamicSupervisor used by the distributed mining workflow and inspect how mining processes are started. Define how max_children should be configured and enforced so a node cannot run more concurrent mining processes than the limit. Done means excessive mining concurrency is bounded without compromising the distributed workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.