n0-computer / beetle

Other
34 stars 15 forks source link

Ipfs add broken on main #41

Closed rklaehn closed 1 year ago

rklaehn commented 1 year ago

I was doing some checks on n0-computer/iroh#603 to see if a hamt directory would appear on the gateway. It does not. But it seems that directory adding on main is also broken.

I created a directory and tried to add it on main.

iroh on  main [$?] via 🦀 v1.65.0 
❯ cargo run -p iroh -- add --recursive --offline testdir_many_files/nohamt1 
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/iroh add --recursive --offline testdir_many_files/nohamt1`
[1/2] Calculating size...
[2/2] Importing content 0 B...
/ipfs/bafybeieopdpzqhyyxeuuipsdxnxlgo5q5ontpwe2j7xdojql3zk6du3jzy

Requesting this from the gateway does not give a directory as expected:

image

Requesting this via iroh get also gives an error:

iroh on  main [$?] via 🦀 v1.65.0 
❯ cargo run -p iroh -- get /ipfs/bafybeieopdpzqhyyxeuuipsdxnxlgo5q5ontpwe2j7xdojql3zk6du3jzy
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/iroh get /ipfs/bafybeieopdpzqhyyxeuuipsdxnxlgo5q5ontpwe2j7xdojql3zk6du3jzy`
Error: path contains non-relative component
rklaehn commented 1 year ago

Reverting to 31b1acdcd99352cbbbd973c5c751d60ab44c50de, iroh add produces a different hash, which works.

iroh on  main [$?⇣] via 🦀 v1.65.0 took 31s 
❯ cargo run -p iroh -- add --recursive --offline testdir_many_files/nohamt1
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/iroh add --recursive --offline testdir_many_files/nohamt1`
[1/2] Calculating size...
[2/2] Importing content 0 B...
/ipfs/bafybeidunulhcn73uqvcchm75qiktchxk2ksww27gkrvdzgbtvq6x5fqzm
image
b5 commented 1 year ago

hm, likely introduced in https://github.com/n0-computer/iroh/pull/585 then