archethic-node
archethic-node copied to clipboard
Ensure fetched data is valid
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