HTTPError: block was not found locally

Hi,
I’m learning Ceramic and following the “getting started” tutorial here. Daemon-one and daemon node seem to be running correctly. When running “composedb composite:from-model kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep --ceramic-url=http://localhost:7007 --output=my-first-composite.json” I got this error: “:heavy_multiplication_x: HTTP request to ‘http://localhost:7007/api/v0/streams/kjzl6hvfrbw6c6idaacw5d4gc481enpbeuv4fat66gjq1kk9ivtanadse0746dl?sync=0’ failed with status ‘Internal Server Error’: {“error”:“block was not found locally (offline)”}” and the node tells me this: " [2024-08-19T11:23:23.008Z] ERROR: Error while loading commit CID bagcqcerabqybp53aj7sv3diu34dgfuu3zjcggkzgbxgiylzwtganrx7qqzaq from IPFS for stream kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep: HTTPError: block was not found locally (offline)".

Can anyone tell me what’s happening and how I can solve the issue?

Txs in advance for your help.

Kr

it looks like the model kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep is not available on your node. What Model are you trying to deploy here? Where did you get that model streamid from?

Also, what ceramic network are you running your node on?

oh wait I see, that’s the model from our docs: Create your composite | Ceramic documentation

@mzk @Justina - we should probably make sure any models referenced in our docs are actually deployed on our bootstrap nodes so that they are available to the network.

@masteringethereumtes sorry for the confusion, it looks like that model got lost in the transition from kubo to ceramic-one. We’ll update the docs with a new Model that is available in the network to check out. In the meantime, you could try using this model instead: kjzl6hvfrbw6c7sv3cd7a9qagd18kcfmkqr8tn4gxmue8ielxk8cqssjagam2n6, which should be available on the clay testnet.

Thanks @spencer. I will check for any references and will make sure they are deployed on bootstrap nodes.

Hi @spencer , hi @Justina ,

First, for context: I’m not a developer and trying to get as far as I possibly can get :wink: I’m asking for your indulgence, I might ask very basic questions or make uninformed reasonings. Please don’t hesitate to guide me. :slight_smile:

Txs for your feedback.

The model you gave me functions, thanks. How can I find other model references that work? (the next step in the tutorial (your docs - getting started -create composite) is to combine multiple models in a composite).

Here is the source I used for the model refs: “composedb model:list --network=testnet-clay --table” (instruction from your docs - getting started -create composite). I tried multiple of them, but none worked. I then tried multiple models from “composedb model:list --table”. Again, none of them functioned either.

@spencer ,
I’m unsure where to find the info to answer your question about what ceramic network I’m running my node on. Is it in the daemon.config.json? If yes, I don’t see a “ceramic network” reference. Here is its content (I deleted all sensitive info):

{
“anchor”: {
“auth-method”: “did”
},
“http-api”: {
“cors-allowed-origins”: [
“.*”
],
“admin-dids”: [“did:key:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”]
},
“ipfs”: {
“mode”: “remote”,
“host”: “http://localhost:5101”,
“disable-peer-data-sync”: false
},
“logger”: {
“log-level”: 2,
“log-to-files”: false
},
“metrics”: {
“metrics-exporter-enabled”: false,
“metrics-publisher-enabled”: false
},
“network”: {
“name”: “testnet-clay”
},
“node”: {
“privateSeedUrl”: “inplace:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
},
“state-store”: {
“mode”: “fs”,
“local-directory”: “/Users/xxxxxxxxxx/.ceramic/statestore/”
},
“indexing”: {
“db”: “sqlite:///Users/xxxxxxxxxxxxxx/.ceramic/indexing.sqlite”,
“allow-queries-before-historical-sync”: true,
“disable-composedb”: false,
“enable-historical-sync”: false
}
}

Kr

No worries @masteringethereumtes, you are doing everything right and we are so happy to see you are learning about Ceramic. Your questions led to some fixes on our end which proves the point that there is no such thing as basic questions :slight_smile:

I have just updated the guide with model IDs that should be available for you (and everyone else on the network). They are deployed on a testnet-clay, the same network you are running. Would you be up for giving it a go and letting us know if you are facing any issues with pulling the models referenced in the guide?

As for models you get when you run the model-list command - just a little over a month ago we made a new exciting release of ceramic-one which brings a lot of performance improvements to the network. The vast majority of models that you get when you run the model-list command were deployed on the network prior to the release of ceramic-one. To make them available to everyone again, developers who created those models should re-deploy them using the nodes running on ceramic-one (and connected to bootstrap nodes that that Spencer mentioned above). I will check if there is anything that can be done on our end to make this transition easier (or at least to make it easier to find existing models, compatible with ceramic-one).

In the meantime, please don’t hesitate to let us know if there is anything we can help with to get you going with Ceramic! :star_struck:

1 Like

Txs @Justina , the updated model references allow to create the composites now.
In the next chapter “Interact with Data”, I got errors in GraphiQL that make me wonder if the suggested queries are aligned with the content of the updated models (cfr printscreen here below). Or am I doing something wrong?

You are completely right @masteringethereumtes, apologies for that. The updated posts model had a few additional fields. I just pushed the updates to the guide to address the changes.

Hi @Justina,
Txs for that.
In the meantime, I’m trying to launch the “Starter Application - Lit Protocol with ComposeDB”, but got the below error. Could it be related to a missing update related to the deployment of Ceramic-one? Or is this on my side (in which case I will continue the investigation on my own)?

Error when running “npm run dev”:
"
Ceramic daemon failed to start up:

Error: IPFS data missing! The CID bagcqceracoxlequko65mrotwada5jhxvkwbgb6aliufwr6uqg47t64wisfgq of pinned Stream kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 is missing from the local IPFS node. This means that pinned content has gone missing from the IPFS node. A ~/.jsipfs directory has been detected which may mean you have not completed the steps needed to upgrade to js-ceramic v2. Please follow the upgrade guide found here: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.. If that does not work check your IPFS node configuration and make sure it is pointing to the proper repo
"

Txs in advance for your feedback.
Kr

Hey @masteringethereumtes. I am guessing this might be related to the ceramic-one. @mzk, do you know if we are planning to update the existing examples for ceramic-one?

@masteringethereumtes, that error means you have run your Ceramic node previously and created data, but now your Ceramic node can’t find the underlying block data for some of your existing streams. One way this can happen is if you first run Ceramic with kubo as the underlying block storage, and then you switch to using ceramic-one, but don’t migrate the existing blocks from kubo to ceramic-one. In order to switch from kubo to C1 and preserve the existing data, there’s a migration process you need to run.

Or, if you don’t care about the existing data, you can delete your Ceramic state store (usually in ~/.ceramic/statestore) and indexing database (by default in ~/.ceramic/indexing.sqlite, unless you configured your node to use postgres in which case you’d need to clear out the postgres storage). Deleting the state store and indexing database should reset you to a clean state and allow the node to start up.