hypercore-protocol / p2p-indexing-and-search

Getting started with P2P indexing and search using the Hypercore Protocol
MIT License
82 stars 16 forks source link

Remote hypercores of exercises 6, 8 and 14 are no longer being seeded #8

Open HDegroote opened 3 years ago

HDegroote commented 3 years ago

The remote hypercores used in exercise 6, 8 and 14 are no longer being seeded, so these exercises cannot be completed. (see also https://github.com/hypercore-protocol/p2p-indexing-and-search/issues/5 )

I think this tutorial is a great way to get started with the hypercore stack (as far as I'm aware it's even the only tutorial), so I wouldn't mind seeding these three drives if @andrewosh still has them lying around and can seed them for a moment so I can sync with them.

The cores I'm talking about are:

Ex 6: 309ba1736cc5af2940fc9fb03d256547b78ca9972ce4398648a7d7782d31ad4b Ex 8: ebcd9b99efb4ba8661076dd7e7a886cc5380a3f5998f16bfeeaaecfe0885de4a Ex 14: 1444f69f7a541e532f762c8f8847e14cc05c8b6b25886e333bc8e86e882f1033

I observed two behaviours: printing the core information either says the core is empty, or an internal error is thrown from hyperspace:

   {
      statsCore: RemoteHypercore(
        key: 309ba1736cc5af2940fc9fb03d256547b78ca9972ce4398648a7d7782d31ad4b
        discoveryKey: a33d9da0369f1d04200b81b815d4e4e1f03086532d5555aca5623fddbb682c3b
        opened: true
        writable: false
        length: 0
        byteLength: 0
        peers: 0
      )
    }
    length: 0
    ***path_to_dev_dir***/node_modules/@hyperspace/rpc/index.js:11
        const err = new Error(message)
                    ^

    Error: ELOCKED: File is locked
        at Object.decode ( ***path_to_dev_dir***/node_modules/@hyperspace/rpc/index.js:11:17)
        at RPC._onmessage ( ***path_to_dev_dir***/workshop/node_modules/arpeecee/index.js:113:33)
        at Parser._nextState  ***path_to_dev_dir***/node_modules/arpeecee/parser.js:127:14)
        at Parser._readMessage ( ***path_to_dev_dir***/node_modules/arpeecee/parser.js:54:19)
        at Parser.recv ( ***path_to_dev_dir***/node_modules/arpeecee/parser.js:35:44)
        at RPC._write ( ***path_to_dev_dir***/node_modules/arpeecee/index.js:170:22)
        at WritableState.update ( ***path_to_dev_dir***/node_modules/streamx/index.js:168:14)
        at updateWriteNT ( ***path_to_dev_dir***/node_modules/streamx/index.js:479:6)
        at processTicksAndRejections (node:internal/process/task_queues:82:21) {
      code: 'ELOCKED',
      errno: 0,
      details: ''
    }

Version info: hyperspace/3.19.0 linux-x64 node-v16.1.0 hyperdrive-daemon/1.14.5 linux-x64 node-v16.1.0

tony-go commented 3 years ago

I have the same issue ^^

saimonmoore commented 2 years ago

@andrewosh any chance these can be fixed? (I know you're busy these days) 🙏

andrewosh commented 2 years ago

Really wish we had an up-to-date and seeded workshop like this, but alas this one will require some work to bring up to speed. It's not just the datasets: Hyperspace is no longer maintained and isn't a part of the latest Hypercore stack, Corestore has gone through some API changes, etc...

For the upcoming Holepunch release we're gonna be doing a big dev docs push, so we'll have lots to play with then. In the meantime the dataset can be regenerated pretty easily by periodically dumping output from https://github.com/mafintosh/process-top into a Hypercore -- a good exercise in itself :)

saimonmoore commented 2 years ago

ok cool. I might try that :)

But then this whole exercise is out of date too then?

saimonmoore commented 2 years ago

Ah nm...I see you are implicitly saying that...

saimonmoore commented 2 years ago

I'll just focus on the actual logic behind it which can't have changed much. Thanks in any case.

saimonmoore commented 2 years ago

"For the upcoming Holepunch release we're gonna be doing a big dev docs push, so we'll have lots to play with then."

Can't wait!