archethic-foundation / archethic-foundation/archethic-node

Ensure fetched data is valid

Open
#1,321 0 comments 0 reactions 0 assignees View on GitHub
crypto 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?

As Archethic uses sharding, all the nodes may not store all the transaction. So if a node needs to validate a transaction which is not stored in it's DB it will request to the storage nodes of this transaction the transaction itself and the inputs.
However there is currently no verification if the retrieved datas are valid or not (the transaction or inputs may not be valid or may not exists).
At this point this could, in some case, make a validation successful with invalid inputs or invalid previous transaction.

### Describe the solution you'd like

We should find a way to verify that the received datas are valid.
It could be through cryptographic verification but it should be fast and without much network resources.

### Additional context

Currently such verifications are possible.
For the transaction we need also to retrieve the 197 signature from the replication attestation and ensure all the signature verify the transaction and that the node are the elected ones.
For inputs, since in the input we have the "from" field which is the transaction address that sent this input, we can download the transaction and verify the transaction as explained before. But if a transaction has 200 inputs it means we need to download 200 transaction ... This is not scalable

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating transaction and input retrieval, then review the existing replication-attestation signature checks described in the issue. Done means fetched transactions and inputs are verified as valid without requiring an unscalable download for every input.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.