Finalidad y forks
Acuerdo de la cadena
Finalidad y forks es una lección gratuita de Web3 & DApp Development Fundamentals en CoddyKit. Esta es la lección 4 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Web3 & DApp Development Fundamentals, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Web3 & DApp Development Fundamentals incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
When Is a Block Final?
Adding a block is not the same as it being permanent. Finality is the guarantee that a block can no longer be reverted.
Understanding finality and forks is key to knowing when a transaction is truly settled.
What Is a Fork?
A fork occurs when the chain temporarily splits into two competing branches — for example, when two valid blocks appear at nearly the same time.
The network must decide which branch becomes the official history.
Block 9
|
+-- Block 10a (branch A)
|
+-- Block 10b (branch B)
Which one wins?The Fork Choice Rule
A fork choice rule tells nodes which branch to follow. PoW chains often use the longest (heaviest) chain rule.
Whichever branch accumulates the most work or attestations becomes canonical.
Orphaned and Stale Blocks
The losing branch's blocks become orphaned (or stale). Their transactions return to the mempool to be included in a future block.
This is why a single confirmation is not yet fully safe.
Probabilistic Finality
In PoW, finality is probabilistic: the more blocks built on top of yours, the less likely it can be reversed.
Each additional confirmation makes a reversal exponentially harder. Bitcoin users often wait for 6 confirmations.
tx in Block 100:
+1 block -> low confidence
+6 blocks -> very high confidence
reversal cost grows exponentiallyAbsolute Finality
Some PoS systems offer absolute (deterministic) finality: once a block is finalized by validator votes, it can never be reverted without massive slashing.
This gives a clear, hard cutoff instead of waiting for probabilities to improve.
Finality in Ethereum PoS
Ethereum groups slots into epochs. After two epochs of supermajority attestations, blocks become finalized.
Reverting a finalized block would require burning at least one-third of all staked ETH.
Soft Forks
A soft fork is a backward-compatible rule change: blocks valid under the new rules are still valid under the old ones.
Non-upgraded nodes can still follow the chain, so soft forks are less disruptive.
Hard Forks
A hard fork is a backward-incompatible change. Nodes must upgrade, or they will reject the new blocks.
If the community disagrees, a hard fork can permanently split one chain into two (for example, Ethereum and Ethereum Classic).
Reorganizations
A reorg happens when nodes switch from one branch to a longer competing branch, replacing recently accepted blocks.
Small reorgs are normal near the chain tip; deep reorgs are a serious security concern.
Putting It Together
Forks are temporary disagreements resolved by a fork choice rule. Finality tells us when a block is safe: probabilistic in PoW, often absolute in PoS.
Soft and hard forks describe how rules themselves change over time.
Quick Check
Test your understanding of finality and forks.
Recap: Finality and Forks
You learned that:
- A fork is a temporary split resolved by a fork choice rule
- Losing blocks become orphaned
- PoW gives probabilistic finality; PoS can give absolute finality
- Soft forks are compatible; hard forks are not
Next course: gas and transactions.
Preguntas frecuentes
¿La lección «Finalidad y forks» es gratis?
Sí — el texto completo de «Finalidad y forks» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Web3 & DApp Development Fundamentals, actualiza a CoddyKit PRO. El curso de Web3 & DApp Development Fundamentals incluye 4 lecciones en total.
¿Qué aprenderé en «Finalidad y forks»?
Acuerdo de la cadena Practicas Web3 & DApp Development Fundamentals con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Web3 & DApp Development Fundamentals?
No se requiere experiencia previa. Web3 & DApp Development Fundamentals en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 4 de 4.
¿Cuánto tiempo toma la lección «Finalidad y forks»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Web3 & DApp Development Fundamentals?
Sí. Cada lección de Web3 & DApp Development Fundamentals incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Prueba de trabajo
- Prueba de participación
- Otros mecanismos
- Finalidad y forks