archethic-foundation / archethic-node

Official Archethic Blockchain node, written in Elixir
GNU Affero General Public License v3.0
75 stars 22 forks source link

Chain replication does not fail on error #1563

Closed Neylix closed 1 month ago

Neylix commented 1 month ago

Describe the problem you discovered

When a node replicate a transaction, it also replicate the missing previous transactions of the entire chain. But as the retrieval of the transaction is done through a Stream, if there is a connection issue the node may not retrieve the previous transaction and continue the process of replication. In the current state, this lead to an error as the current transaction is replicated under a wrong genesis address and broke the chain.

Describe the solution you'd like

During replication, if we detect that the node needs to replicate previous transaction in the chain, if the stream does not returns the expected transaction, the replication should fail.

Epic

No response