* Improved block propagation by sending blocks only to peers to which, as
far as we know, the peer does not know about.
* Made sub protocol its own manager
* SubProtocol now contains the p2p.Protocol which is used instead of
a function-returning-protocol thing.
The rules have changed as follows:
* When decoding into pointers, empty values no longer produce
a nil pointer. This can be overriden for struct fields using the
struct tag "nil".
* When decoding into structs, the input list must contain an element
for each field.
All integers (including size information in type tags) need to be
encoded using the smallest possible encoding. This commit expands the
stricter validation introduced for *big.Int in commit 59597d23a5
to all integer types and size tags.
A single zero byte carries information and should not set the pointer
to nil. This is arguably a corner case. While here, fix the comment
to explain pointer reuse.
This is a preliminary fix for #420 (SEC-18 RLP decoder unsafe
allocation). If a sane input limit is set on the rlp.Stream,
it should no longer be possible to cause huge []byte allocations.
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
* Include tests which now has consistent HEX encodings
* Comment out two failing tests: "
"TransactionWithHihghNonce" due to wrong nonce size
"TransactionWithSvalueHigh" due to wrong ECDSA s range
* Cleanup conversion functions and fix expected encodings for
tests validation fields
NOTE: For known, non-consensus, hard to reproduce bugs consider the
following method `common.Report("extra", stuff, "you need logged")` will
give you a stack trace and a friendly request to submit it as an issue
on our issue tracker.