Combien de temps dure une transaction ethereum?
Le traitement d'une transaction ethereum se déroule en plusieurs étapes. Pour l'expliquer plus simplement, nous allons prendre pour exemple l'envoi d'une transaction d'ether fictive. Imaginez que Marc veut faire un virement de 0.1 ether à Anne. Il va pour cela sur son portefeuille, rentre la quantité d'éther et appuie sur envoyer. Que se passe-t-il maintenant?
Étape 1: la transaction est envoyée vers le réseau ethereum
La transaction de Marc est maintenant présente sur le réseau ethereum, le réseau public de l'éther.
Son portefeuille envoie cette transaction de manière cryptée vers le réseau éthereum. Celle-ci est dorénavant visible par tous sur le réseau, mais cela ne signifie pas encore que la transaction a été complètement traitée.
Comment cela fonctionne-t-il concrètement? Toutes les 15 secondes environ les mineurs ajoutent un bloc dans le réseau. Un bloc peut contenir plusieurs transactions, selon la grandeur d'une transaction. Une transaction est dans tous les cas définitive si le bloc a été traîtée sur le réseau ethereum.
Le nouveau bloc est connecté avec le dernier bloc sur le réseau, qui par la suite est également connecté avec le dernier bloc suivant, et ainsi de suite. De cette manière il y a une chaîne de blocs contenant des transactions: la blockchain.
Avant d'arriver à ce point, les transactions se retrouvent dans ce qu'on appelle la zone mémoire.
Etape 2: la transaction se trouve dans la zone de mémoire
La transaction de marc à anne se trouve maintenant dans le “pool” de mémoire, prête à être traitée.
Comme cela fonctionne-t-il? Les nouvelles transactions ne sont pas organisées dans un ordre chronologique, mais se trouvent dans le pool mémoire. Cela semble peut-être étrange, mais la meilleure façon de se représenter la zone de mémoire est à la manière d’un lac. Vous pouvez alors imaginer les transactions comme des poissons dans ce lac. Les transactions sont traîtées par des utilisateurs sur le réseau que l'on nomme mineurs. L'ordinateur d'un mineur "pêche" pour ainsi dire une transaction qu'il veut traiter depuis la zone de mémoire.
Le mineur peut traiter une transaction en un bloc en résolvant une sorte de puzzle crypté grâce à son ordinateur. On appelle cela le hashing. La transaction est immédiatemment ajoutée à la blockchain quand ce puzzle cryptographique est résolu. Cette transaction obtient alors une confirmation: la transaction a été traitée au sein d'un bloc.
Le premier mineur qui réussit à le faire obtient en échange une récompense sous la forme d'une quantité fixe d'éther, ainsi qu’une quantité variable. Les mineurs reçoivent de façon standardisée 3 éthers et peuvent recevoir une quantité variable d'éther en supplément. Cette récompense se nomme le "block reward".
En plus de ces éthers, le mineur récupère également des frais de transaction. Les frais de transaction sont une contribution volontaire pouvant être inclue à une transaction d'éther. Un mineur choisira plutôt une transaction ayant des frais de transaction plus élevés.
Etape 3: un mineur confirme la transaction
L'ordinateur du mineur a maintenant pris en compte la transaction de Marc, et traite la transaction dans un bloc. La transaction est alors dorénavant actée à travers une confirmation!
Le temps entre le placement de la transaction et le traîtement final de la transaction est appelé temps de confirmation. Dès que la transaction est complètement traîtée dans le réseau, elle est définitive. Ce temps de confirmation dure environ quinze secondes, mais peut lors de congestions sur le réseau avoir des délais plus importants. En octobre 2017 celle-ci durait par exemple 30 secondes.