0Pricing
Web3 & DApp Development Fundamentals · Lekcja

Cykl życia transakcji

Od podpisania do wydobycia

Cykl życia transakcji to bezpłatna lekcja Web3 & DApp Development Fundamentals na CoddyKit. To lekcja 2 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Web3 & DApp Development Fundamentals, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Web3 & DApp Development Fundamentals zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

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.

Często zadawane pytania

Czy lekcja „Cykl życia transakcji” jest bezpłatna?

Tak — pełny tekst „Cykl życia transakcji” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Web3 & DApp Development Fundamentals, przejdź na CoddyKit PRO. Kurs Web3 & DApp Development Fundamentals zawiera 4 lekcji w sumie.

Co nauczysz się w „Cykl życia transakcji”?

Od podpisania do wydobycia Ćwiczysz Web3 & DApp Development Fundamentals z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć Web3 & DApp Development Fundamentals?

Nie wymagamy żadnego doświadczenia. Web3 & DApp Development Fundamentals w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 2 z 4.

Ile czasu zajmuje lekcja „Cykl życia transakcji”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji Web3 & DApp Development Fundamentals?

Tak. Każda lekcja Web3 & DApp Development Fundamentals zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Czym jest gas
  2. Cykl życia transakcji
  3. Limity i opłaty gas
  4. Nonce i kolejność
← Powrót do Web3 & DApp Development Fundamentals