0Pricing
Web3 & DApp Development Fundamentals · Leçon

Cycle de vie d’une transaction

De la signature au minage

Cycle de vie d’une transaction est une leçon Web3 & DApp Development Fundamentals gratuite sur CoddyKit. Ceci est la leçon 2 sur 4. Tu peux lire la leçon complète ci-dessous gratuitement — puis la pratiquer en direct dans le navigateur avec un éditeur de code intégré et un tuteur IA 24/7. Elle fait partie du parcours d'apprentissage Web3 & DApp Development Fundamentals, et ta progression se synchronise sur le web et l'application CoddyKit. Le cours Web3 & DApp Development Fundamentals comprend 4 leçons au total.

Certaines parties de cette leçon n'ont pas encore été traduites et s'affichent en anglais.

From Click to Confirmation

When you send a transaction, a lot happens behind the scenes before it becomes permanent.

This lesson walks through the full transaction lifecycle, from signing to inclusion in a block.

Step 1: Building the Transaction

Your wallet assembles a transaction object containing the recipient, value, data, gas settings, and a nonce.

tx = {
  to:    0xRecipient...,
  value: 1000000000000000000, // 1 ETH
  nonce: 7,
  gasLimit: 21000,
  maxFeePerGas: 30 gwei
}

Step 2: Signing

The wallet signs the transaction with your private key, producing a digital signature.

The signature proves you authorized it without ever revealing your private key. Anyone can verify it using your public address.

Step 3: Broadcasting

The signed transaction is broadcast to a node, which validates it and gossips it to peers across the network.

Within seconds, nodes everywhere know about your pending transaction.

Step 4: The Mempool

Pending transactions wait in the mempool (memory pool) — a holding area for transactions not yet included in a block.

Validators pick from the mempool when building the next block.

mempool (pending):
  tx A  (tip: 5 gwei)
  tx B  (tip: 2 gwei)
  tx C  (tip: 8 gwei)  <- picked first

Step 5: Selection by a Validator

A validator building a block selects transactions, usually favoring higher fee tips for more revenue.

Paying a higher tip can speed up inclusion, especially when the network is congested.

Step 6: Execution

The validator executes the transaction on the EVM, updating account balances and contract state, consuming gas as it goes.

If it runs out of gas or hits an error, it reverts — but the gas spent is still consumed.

Step 7: Inclusion in a Block

The executed transaction is packed into a new block along with others. The block is proposed and attested to by validators.

At this point your transaction has one confirmation.

Step 8: Confirmations and Finality

As more blocks build on top, your transaction gains confirmations. On Ethereum PoS, it eventually becomes finalized and irreversible.

Now the transfer or contract call is permanently settled.

Receipts

After execution, the network produces a transaction receipt recording status (success or revert), gas used, and any emitted events (logs).

Apps read receipts to confirm what actually happened on-chain.

receipt = {
  status: 1,        // 1 = success, 0 = revert
  gasUsed: 21000,
  blockNumber: 18250431,
  logs: [ ... ]
}

Putting It Together

A transaction is built, signed, broadcast, queued in the mempool, selected and executed by a validator, included in a block, and finally confirmed and finalized.

A receipt records the outcome.

Quick Check

Test your understanding of the lifecycle.

Recap: Transaction Lifecycle

You learned the stages:

  • Build and sign with the private key
  • Broadcast to the network
  • Wait in the mempool
  • Selected, executed, and included in a block
  • Confirmed and finalized, with a receipt

Next: gas limits and fees.

Questions Fréquemment Posées

La leçon « Cycle de vie d’une transaction » est-elle gratuite ?

Oui — le texte complet de « Cycle de vie d’une transaction » est gratuit à lire ici sur le web. Pour la pratiquer de manière interactive (un éditeur de code intégré et un tuteur IA 24/7) et déverrouiller le reste du cours Web3 & DApp Development Fundamentals, passe à CoddyKit PRO. Le cours Web3 & DApp Development Fundamentals comprend 4 leçons au total.

Qu'est-ce que j'apprendrai dans « Cycle de vie d’une transaction » ?

De la signature au minage Tu pratiques Web3 & DApp Development Fundamentals avec du code pratique que tu exécutes directement dans le navigateur, et un tuteur IA 24/7 répond à tes questions au fur et à mesure que tu avances dans la leçon.

Dois-je avoir de l'expérience pour commencer Web3 & DApp Development Fundamentals ?

Aucune expérience préalable n'est requise. Web3 & DApp Development Fundamentals sur CoddyKit est structuré pour les débutants jusqu'aux apprenants avancés, donc tu peux commencer ici ou depuis le début et avancer à ton rythme. Ceci est la leçon 2 sur 4.

Combien de temps prend la leçon « Cycle de vie d’une transaction » ?

La plupart des leçons CoddyKit prennent environ 5–10 minutes. Chacune est courte et interactive, tu progresses régulièrement et tu repiques exactement où tu t'es arrêté sur le web et l'app.

Peux-tu écrire et exécuter du code dans cette leçon Web3 & DApp Development Fundamentals ?

Oui. Chaque leçon Web3 & DApp Development Fundamentals inclut un éditeur de code intégré, tu écris et exécutes du vrai code directement dans ton navigateur et tu reçois des retours IA instantanés — aucune configuration locale requise.

Toutes les leçons de ce cours

  1. Qu’est-ce que le gas
  2. Cycle de vie d’une transaction
  3. Limites et frais de gas
  4. Nonces et ordonnancement
← Retour à Web3 & DApp Development Fundamentals