Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server serving incorrect merkle proofs for reorged block height #909

Closed
SomberNight opened this issue Oct 16, 2019 · 1 comment
Closed

Comments

@SomberNight
Copy link
Contributor

My server is returning incorrect merkle proofs for a block: https://blockstream.info/block/00000000000000000008fc27ad8c46149aa12bb12866fde846c93365591314f7 (height 599_587) (at the time, this was ~50 blocks from the tip).
The proofs are correct for the block before and the block after.

I checked in bitcoind, and there was a reorg at that height:

bitcoin-cli getchaintips
[
  {
    "height": 599642,
    "hash": "00000000000000000005ef3fa4bef253ea3be4892d3ebdc633b949aae5401923",
    "branchlen": 0,
    "status": "active"
  },
  {
    "height": 599587,
    "hash": "00000000000000000012e55a5c5b0464ceab40b29af6cacb4b02ef6cc009a4b4",
    "branchlen": 1,
    "status": "valid-fork"
  },
...

I think the server might be returning caches merkle proofs for this block height (corresponding to the old block). Although from a cursory look, it seems in case of a reorg the cache is invalidated.

@SomberNight
Copy link
Contributor Author

After restarting the server, it returns correct merkle proofs; furthering the cache theory.

kyuupichan pushed a commit that referenced this issue Mar 28, 2020
Fixes #909 and #969, hopefully properly this time
sidhujag pushed a commit to syscoin/electrumx that referenced this issue Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant