You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You cache transactions but not their anchor's validity, which significantly reduces the gains from caching as you need to make a request for Merkle proofs anyways."
The text was updated successfully, but these errors were encountered:
I'll probably make a separate PR for this. The previous bdk_electrum rework that introduced validate_merkle_for_anchor() is reliant on transaction_get_merkle() to update our Header information in case of a reorg. Caching merkle proofs would mean that validate_merkle_for_anchor() will no longer be aware of reorgs and will may insert anchors for transactions that have been reorged out.
After discussion with Evan, our idea is that we should instead:
1.) Store the Header in CheckPoint (and use this as the cache). This way we can keep our Headers consistent throughout sync/scan instead of updating Headers inside validate_merkle_for_anchor().
2.) If we pull a fresh merkle proof and the information does not match up with its Header, we simply do not create an anchor and let the sync/scan continue.
"You cache transactions but not their anchor's validity, which significantly reduces the gains from caching as you need to make a request for Merkle proofs anyways."
The text was updated successfully, but these errors were encountered: