Description
This is a messy topic. It all relates to the giant mistake that docker did originally (and was carried forward into OCI) of checksumming compressed data.
Basically when one does a podman run <image> bootc install to-filesystem
this will default to operating on an uncompressed c/storage representation; when we ask c/storage to give us a manifest, it synthesizes an uncompressed one.
This, combined with the fact that the ostree-container store only caches based on blob digests means that when one does an install today through our default/expected flow, and then you want to switch to a registry you end up needing to re-download all the layers at first (because of the switch from uncompressed -> compressed).
However subsequent updates will always operate on the blob digests from the registry which stays compressed.
Related issues came up in the past here that c/storage doesn't offer a way (at least by default?) to access the real original manifest (with the compressed layers). See containers/image#2599 (and containers/storage#1849 ).
But, I think we can and should fix the ostree-container storage here to also track layers via diffid - when we go to do a fetch, map from the uncompressed layers to the diffids from the manifest we're going to fetch, then we can skip downloading those etc.