archethic-foundation / archethic-foundation/archethic-node

Add a new flag to P2P.list_nodes()

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

Description

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

Network transactions are stored on all nodes. So when validating a transaction, the validations nodes ping all the node to determine the replication tree.
But it is possible that some nodes are completely unavailable as described by issue #1323. It is not necessary to ping these nodes

### Describe the solution you'd like

`P2P.list_nodes()` and `P2P.authorized_nodes` could have a new option flag to filter the nodes that are completely unavailable.

### Additional context

It will need to add a new field to the Node struct and modifying the p2p mem table

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading issue #1323 and tracing P2P.list_nodes(), P2P.authorized_nodes, the Node struct, and the p2p mem table. Determine how completely unavailable nodes are represented, then make the new option filter them from both node-listing paths. Done means the flag is supported and unavailable nodes are excluded when requested without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.