Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10461)

Issue 14431043: implement complete full hash-extending algorithm for CompactMerkleTree

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by infinity0
Modified:
10 years, 6 months ago
Reviewers:
ekasper, Eran
CC:
Ben Laurie (Google), ctlog-opensource-review_google.com
Visibility:
Public.

Description

implement complete full hash-extending algorithm for CompactMerkleTree depends on issue 14386045

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 9

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -32 lines) Patch
M src/python/ct/client/monitor.py View 1 2 3 4 5 3 chunks +1 line, -15 lines 0 comments Download
M src/python/ct/client/monitor_test.py View 1 2 3 4 5 1 chunk +2 lines, -6 lines 0 comments Download
M src/python/ct/crypto/merkle.py View 1 2 3 4 5 4 chunks +83 lines, -10 lines 0 comments Download
M src/python/ct/crypto/merkle_test.py View 1 2 3 4 5 2 chunks +38 lines, -1 line 0 comments Download

Messages

Total messages: 13
infinity0
10 years, 6 months ago (2013-10-05 15:27:00 UTC) #1
Ben Laurie (Google)
This review seems to be broken (error: old chunk mismatch). On 5 October 2013 16:27, ...
10 years, 6 months ago (2013-10-07 14:25:07 UTC) #2
infinity0
It builds on top of http://codereview.appspot.com/14386045/ - you'll need to patch that in first. On ...
10 years, 6 months ago (2013-10-07 14:34:46 UTC) #3
ekasper
Same here, can't view a side-by-side diff. Can you try uploading again? I've no idea ...
10 years, 6 months ago (2013-10-07 14:36:08 UTC) #4
infinity0
Re-uploaded, does it work now? On 07/10/13 15:36, ekasper@google.com wrote: > Same here, can't view ...
10 years, 6 months ago (2013-10-07 14:37:07 UTC) #5
ekasper
Ah. But d'you think you can generate a diff with that base? upload.py --rev=base_cl ...
10 years, 6 months ago (2013-10-07 14:38:48 UTC) #6
ekasper
On 2013/10/07 14:37:07, infinity0 wrote: Works now, thanks! > Re-uploaded, does it work now? > ...
10 years, 6 months ago (2013-10-07 14:39:45 UTC) #7
ekasper
https://codereview.appspot.com/14431043/diff/11001/src/python/ct/crypto/merkle.py File src/python/ct/crypto/merkle.py (right): https://codereview.appspot.com/14431043/diff/11001/src/python/ct/crypto/merkle.py#newcode32 src/python/ct/crypto/merkle.py:32: bits = bin(i)[2:] return _bits(i)[1] ? https://codereview.appspot.com/14431043/diff/11001/src/python/ct/crypto/merkle.py#newcode155 src/python/ct/crypto/merkle.py:155: """Returns ...
10 years, 6 months ago (2013-10-08 08:30:07 UTC) #8
Eran
Another drive-by review. As Emilia pointed out, a rough outline of the algorithm would be ...
10 years, 6 months ago (2013-10-09 13:16:55 UTC) #9
infinity0
https://codereview.appspot.com/14431043/diff/11001/src/python/ct/crypto/merkle.py File src/python/ct/crypto/merkle.py (right): https://codereview.appspot.com/14431043/diff/11001/src/python/ct/crypto/merkle.py#newcode32 src/python/ct/crypto/merkle.py:32: bits = bin(i)[2:] On 2013/10/08 08:30:08, ekasper wrote: > ...
10 years, 6 months ago (2013-10-10 14:38:55 UTC) #10
ekasper
Nice, the comments were really helpful. A few more details and it's good to go. ...
10 years, 6 months ago (2013-10-11 14:06:38 UTC) #11
infinity0
https://codereview.appspot.com/14431043/diff/16001/src/python/ct/crypto/merkle.py File src/python/ct/crypto/merkle.py (right): https://codereview.appspot.com/14431043/diff/16001/src/python/ct/crypto/merkle.py#newcode186 src/python/ct/crypto/merkle.py:186: def _mintree_height(self): On 2013/10/11 14:06:38, ekasper wrote: > That ...
10 years, 6 months ago (2013-10-14 16:58:42 UTC) #12
ekasper
10 years, 6 months ago (2013-10-16 13:55:15 UTC) #13
LGTM

https://codereview.appspot.com/14431043/diff/16001/src/python/ct/crypto/merkl...
File src/python/ct/crypto/merkle.py (right):

https://codereview.appspot.com/14431043/diff/16001/src/python/ct/crypto/merkl...
src/python/ct/crypto/merkle.py:186: def _mintree_height(self):
On 2013/10/14 16:58:42, infinity0 wrote:
> On 2013/10/11 14:06:38, ekasper wrote:
> > That seems like an unnecessary amount of access control. Just set a
> > self._mintree_height or self.mintree_height directly if you need access
> outside
> > the class itself (do you?)
> > 
> > Coming from C++, I'm also still adjusting to not being an access control
freak
> > myself. Apparently public members are preferrable if you need direct access
> from
> > outside the class, even if that access is read-only:
> > 
> >
http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Access_Control
> 
> Originally it was because I wanted somewhere to document the semantics of
> mintree_height, but now I've worked that into the docstring for _push_subtree
> and just use __mintree_height directly. Access isn't needed from outside the
> class AFAICS.

It's generally better to avoid implementation details in docstrings but this is
a protected method so it's fine.
> 
> Yeah the double-underscore stuff is not normal for Python code, but it's here
> now so I ran with it. :p

Yah. I might do a global s/__/_/ at some point if I get bored :)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b