I'm going to close this PR for now. Until we have some way of getting the digest & compressed size of layers that already exist in the daemon (see https://github.com/moby/moby/issues/44369), we won't be able to construct a valid manifest for the image we're trying to load. However if we do get this information, we should be able to send an OCI layout tar that simply omits existing layer data in the blobs directory to avoid re-uploading the layers.
I'm going to close this PR for now. Until we have some way of getting the digest & compressed size of layers that already exist in the daemon (see https://github.com/moby/moby/issues/44369), we won't be able to construct a valid manifest for the image we're trying to load. However if we do get this information, we should be able to send an OCI layout tar that simply omits existing layer data in the blobs directory to avoid re-uploading the layers.