Delivery-Date: Fri, 11 Jul 2014 12:26:55 -0400
Return-Path: <tor-talk-bounces@lists.torproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on moria.seul.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=ham version=3.3.1
X-Original-To: archiver@seul.org
Delivered-To: archiver@seul.org
Received: from eugeni.torproject.org (eugeni.torproject.org [38.229.72.13])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by khazad-dum.seul.org (Postfix) with ESMTPS id 8F1A11E04AD
	for <archiver@seul.org>; Fri, 11 Jul 2014 12:26:53 -0400 (EDT)
Received: from eugeni.torproject.org (localhost [127.0.0.1])
	by eugeni.torproject.org (Postfix) with ESMTP id 5517D30523;
	Fri, 11 Jul 2014 16:26:52 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by eugeni.torproject.org (Postfix) with ESMTP id B81B6304D9
 for <tor-talk@lists.torproject.org>; Fri, 11 Jul 2014 16:17:38 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at eugeni.torproject.org
Received: from eugeni.torproject.org ([127.0.0.1])
 by localhost (eugeni.torproject.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id cMW90w-gHpII for <tor-talk@lists.torproject.org>;
 Fri, 11 Jul 2014 16:17:38 +0000 (UTC)
Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com
 [IPv6:2607:f8b0:4003:c01::235])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (not verified))
 by eugeni.torproject.org (Postfix) with ESMTPS id 9F92C2F581
 for <tor-talk@lists.torproject.org>; Fri, 11 Jul 2014 16:17:38 +0000 (UTC)
Received: by mail-ob0-f181.google.com with SMTP id wp4so1441111obc.12
 for <tor-talk@lists.torproject.org>; Fri, 11 Jul 2014 09:17:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:content-type;
 bh=7MUxyHSOg0WcudDaupzuSDODsZp8yd4iMJAY3bDrttY=;
 b=KhiLhfhilK8iUh+JJWx+Odojbva7rkDqKmjLW69l4m79rdVYi22AfxWZ2zrbMEFO4g
 vmho4u8t35p+0hmjSckXRKl+p8IyxCsJh1gYrL1y4r1LP2fikK+a9Qtjyygu8apVBYB/
 MHPQCWKKNIz3Dje8u8wEPiRNtIZzZwZ9pVNyr8V9Qm7cB71tOVOLyylondHI6Z2H+0zH
 o81674Vi+2qzt92Vnxybo+2dPwfYfSm7fIwZCVKvRD1L4Zri4fqEu0nF/xHB7MgpopEy
 ei837nD+vgfGYoTgYHZTKFtHKqDFMomDQRzdWdycp3L+IKRXWnNS7WnP0YqAAb9RZELB
 QYXw==
MIME-Version: 1.0
X-Received: by 10.182.245.164 with SMTP id xp4mr22117007obc.23.1405095456313; 
 Fri, 11 Jul 2014 09:17:36 -0700 (PDT)
Received: by 10.202.186.137 with HTTP; Fri, 11 Jul 2014 09:17:36 -0700 (PDT)
In-Reply-To: <1405079279.3369.140528681.43B69BA2@webmail.messagingengine.com>
References: <1404957666.1761.139983677.3C135016@webmail.messagingengine.com>
 <CAJdkzENSX92MnaVPFyZ-HNPbtbzLG1VEJk=Vuu0pnoWa3-RhyA@mail.gmail.com>
 <1405079279.3369.140528681.43B69BA2@webmail.messagingengine.com>
Date: Fri, 11 Jul 2014 09:17:36 -0700
X-Google-Sender-Auth: 0GVxJ_L-wNNGoN-JD48CPKpmuVw
Message-ID: <CAJdkzEN9BWUBq99ri5vaZB2jV+Zt-e=4ZqJxvz7W_SiEPVGZ2w@mail.gmail.com>
From: Damian Johnson <atagar@torproject.org>
To: Tor Mailing List <tor-talk@lists.torproject.org>
Subject: Re: [tor-talk] How Tor fetchs the consensus file and maintains the
 cached-consensus file?
X-BeenThere: tor-talk@lists.torproject.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tor-talk@lists.torproject.org
List-Id: "all discussion about theory, design,
 and development of Onion Routing" <tor-talk.lists.torproject.org>
List-Unsubscribe: <https://lists.torproject.org/cgi-bin/mailman/options/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=unsubscribe>
List-Archive: <http://lists.torproject.org/pipermail/tor-talk/>
List-Post: <mailto:tor-talk@lists.torproject.org>
List-Help: <mailto:tor-talk-request@lists.torproject.org?subject=help>
List-Subscribe: <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: tor-talk-bounces@lists.torproject.org
Sender: "tor-talk" <tor-talk-bounces@lists.torproject.org>

Stem provides three methods for getting consensus data...

a. Fetch it from the Controller via methods like get_network_statuses()...

   https://stem.torproject.org/api/control.html#stem.control.Controller.get_network_statuses

b. Read it from disk as you're trying to do. There shouldn't be any
reason to do this when running a relay. This capability is meant to be
used for descriptor archives.

c. Downloading them via the stem.descriptor.remote module...

   https://stem.torproject.org/api/descriptor/remote.html

In this case method 'a' should be your best option.

Cheers! -Damian

On Fri, Jul 11, 2014 at 4:47 AM, Bron Taylor <bron.taylor@swift-mail.com> wrote:
> Hello~
>
>     I am trying to develop a program that can automatically build a
>     circuit with Stem library and send my data over the circuit to the
>     destination anonymously. At the beginning, I tried to make my
>     program read the "cached-consensus" file to get the propriate exit
>     node, however, some of the exit nodes failed to relay the traffic
>     for me. It seems the node was claiming it can relay the traffic to
>     somewhere at some port but not working as well as it claimed.
>     Therefore, I am looking forward to the way to get the whole list
>     containing all of the exit nodes for my program to have more chance
>     for choosing the most suitable exit node. Thank you.
>
> --
> BR, BT
>
> On Fri, Jul 11, 2014, at 12:38 PM, Damian Johnson wrote:
>> Hi Bron. What in particular are you trying to do?
>>
>>
>> On Wed, Jul 9, 2014 at 7:01 PM, Bron Taylor <bron.taylor@swift-mail.com>
>> wrote:
>> > Dear All,
>> >
>> >     I am running a Tor client on my system and deveploping a software
>> >     with Stem library. I found that Tor didn't download a whole list of
>> >     consensus to local, but a cached-consensus which is just part of the
>> >     whole list instead. I would like to ask and know how Tor maintains
>> >     the cached-consensus file on local and how can I make tor to
>> >     download the whole list? Can anyone help to answer my quesion or
>> >     provide me any useful links? Thanks.
>> >
>> >
>> >
>> > --
>> > BR, BT
>> > --
>> > tor-talk mailing list - tor-talk@lists.torproject.org
>> > To unsubscribe or change other settings go to
>> > https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
>> --
>> tor-talk mailing list - tor-talk@lists.torproject.org
>> To unsubscribe or change other settings go to
>> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
> --
> tor-talk mailing list - tor-talk@lists.torproject.org
> To unsubscribe or change other settings go to
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
-- 
tor-talk mailing list - tor-talk@lists.torproject.org
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

