You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Utreexo累加器中UTXO证明在结构变更后的有效性问题咨询

Understanding Utreexo Proof Validity After State Changes

Great question—you’ve hit on a key nuance of Utreexo’s design that trips up a lot of folks at first. Let’s break this down clearly:

Why Your Old Proof Stops Working

Utreexo’s proof is essentially a Merkle path that pinpoints a UTXO’s position in one of the forest’s trees. The problem is, this path is tightly tied to the exact state of the forest when you generated it. When you run add or remove operations:

  • add can merge smaller trees into larger ones, or spin up new trees, which rewrites parent-child relationships across nodes.
  • remove replaces nodes along the deleted UTXO’s path with nullifiers, and may split large trees back into smaller ones if they’re no longer full.

All these changes break the Merkle path your old proof relies on, so running verify with it against the updated accumulator will naturally return false. This isn’t a bug—it’s a deliberate tradeoff for Utreexo’s core goal: efficient UTXO set management, especially for light clients.

How to Fix This

Utreexo has built-in patterns to handle proof validity across state changes. Here are the most common approaches:

1. Update Your Proof Incrementally

If you need to keep a proof valid over multiple state changes, you can update it using the "delta" information from each add/remove operation. Utreexo’s accumulator (acc) emits metadata about tree merges, splits, and node updates after every operation. You can use this metadata to adjust the hashes in your existing Merkle path, keeping it aligned with the current forest state.

2. Combine Old Proofs With Deletion Witnesses

If you only have an old proof but need to verify the UTXO exists in the current state, you can use deletion witnesses. These are proofs of all the remove operations that happened between the old state and the current one. By checking that your UTXO wasn’t included in any of those deletion proofs, you can confirm it’s still present—even with the old Merkle path, paired with these witnesses.

3. Re-Fetch the Latest Proof (The Simplest Fix)

If your use case allows it, the easiest solution is to just request a fresh proof from the current Utreexo accumulator. For example, in a light client scenario, you’d send a request to a full node asking for the latest proof of your UTXO. This avoids having to track state deltas or manage witnesses entirely.

Key Takeaway

Utreexo proofs aren’t meant to be permanent—they’re snapshots tied to a specific forest state. To validate a UTXO after state changes, you either need to update your existing proof, pair it with deletion witnesses, or grab a new proof. This tradeoff is what lets Utreexo keep storage costs low and operations fast, which is critical for scaling Bitcoin-like systems.

内容的提问来源于stack exchange,提问作者gabbi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 17:02:29