-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
67386ec
to
495aec3
Compare
faa2a4f
to
3cf934c
Compare
// Not all data in the blockstore is traversable, e.g. | ||
// Wasm bytecode is inserted as IPLD_RAW here: https://github.com/filecoin-project/builtin-actors-bundler/blob/bf6847b2276ee8e4e17f8336f2eb5ab2fce1d853/src/lib.rs#L54C71-L54C79 | ||
if cid.codec() == DAG_CBOR { | ||
// XXX: Is it okay to panic? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are snapshots only read when starting up the peer? If this is the case I think it is OK to panic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are looking at the code from @cryptoAtwill that streams the blockstore DAG. The stream either returns a pair of Some
CID and content, or None
to show that it's finished, but there is no way to signal errors.
There was a problem with it (I can't remember now how it manifested itself exactly - something about EOF) when I tried to export the data that the genesis put in place, because the Wasm files are aren't actual IPLD data structures, so the .unwrap()
at line 223 panicked. I think that every encoded by DAG_CBOR
was placed by ourselves in this part of the code, so it should be okay to panic, it should parse.
To answer your question: this isn't happening when we start the peer, this is happening at regular intervals when we are exporting the snapshots from the store.
30997f1
to
2fe0151
Compare
3cf934c
to
5671362
Compare
Closes consensus-shipyard/ipc#181
manifest.json