Drzewo Merkle

Drzewo Merkle'a to struktura danych w postaci drzewa używana do podsumowywania i weryfikacji integralności dużych zbiorów danych, powszechnie stosowana w technologii blockchain.

Drzewa Merkle'a, znane również jako drzewa haszujące, są fundamentalnym elementem technologii blockchain. Skutecznie kodują i weryfikują integralność danych. Każdy węzeł liścia w drzewie reprezentuje hasz bloku danych, a każdy węzeł nielistny jest haszem jego węzłów potomnych. Ta struktura pozwala na efektywną weryfikację danych bez konieczności pobierania całego zbioru danych.

Korzeń drzewa Merkle'a, znany jako Merkle Root, służy jako pojedynczy odcisk palca dla całego zbioru danych. Porównując Merkle Root, można szybko ustalić, czy jakieś dane zostały zmienione. Jest to kluczowe dla zapewnienia bezpieczeństwa i niezmienności danych blockchain. Drzewa Merkle'a są używane w różnych aplikacjach blockchain, w tym Bitcoin i Ethereum, do efektywnego zarządzania i weryfikacji danych transakcji.

        graph LR
  Center["Drzewo Merkle"]:::main
  Pre_hashing["hashing"]:::pre --> Center
  click Pre_hashing "/terms/hashing"
  Pre_cryptography["cryptography"]:::pre --> Center
  click Pre_cryptography "/terms/cryptography"
  Pre_data_structures["data-structures"]:::pre --> Center
  click Pre_data_structures "/terms/data-structures"
  Rel_zero_knowledge_proof["zero-knowledge-proof"]:::related -.-> Center
  click Rel_zero_knowledge_proof "/terms/zero-knowledge-proof"
  Rel_object["object"]:::related -.-> Center
  click Rel_object "/terms/object"
  Rel_atomic_swap["atomic-swap"]:::related -.-> Center
  click Rel_atomic_swap "/terms/atomic-swap"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 Wyjaśnij jak 5-latkowi

Główna etykieta dla wszystkich pudełek.

🤓 Expert Deep Dive

Merkle Trees provide a cryptographic primitive for efficient set reconciliation and data verification in distributed systems. The security relies on the collision-resistance and one-way properties of the underlying [hash function](/pl/terms/hash-function) (e.g., SHA-256). A Merkle Proof consists of the sibling hashes along the path from a leaf to the root. The size of the proof is logarithmic with respect to the number of data blocks (O(log n)). This logarithmic complexity is crucial for scalability in systems with vast datasets. Variations exist, such as Merkle Patricia Trees (used in Ethereum), which incorporate key-value storage and allow for more complex state representation by hashing not just data blocks but also node pointers and intermediate states. Vulnerabilities can arise from weak hash functions or improper implementation, but a correctly constructed Merkle Tree offers strong guarantees against data tampering. The Merkle Root acts as a trust anchor for verifying entire datasets.

🔗 Powiązane terminy

📚 Źródła