Web3 & DApp Development Fundamentals · Ders

Blok Zincirinde Karma Alma

Karmalarla değişmezlik

3. ders / 413 adım

Blok Zincirinde Karma Alma, CoddyKit'te ücretsiz bir Web3 & DApp Development Fundamentals dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Web3 & DApp Development Fundamentals öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Web3 & DApp Development Fundamentals kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

What Is a Hash Function?

A hash function takes any input and produces a fixed-size output called a digest or hash.

Blockchains rely on cryptographic hash functions like SHA-256 (Bitcoin) and Keccak-256 (Ethereum).

sha256("hello") =
  2cf24dba5fb0a30e26e83b2ac5b9e29e
  1b161e5c1fa7425e73043362938b9824

Deterministic Output

Hashing is deterministic: the same input always yields the same output.

This lets any node independently verify a hash and arrive at the identical result — essential for distributed agreement.

The Avalanche Effect

A tiny change in the input produces a completely different hash. This is the avalanche effect.

Notice how changing one letter changes the entire digest:

sha256("blockchain") -> ef7797e13d3a...
sha256("Blockchain") -> 3f1d8b9c2a04...
(totally different)

Fixed Output Size

No matter how large the input, the output is always the same length. SHA-256 always returns 256 bits (64 hex characters).

This makes hashes convenient, compact identifiers for blocks, transactions, and state.

Preimage Resistance

A good hash function is one-way: given a hash, you cannot feasibly find the input that produced it.

This preimage resistance is why hashes can safely commit to data without revealing it.

Collision Resistance

Collision resistance means it is infeasible to find two different inputs with the same hash.

If collisions were easy, an attacker could swap one block or transaction for another that shares the same hash — destroying the chain's integrity.

Hashes Create the Chain Link

Recall that each block stores the hash of the previous block. Because hashing is deterministic and collision-resistant, this link is secure.

Altering an old block changes its hash, breaking the chain at that point.

block.hash = keccak256(
    block.previousHash +
    block.merkleRoot +
    block.timestamp +
    block.nonce
)

Immutability Through Hashing

Immutability emerges from chained hashes. To change block 100, you must recompute block 100's hash, then 101, 102, and every block after it.

In a proof-of-work chain, that also means redoing all of their mining — practically impossible.

Hash Pointers

A hash pointer is a reference to data plus the hash of that data. If the data is tampered with, the stored hash no longer matches.

Blockchains are essentially linked lists built from hash pointers.

struct HashPointer {
    location: address-of-block
    hash:     expected-hash-of-block
}

Addresses and Hashing

Hashing also generates account addresses. An Ethereum address is derived by hashing the public key with Keccak-256 and keeping the last 20 bytes.

So hashing is woven through identity as well as integrity.

address = last20bytes(
    keccak256(publicKey)
)

Putting It Together

Cryptographic hashing gives blockchains their core guarantees: deterministic verification, tamper-evidence, compact identifiers, and immutability.

Every block link, Merkle root, and address depends on it.

Quick Check

Test your hashing knowledge.

Recap: Hashing in Blockchain

You learned that:

  • Hash functions are deterministic and produce fixed-size output
  • The avalanche effect means tiny changes alter the whole hash
  • Preimage and collision resistance secure the chain
  • Chained hashes create immutability

Next: how this data is shared across a distributed ledger.

Başlamak ücretsiz

Yapay zeka eğitmeniyle Web3 & DApp Development Fundamentals öğren — ücretsiz

Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.

Kurslar
29
Dersler
105

Sıkça Sorulan Sorular

“Blok Zincirinde Karma Alma” dersi ücretsiz mi?

Evet — “Blok Zincirinde Karma Alma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Web3 & DApp Development Fundamentals kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Web3 & DApp Development Fundamentals kursu toplamda 4 dersten oluşur.

“Blok Zincirinde Karma Alma” dersinde ne öğreneceğim?

Karmalarla değişmezlik Web3 & DApp Development Fundamentals ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Web3 & DApp Development Fundamentals öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Web3 & DApp Development Fundamentals, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.

“Blok Zincirinde Karma Alma” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Web3 & DApp Development Fundamentals dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Web3 & DApp Development Fundamentals dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Bloklar ve Zincirler
  2. Merkle Ağaçları
  3. Blok Zincirinde Karma Alma
  4. Dağıtık Defterler
← Web3 & DApp Development Fundamentals Sayfasına Dön