Skip to content

Commit 68a895e

Browse files
committed
add better merkle tree explanation
1 parent 44bc497 commit 68a895e

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/components/CodeBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22

33
const CodeBlock = ({ code }) => {
44
return (
5-
<div className="bg-gray-800 text-white text-sm sm:text-md p-4 rounded-md overflow-x-auto shadow-md">
5+
<div className="bg-gray-900 text-white text-sm sm:text-md p-4 rounded-md overflow-x-auto shadow-md">
66
<pre>
77
<code>{code}</code>
88
</pre>

src/components/Intro.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
FaCoins,
77
FaLightbulb,
88
FaCode,
9+
FaCubes,
910
} from "react-icons/fa";
1011
import merkletree from "../assets/merkle-trees-and-proofs.png"; // Ensure the path is correct
1112

@@ -140,22 +141,39 @@ const ProjectIntroduction = ({ className }) => {
140141
{/* Diagram or Additional Information */}
141142
<div className="bg-white p-4 rounded-md shadow-md">
142143
<h3 className="flex items-center text-xl sm:text-2xl font-bold mb-4 bg-gray-100 text-black px-3 py-1 rounded-md border-1 border-gray-200 hover:bg-gray-300 transition-colors duration-300 shadow">
143-
<FaCode className="mr-2 text-green-400" />
144+
<FaCubes className="mr-2 text-green-400" />
144145
Understanding Merkle Trees
145146
</h3>
146147
<img
147148
src={merkletree}
148149
alt="Merkle Tree Diagram"
149150
className="w-full h-auto mb-4 rounded-md"
150151
/>
151-
<p className="text-md sm:text-lg leading-relaxed">
152+
<p className="text-md leading-relaxed">
152153
Merkle trees are a fundamental component of blockchain
153154
technology, providing a way to efficiently verify data
154155
integrity. Each leaf node represents a block of data, and parent
155156
nodes are hashes of their respective child nodes. This structure
156157
allows for quick verification of any individual piece of data
157158
within the tree.
158159
</p>
160+
<p className="text-md leading-relaxed mt-4">
161+
In the context of STAC (SpatioTemporal Asset Catalog), Merkle
162+
trees enable the verification of entire catalogs, collections,
163+
and items by deriving a root hash that represents all underlying
164+
elements. The root hash is computed by recursively hashing
165+
metadata from all related items, collections, and catalogs in
166+
ascending order. This ensures that even a small change in any
167+
underlying component will result in a completely different root
168+
hash, making tampering easily detectable.
169+
</p>
170+
<p className="text-md leading-relaxed mt-4">
171+
Using this approach, users can validate the integrity and
172+
provenance of STAC data, ensuring it has not been altered or
173+
corrupted. The root hash acts as a cryptographic fingerprint for
174+
the entire dataset, providing confidence in the reliability of
175+
the geospatial information.
176+
</p>
159177
</div>
160178
</div>
161179
</div>

0 commit comments

Comments
 (0)