<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>abyssssssea</title>
        <link>https://paragraph.com/@abyssssssea</link>
        <description>undefined</description>
        <lastBuildDate>Thu, 14 May 2026 13:55:15 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>abyssssssea</title>
            <url>https://storage.googleapis.com/papyrus_images/fe59d6dc529129e75bff3bfeb77cd0aeef8066194d06e974c92e54160b199fda.jpg</url>
            <link>https://paragraph.com/@abyssssssea</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[默克尔树]]></title>
            <link>https://paragraph.com/@abyssssssea/daBnvtnIiEbkjFpvTA9V</link>
            <guid>daBnvtnIiEbkjFpvTA9V</guid>
            <pubDate>Sat, 12 Nov 2022 14:59:20 GMT</pubDate>
            <description><![CDATA[第一篇文章，写点基础知识吧 默克尔树又称哈希树，一种树形结构，被广泛应用于密码学相关领域。 特点：叶子节点除了包含数据之外，还包含自身的哈希根节点和中间节点的哈希是通过他们的孩子计算而来数据结构：struct Node { uint val; string hash; Node[] children; } 可以利用这个特点，来快速验证一组数据的正确性。 下面列几个常见的应用。图取自wiki1. 快速验证数据是否正确把数据都存储在最下层的叶子节点，即 L1 ~ L4， 因为根节点和中间节点的哈希都是根据叶子节点计算而来，所以只比较根节点，就能快速判断数据的正确性。2. 快速定位有问题的数据在根节点不一致时，我们逐级往下查找子节点不一致的地方，能以 O(lgN) 的时间找到出问题的节点。]]></description>
            <content:encoded><![CDATA[<p><em>第一篇文章，写点基础知识吧</em></p><p>默克尔树又称哈希树，一种树形结构，被广泛应用于密码学相关领域。</p><p>特点：</p><ul><li><p>叶子节点除了包含数据之外，还包含自身的哈希</p></li><li><p>根节点和中间节点的哈希是通过他们的孩子计算而来</p></li></ul><p>数据结构：</p><pre data-type="codeBlock" text="struct Node {
  uint val;
  string hash;
  Node[] children;
}
"><code>struct Node {
  uint val<span class="hljs-comment">;</span>
  string hash<span class="hljs-comment">;</span>
  Node<span class="hljs-section">[]</span> children<span class="hljs-comment">;</span>
}
</code></pre><p>可以利用这个特点，来快速验证一组数据的正确性。</p><p>下面列几个常见的应用。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7e75b5dcf832408b1fa6031a69a299520475a9d66a81557021cbec3e678449bf.png" alt="图取自wiki" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">图取自wiki</figcaption></figure><h3 id="h-1" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">1. 快速验证数据是否正确</h3><p>把数据都存储在最下层的叶子节点，即 L1 ~ L4， 因为根节点和中间节点的哈希都是根据叶子节点计算而来，所以只比较根节点，就能快速判断数据的正确性。</p><h3 id="h-2" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2. 快速定位有问题的数据</h3><p>在根节点不一致时，我们逐级往下查找子节点不一致的地方，能以 O(lgN) 的时间找到出问题的节点。</p>]]></content:encoded>
            <author>abyssssssea@newsletter.paragraph.com (abyssssssea)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/6fc4c830221f6e4a65ec7b2d30e1a92f12635a6233fce499e8414286cc461b4e.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>