[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #5810 [Stem]: Implement verification of server descriptor



#5810: Implement verification of server descriptor
-------------------------+--------------------------------------------------
 Reporter:  reganeet     |          Owner:  reganeet
     Type:  enhancement  |         Status:  new     
 Priority:  normal       |      Milestone:          
Component:  Stem         |        Version:          
 Keywords:               |         Parent:          
   Points:               |   Actualpoints:          
-------------------------+--------------------------------------------------

Comment(by atagar):

 > I've written the unit test and pushed into my repo...

 Fantastic! Don't worry about merging. When doing development what you'll
 generally want to do is...

 # switch to your master branch and make sure it's up to date
 git checkout master
 git pull origin

 # make a new branch where you implement your feature
 git checkout -b my_spiffy_new_feature
 <do your work>

 # when you're done again make sure your master branch its up to date
 git fetch origin

 # this will update your feature branch to be off of stem's current master
 git rebase origin/master

 # pushes into your repository
 git push my_remote

 Note that these commands will vary based on what you're calling your
 remotes. If you're new to git then I'd suggest...
 http://progit.org/book/

 Personally I found it to be very well written. There's no need to do a
 merge (though it doesn't hurt). I can then easily cherry-pick or merge
 your changes.

 All this said though we have a couple issue that needs to be addressed
 before I can look at your branch...

 +"""^M
 +Parsing for Tor server descriptors, which contains the infrequently
 changing^M
 +information about a Tor relay (contact information, exit policy, public
 keys,^M
 ...

 See the ^M at the end of the lines? Those are Windows newlines. Whatever
 editor you're using are introducing them. This causes a couple issues...
 - A simple diff claims that every line is changed. I can tell diff to
 ignore whitespace, but it's still annoying.
 - Mixed newlines can confuse a lot of tools. They're very bad to introduce
 into code.

 So we need to both strip these out and figure out a method for you to edit
 files without introducing them. This is a common gotcha so I'm sure google
 will have some good suggestions.

 For my part I should make the whitespace checker look for these. Also, we
 need to make non-builtin dependencies optional. Otherwise users will
 get...

 {{{
 atagar@morrigan:~/Desktop/stem$ ./run_tests.py --unit
 Traceback (most recent call last):
   File "./run_tests.py", line 23, in <module>
     import test.unit.descriptor.server_descriptor
   File
 "/home/atagar/Desktop/stem/test/unit/descriptor/server_descriptor.py",
 line 9, in <module>
     import stem.descriptor.server_descriptor
   File "/home/atagar/Desktop/stem/stem/descriptor/server_descriptor.py",
 line 35, in <module>
     import rsa
 ImportError: No module named rsa
 }}}

 I'm not quite sure how we should handle this, logging a warning once if
 they try to verify without the module or something else...

 Cheers! -Damian

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5810#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs