rlp, p2p, p2p/discover: EIP-8 changes#2091
Conversation
Current coverage is
|
7517539 to
dde5bb3
Compare
The s2 parameter was not actually written to the MAC.
|
@obscuren @karalabe @Gustav-Simonsson please review |
| func messageTag(hash func() hash.Hash, km, msg, shared []byte) []byte { | ||
| if shared == nil { | ||
| shared = make([]byte, 0) | ||
| } |
There was a problem hiding this comment.
Was this shared thing never used until now? Why is it only added to the hash now?
There was a problem hiding this comment.
We didn't use it until now.
| writer := func(val reflect.Value, w *encbuf) error { | ||
| lh := w.list() | ||
| if !ts.dotdot { | ||
| defer w.listEnd(w.list()) |
There was a problem hiding this comment.
@karalabe here. w.list() is executed prior to the rest of the code.
EDIT: nifty pattern BTW :-D cool trick!
|
As discussed on gitter change the |
| return ok && tempErr.Temporary() || isPacketTooBig(err) | ||
| } | ||
|
|
||
| func encodePacket1(priv *ecdsa.PrivateKey, ptype byte, req interface{}, additional []byte) ([]byte, error) { |
There was a problem hiding this comment.
What does this method do? I don't see it used in any of the code.
|
Code looks solid to me. The crypto aspects I cannot verify, but given the thorough tests + the cross client interop experiments, I guess those parts are correct. Please address the issues I've raised and the it's a Go from my part. |
|
PTAL. will squash when you're done reviewing. |
|
LGTM 👍 |
|
👍 |
|
@fjl Please squash. |
|
@fjl please re-open. |
* sec fix 60 * Simplify comments on future block timestamp checks Removed detailed comments regarding block timestamp checks to simplify the code. * address lint * improve comments
Implements ethereum/EIPs#49