| 21 Jul 2025 |
jade_ | (I am building nix store paths directly with buck2(!) and jamming them directly into the store. they're to be used with builtins.fetchClosure ideally. hopefully we didn't delete enough CA code that we can't run that stuff anymore) | 19:01:46 |
jade_ | actually it looks like the fixed-output derivations cannot have references thing is entirely at the builder layer? seemingly CA paths just are allowed to have references? | 19:12:35 |
jade_ | * actually it looks like the fixed-output derivations cannot have references thing is entirely at the builder layer? seemingly output-addressed paths just are allowed to have references? | 19:12:44 |
jade_ | .... oh. if you want to import random bullshit IA paths, you can't do it with nix-store --import. I wonder how I get around that. | 19:29:58 |
jade_ | * .... oh. if you want to import random bullshit IA paths, you can't do it with nix-store --import. I wonder how I get around that because I have no reason to not be CA. | 19:30:19 |
jade_ | ........... why did they do modulo hashing?! | 19:33:42 |
jade_ | what is the purpose of that? | 19:33:48 |
jade_ | "jade go read Eelco's thesis"
yeah okay it's in there | 19:34:14 |
jade_ | page 144 | 19:34:22 |
jade_ | oh! modulo hashes are identical if you prohibit self refs. lets go! | 19:34:45 |
jade_ | * oh! modulo hashes are possibly identical if you prohibit self refs. lets go! | 19:35:09 |
jade_ | oh no. okay so I have to implement a thing that either links to the nix implementation or implements the protocol, because nix-store --import doesn't support importing CA hashed paths. Either way I am quite displeased. | 19:39:45 |
puck | In reply to @jade_:matrix.org actually it looks like the fixed-output derivations cannot have references thing is entirely at the builder layer? seemingly output-addressed paths just are allowed to have references? yes, the store path changes tho, and it can only be recursive/sha256 | 20:30:58 |
puck | In reply to @jade_:matrix.org ........... why did they do modulo hashing?! modulo hashing on content addressed store paths is Fucked | 20:31:27 |
raitobezarius (DECT: 7248) | In reply to @jade_:matrix.org oh no. okay so I have to implement a thing that either links to the nix implementation or implements the protocol, because nix-store --import doesn't support importing CA hashed paths. Either way I am quite displeased. doesn't import --fixed do the job? | 20:39:34 |
jade_ | references required | 21:09:30 |
jade_ | blessedly its not my problem, but it's clearly Turbo Broken in Lix since we have stubbed out the code (!) | 21:11:00 |
jade_ | anyway i guess we are becoming a daemon proto client in rust | 21:11:26 |
jade_ | because i want my shit to work | 21:11:30 |
puck | In reply to @jade_:matrix.org blessedly its not my problem, but it's clearly Turbo Broken in Lix since we have stubbed out the code (!) that code was broken in cppnix too, just more subtly :D | 21:48:25 |
jade_ | indeed | 22:18:44 |
| 22 Jul 2025 |
jade_ | I don't really want to know what bugs lurk in the trailing padding of the base32 of store path hash parts... | 00:23:32 |
jade_ | I'm sure there's bugs there, since it's unchecked. | 00:23:43 |
jade_ | oh, hash part length is 32 | 00:24:33 |
jade_ | so they delete a char. perfect. | 00:24:39 |
jade_ | * hm. maths. | 00:28:00 |
jade_ | im not doing maths successfully | 00:29:55 |
jade_ | oh. yeah it's not a problem for paths because they're 160 bit and evenly divide by 5 bits. but it is maybe busted for sha256 hashes encoded as base32, in the same way as we know of buggy handling of corrupt padding in base64 SRI hashes that we should probably reject but don't at present. | 00:55:47 |
flokli | @jade_:matrix.org: hash parsing is very broken for the SRI case at least. See the test cases at https://git.snix.dev/snix/snix/src/branch/canon/snix/nix-compat/src/nixhash/mod.rs | 08:57:49 |
flokli | We opted to keep that behavior for now, cause some things in nixpkgs used these strange encodings (probably mostly copy paste errors) | 08:58:26 |