0Pricing
Web3 & DApp Development Fundamentals · Aula

Ciclo de vida de uma transação

Da assinatura à mineração

Ciclo de vida de uma transação é uma aula grátis de Web3 & DApp Development Fundamentals no CoddyKit. Esta é a aula 2 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Web3 & DApp Development Fundamentals, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Web3 & DApp Development Fundamentals inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

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.

Perguntas Frequentes

A aula “Ciclo de vida de uma transação” é grátis?

Sim — o texto completo de “Ciclo de vida de uma transação” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Web3 & DApp Development Fundamentals, atualize para CoddyKit PRO. O curso de Web3 & DApp Development Fundamentals inclui 4 aulas no total.

O que vou aprender em “Ciclo de vida de uma transação”?

Da assinatura à mineração Você pratica Web3 & DApp Development Fundamentals com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Web3 & DApp Development Fundamentals?

Nenhuma experiência prévia é necessária. Web3 & DApp Development Fundamentals no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 2 de 4.

Quanto tempo leva a aula “Ciclo de vida de uma transação”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Web3 & DApp Development Fundamentals?

Sim. Cada aula de Web3 & DApp Development Fundamentals inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. O que é gas
  2. Ciclo de vida de uma transação
  3. Limites e taxas de gas
  4. Nonces e ordenação
← Voltar para Web3 & DApp Development Fundamentals