archethic-foundation / archethic-foundation/archethic-node

Open more nodes in validation nodes election

Open
#913 4 comments 0 reactions 1 assignee Claimed by @samuelmanzanera View on GitHub
election enhancements to-analyze
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Describe the problem you discovered

Actually for a low UCO transfer amount we have 3 validation nodes. The minimum number of nodes to validate a transaction is 2.
Let's say there is 2 nodes in the network which suddenly disconnect but are still globally available.
If an election of a transaction select 3 nodes including the 2 disconnected one, the transaction will never be validated until theses node will be globally unavailable in the next (or next next) self repair. So the transaction is stuck for a long time and this can be really annoying if it's a network one.

### Describe the solution you'd like

Here is a possible solution:
When a welcome node receive a transaction, it do the election (assume 3 nodes) and 2 of them are locally unavailable (they are maybe disconnected) we know at this time that the transaction will not be validated (only 1 or 0 validation nodes will receive the StartMining message).

Actually the maximum number of validation nodes is 12. So the election may always return 12 nodes and then the welcome node select the needed number of validation node out of these 12 nodes, but only locally available nodes. (This selection may be random ?)
Then for the replication and the validation node, to determine if the election is right, the welcome node can send the list of the 12 nodes from the election (that can be verified using the same election) and the selected one to validate the transaction. The selected ones should be part of the list of the 12 nodes.

With this behavior, we keep the same verification for the election, but we have more flexibility to select locally available nodes to validate the transaction. And do not let transaction waiting for next self repair.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.