hypercore icon indicating copy to clipboard operation
hypercore copied to clipboard

Resolving "No proof available" Error

Open FreddieRidell opened this issue 7 years ago β€’ 10 comments

I've recently started seeing a lot of "No proof available for this index" errors being created while trying to replicate a hyperdb using hyperswarm.

The error is being created here: https://github.com/mafintosh/hypercore/blob/547a68ce2a32a9be58a2c85327465191b5a41c70/index.js#L402

I'm not enteirly sure what's causing this, as I don't believe I'm doing anything that could be damaging the integrity of the underlying hypercores.

Do you have any advice on what causes this error, and how it could be prevented/mitigated/recovered from?

PS. I really love all the hyper-suite of packages, Dat, Beaker and the work being done here! Thanks so much for your contibutions and I'm looking forward to multi-writer Dat 😁

FreddieRidell avatar Jan 18 '19 12:01 FreddieRidell

Which version of hypercore are you using? On Fri, 18 Jan 2019 at 13.29, Freddie Ridell [email protected] wrote:

I've recently started seeing a lot of "No proof available for this index" errors being created while trying to replicate a hyperdb https://github.com/mafintosh/hyperdb using hyperswarm https://github.com/hyperswarm/network.

The error is being created here: https://github.com/mafintosh/hypercore/blob/547a68ce2a32a9be58a2c85327465191b5a41c70/index.js#L402

I'm not enteirly sure what's causing this, as I don't believe I'm doing anything that could be damaging the integrity of the underlying hypercores.

Do you have any advice on what causes this error, and how it could be prevented/mitigated/recovered from?

PS. I really love all the hyper-suite of packages, Dat, Beaker and the work being done here! Thanks so much for your contibutions and I'm looking forward to multi-writer Dat 😁

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mafintosh/hypercore/issues/191, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW_VdgSfTpfbNzupvJztcVnoTFJCapiks5vEb4WgaJpZM4aH0WT .

mafintosh avatar Jan 18 '19 12:01 mafintosh

6.22.4

FreddieRidell avatar Jan 18 '19 16:01 FreddieRidell

Oh that’s weird then! Do you have an example or something to help me debug this? That should def not happen

mafintosh avatar Jan 18 '19 16:01 mafintosh

Actually just realised that the 6.22.4 has to run on the receiving peer for the bugfix to work. Do you know if that is the case here? Still a test case or example would be great to fix this otherwise :)

mafintosh avatar Jan 18 '19 17:01 mafintosh

This has unfortunately been quite an intermittent bug, probably caused by bad socket connections between replicating hyperdbs. If I can reproduce the issue I'll tar up my data and post it here?

FreddieRidell avatar Jan 21 '19 18:01 FreddieRidell

Yea that would be great, thanks On Mon, 21 Jan 2019 at 19.14, Freddie Ridell [email protected] wrote:

This has unfortunately been quite an intermittent bug, probably caused by bad socket connections between replicating hyperdbs. If I can reproduce the issue I'll tar up my data and post it here?

β€” You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mafintosh/hypercore/issues/191#issuecomment-456160115, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW_VTSurHTg36T8oY_JX9N9jmI654Slks5vFgN_gaJpZM4aH0WT .

mafintosh avatar Jan 21 '19 18:01 mafintosh

Ok, I've got a reproduction. I have a hyperdb replicated between two peers:

  • My laptop, where it was created
  • My server, where it was immediately authorized and replicated to.

I replicated it using https://github.com/mafintosh/discovery-swarm and now when I try to replicate them again my laptop fails with the following error:

Error: No proof available for this index
    at Feed.proof (/home/freddie/.config/yarn/global/node_modules/hypercore/index.js:402:25)
    at Peer.onrequest (/home/freddie/.config/yarn/global/node_modules/hypercore/lib/replicate.js:130:13)
    at Feed._emit (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/feed.js:182:32)
    at Feed._onmessage (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/feed.js:162:10)
    at Protocol._onmessage (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/index.js:344:6)
    at Protocol._parseMessage (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/index.js:393:10)
    at Protocol._parse (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/index.js:358:37)
    at Protocol._write (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/index.js:265:8)
    at doWrite (/home/freddie/.config/yarn/global/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer (/home/freddie/.config/yarn/global/node_modules/readable-stream/lib/_stream_writable.js:417:5)
Emitted 'error' event at:
    at errorOrDestroy (internal/streams/destroy.js:98:12)
    at Protocol.onerror (_stream_readable.js:717:7)
    at Protocol.emit (events.js:197:13)
    at Protocol.destroy (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/index.js:227:17)
    at Feed.destroy (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/feed.js:92:15)
    at Peer.destroy (/home/freddie/.config/yarn/global/node_modules/hypercore/lib/replicate.js:400:15)
    at onproof (/home/freddie/.config/yarn/global/node_modules/hypercore/lib/replicate.js:133:26)
    at Feed.proof (/home/freddie/.config/yarn/global/node_modules/hypercore/index.js:402:22)
    at Peer.onrequest (/home/freddie/.config/yarn/global/node_modules/hypercore/lib/replicate.js:130:13)
    at Feed._emit (/home/freddie/.config/yarn/global/node_modules/hypercore-protocol/feed.js:182:32)

the files from my laptop: https://send.firefox.com/download/6113755815/#tGDBtTpykxugmFkmCcSQ_A the files from my server: https://send.firefox.com/download/6cc51092a4/#QH2IycW9d1i_eoPc5EbfUA

They contain semi-personal info, so these links expire in 24 hours, I can re-upload if needed :)

Thanks for your help

FreddieRidell avatar Jan 28 '19 20:01 FreddieRidell

@FreddieRidell thanks, i downloaded the files. will try and repro over the weekend

mafintosh avatar Jan 29 '19 13:01 mafintosh

I am also running into this error when i move the hyperdb from one machine to another behind different routers on different networks. This actually ended up being a problem with me running two different versions of hyperdb that were not compatible.

wellsmt avatar Feb 19 '19 22:02 wellsmt

Closing cause old and lots have changed

mafintosh avatar Aug 15 '22 13:08 mafintosh