gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does gnunet-download ever contact gnunet-service-fs?


From: Christian Grothoff
Subject: Re: Does gnunet-download ever contact gnunet-service-fs?
Date: Fri, 15 May 2020 12:40:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 5/15/20 5:48 AM, Cy wrote:
> I'm trying to understand how gnunet-download works, despite its abominable 
> amount of
> immediate scheduling and abstractions. One thing I'm confused about though. 
> gnunet-
> download is an FS client, right? Uses gnunet-service-fs to download?

Yes.

> I attached to gnunet-service-fs using a debugger, then fired up 
> gnunet-download for my
> download that's bugging out, but I couldn't find which callback was invoked 
> when gnunet-
> download tells the service to start downloading. Sometimes mysterious "peers" 
> would
> connect to the service, unrelated to gnunet-download, but gnunet-download 
> itself
> downloaded everything without connecting to gnunet-service-fs. I finally just 
> hit "next"
> in gdb, so that it would immediately drop to the gdb prompt as soon as the 
> select loop in
> gnunet-service-fs registered activity. Then I hurriedly switched windows, 
> fired off
> another gnunet-download, and... nothing. gnunet-service-fs never left the 
> core select loop
> for the whole download. Then it left the core select loop when another one of 
> those
> "peers" connected.

gnunet-download first checks if the target file on disks exists, and if
so merely verifies that the existing file on disk is the same that you
are trying to download. So IF you did not delete the result of a
previous download, it can indeed complete without any network or IPC
activity. But then you're basically verifying the (checksums) over the
existing file, and not really 'downloading'.

If the checksum(s) fail, gnunet-download only downloads the portions of
the file that were 'wrong'.

> What does gnunet-download connect to?

gnunet-service-fs, IF it decides it needs to actually download blocks.

> Seriously, this is what I get:
> $ time gnunet-download -V -V -V -R -o
> derp.gnd  
> gnunet://fs/chk/AJRGAG82WAENCXR4QPWQ7HCR3PQPFBK6J8BRBZV2TPAVKX1Z3631B7T27D2TGQQP
> CA61H7M4QR8RG92EVDZZCG3FXYR9NH3ZYW15HW8.AQ6D1QZ9EN6A7M1ZWCWFF88ZP3KBPCNDFJAS3NBWETEP27SVQN
> DSVKFB4S9028ETXCECTQ2PZP5XCW2EVVVTGPPSW2173GZG2SZR4E8.28249
> ...
> 0.06s user 0.01s system 0% cpu 1:00.12 total
> 
> Exactly one minute. I verified this twice.

Maybe it takes exactly one minute to compute the checksum on the
directory structure you are downloading?

> I'm guessing that one of my peers is storing the latter half of the directory 
> I published.
> But why isn't my own node storing it? Or indexing it? Why exactly one 
> minute's delay? Why
> only one file in my test data being indexed?  What about the other 224 files 
> I published
> in that directory? What about that directory itself?
> 
> 
> 

Attachment: 0x939E6BE1E29FC3CC.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]