pub struct BundlePullArgs {Show 13 fields
pub input: Option<PathBuf>,
pub hash: Option<String>,
pub output: PathBuf,
pub jobs: usize,
pub max_lane_streams: u16,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub select: bool,
pub overwrite: bool,
pub dry_run: bool,
pub json: bool,
pub namespace: Option<u64>,
pub common: ClientFetchArgs,
}Expand description
decdn bundle pull — fetch a bundle’s blobs into a directory.
The bundle source is exactly one of -i <file> (a local manifest) or
--hash <b3> (fetch the manifest blob first, then its entries). Both then
run the same per-entry fetch loop. The network/chain/target flags come from
the flattened ClientFetchArgs — --node-id pins every entry to one node,
--channel-id (#1481) adopts one publisher-opened channel and pins the whole
bundle to its provider, otherwise each entry is discovered independently
(#936/#391). --namespace (ADR 002) routes every cache-miss origin pull to a
namespace’s authorized origins.
Fields§
§input: Option<PathBuf>Local bundle manifest file to pull. Mutually exclusive with --hash.
hash: Option<String>BLAKE3 hash (64 hex, optional 0x/b3: prefix) of the bundle manifest
blob to fetch first, then pull. Mutually exclusive with -i.
output: PathBufOutput directory the bundle’s files are written under (created if
absent). Each entry’s relative path is resolved within this root;
../absolute/escaping paths are rejected.
jobs: usizeMaximum concurrent entry fetches across the whole run. Each distinct blob is one unit of work holding one slot: a plain whole-file entry, or a range-dedup entry across its complement drive, donor splice, and any re-fetch. A range-dedup entry that only waits for a sibling to finish the chunks it splices gives its slot to a queued entry until then. A byte range a sibling entry already holds is spliced from disk, not fetched, so it never takes a slot of its own.
max_lane_streams: u16Maximum concurrent streams to one (pool, signer, provider) lane.
Same-lane streams share one cumulative voucher watermark, and the serving
node credits each stream’s delivered bytes from that shared lane fairly
(a slow stream is paid from the headroom a faster sibling opened), so
same-lane concurrency is safe and this only bounds how many streams touch
one provider at once. Cross-lane parallelism (distinct providers) is
bounded by --jobs regardless.
One connection per node carries every stream of the command, so the bound (1 to 64) stays below the node’s limit of concurrent streams on one connection.
include: Vec<String>Only pull entries whose POSIX relative path matches one of these globs
(models/*.bin), matched against the manifest’s path field, never the
on-disk absolute path. Repeatable — an entry passes the include gate if it
matches any one. Absent => every entry passes the gate. gitignore
semantics: * does not cross /, ** recurses.
exclude: Vec<String>Skip entries whose POSIX relative path matches one of these globs,
matched against the manifest’s path field. Repeatable — every pattern
is OR-ed. --exclude wins over --include: an entry matching both is
skipped. Same gitignore glob semantics as --include.
select: boolChoose which files to pull interactively: open the (post---include/
--exclude) file list in $VISUAL/$EDITOR, one path per line. Comment
out (prefix #) or delete any line to skip that file; save and exit to pull
the rest. Useful when you don’t know a bundle’s contents up front — the list
is what the manifest actually holds. Requires an interactive terminal;
incompatible with --json and --dry-run.
overwrite: boolRe-fetch and overwrite entries whose destination file already exists.
Default is skip-existing (resume-friendly): a path skips when its saved
.decdn-manifest.json record still matches the file’s hash, size, and
mtime — the fast path, which trusts that gate without re-hashing — or,
failing that, when re-hashing its on-disk bytes matches the new manifest.
A file byte-identical to one already anywhere else in the output root is
likewise reused with no download: it is linked (or copied) from that
on-disk file once its hash is confirmed by a re-hash. Use --overwrite
to force a full re-fetch of every entry, for example when the output
directory may have been modified outside decdn (an in-place edit that
keeps a file’s size and mtime is otherwise trusted by the fast path). It
skips consulting .decdn-manifest.json for skip decisions, so it
disables both the skip-existing path and the whole-root reuse above; the
file is still read and rewritten with the run’s results.
dry_run: boolPrint the entries the run would pull (paths + sizes, after
--include/--exclude; files already present are still listed) and exit
without any network or chain activity. With --hash, entries are listed
only when an earlier pull into the same output directory cached the
bundle manifest.
json: boolEmit a one-line JSON summary instead of human-readable output.
namespace: Option<u64>Namespace the whole bundle is published under (ADR 002 § Retrieval by namespace). Applies to EVERY fetch in the run — the manifest blob and each entry — so a serving node routes any cache-miss origin pull to that namespace’s DAO-authorized origins. The manifest format carries no per-entry namespace, so this is necessarily bundle-level. Absent => no namespace: served best-effort from cache / DHT only.
common: ClientFetchArgsRetrieval flags shared with decdn fetch: peer discovery, payment
pool, and output handling.
Trait Implementations§
Source§impl Args for BundlePullArgs
impl Args for BundlePullArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Debug for BundlePullArgs
impl Debug for BundlePullArgs
Source§impl FromArgMatches for BundlePullArgs
impl FromArgMatches for BundlePullArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for BundlePullArgs
impl RefUnwindSafe for BundlePullArgs
impl Send for BundlePullArgs
impl Sync for BundlePullArgs
impl Unpin for BundlePullArgs
impl UnsafeUnpin for BundlePullArgs
impl UnwindSafe for BundlePullArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more