Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | rlp: fix string size check in readKind (#15625) | Felix Lange | 2017-12-12 | 2 | -1/+2 |
| | | | Issue found by @guidovranken | ||||
* | rlp: fix decoding long strings into RawValue types | Péter Szilágyi | 2017-08-24 | 2 | -11/+26 |
| | |||||
* | rlp, trie, contracts, compression, consensus: improve comments (#14580) | S. Matthew English | 2017-06-12 | 4 | -8/+8 |
| | |||||
* | rlp: add support for "-" struct tag | Felix Lange | 2017-03-07 | 4 | -7/+31 |
| | |||||
* | all: fix go vet warnings | Felix Lange | 2016-04-15 | 2 | -5/+3 |
| | |||||
* | all: update license information | Felix Lange | 2016-04-15 | 1 | -0/+16 |
| | |||||
* | rlp: add "tail" struct tag | Felix Lange | 2016-02-19 | 6 | -26/+163 |
| | |||||
* | rlp: move ListSize to raw.go | Felix Lange | 2015-09-11 | 2 | -6/+6 |
| | |||||
* | rlp: add RawValue | Felix Lange | 2015-09-11 | 5 | -1/+39 |
| | |||||
* | rlp: add Split functions | Felix Lange | 2015-09-11 | 3 | -1/+337 |
| | | | | | These functions allow destructuring of raw rlp-encoded bytes without the overhead of reflection or copying. | ||||
* | rlp: fix encReader returning nil buffers to the pool | Felix Lange | 2015-09-11 | 2 | -4/+32 |
| | | | | | | The bug can cause crashes if Read is called after EOF has been returned. No code performs such calls right now, but hitting the bug gets more likely as rlp.EncodeToReader gets used in more places. | ||||
* | rlp: add support for boolean encoding/decoding | Péter Szilágyi | 2015-08-13 | 4 | -0/+53 |
| | |||||
* | all: fix license headers one more time | Felix Lange | 2015-07-24 | 7 | -7/+7 |
| | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a. | ||||
* | all: update license headers to distiguish GPL/LGPL | Felix Lange | 2015-07-23 | 7 | -28/+28 |
| | | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library". | ||||
* | rlp: fix check for canonical byte array size | Felix Lange | 2015-07-18 | 2 | -9/+16 |
| | | | | | | Decoding did not reject byte arrays of length one with a single element b where 55 < b < 128. Such byte arrays must be rejected because they must be encoded as the single byte b instead. | ||||
* | rlp: reject trailing data when using DecodeBytes | Felix Lange | 2015-07-18 | 1 | -1/+13 |
| | |||||
* | all: update license information | Felix Lange | 2015-07-07 | 7 | -0/+112 |
| | |||||
* | rlp: add ListSize | Felix Lange | 2015-06-30 | 1 | -0/+6 |
| | |||||
* | rlp: remove Flat | Felix Lange | 2015-06-30 | 2 | -51/+0 |
| | |||||
* | rlp: pool encoder allocations | Felix Lange | 2015-06-30 | 1 | -9/+27 |
| | |||||
* | rlp: fix list bounds check overflow (found by go-fuzz) | Felix Lange | 2015-04-28 | 2 | -14/+40 |
| | | | | | | The list size checking overflowed if the size information for a value was bigger than the list. This is resolved by always performing the check before reading. | ||||
* | rlp: require declared number of input elements for array types | Felix Lange | 2015-04-17 | 2 | -40/+26 |
| | |||||
* | rlp: stop accepting lists for byte slices and byte arrays | Felix Lange | 2015-04-17 | 2 | -45/+10 |
| | |||||
* | rlp: stricter rules for structs and pointers | Felix Lange | 2015-04-17 | 4 | -52/+148 |
| | | | | | | | | | | 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. | ||||
* | rlp: reject non-minimal input strings | Felix Lange | 2015-04-17 | 2 | -15/+45 |
| | | | | | Input strings of length 1 containing a byte < 56 are non-minimal and should be encoded as a single byte instead. Reject such strings. | ||||
* | rlp: stricter validation of canonical integer format | Felix Lange | 2015-04-17 | 2 | -42/+93 |
| | | | | | | | 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 59597d23a5ee268 to all integer types and size tags. | ||||
* | rlp: fix handling of single byte zero when decoding into a pointer | Felix Lange | 2015-04-17 | 2 | -6/+6 |
| | | | | | | 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. | ||||
* | rlp: fix integer overflow in list element size validation | Felix Lange | 2015-04-17 | 2 | -2/+5 |
| | | | | It is not safe to add anything to s.size. | ||||
* | rlp: check top-level value sizes against input limit | Felix Lange | 2015-04-17 | 2 | -56/+171 |
| | | | | | | 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. | ||||
* | Reject integers w/ appended zero's | obscuren | 2015-04-05 | 2 | -0/+10 |
| | |||||
* | rlp: encode nil array pointers as empty list or string | Felix Lange | 2015-03-25 | 2 | -8/+28 |
| | |||||
* | rlp: add Stream.Raw | Felix Lange | 2015-03-21 | 3 | -12/+59 |
| | |||||
* | rlp: fix nil pointer decoding | Felix Lange | 2015-03-21 | 2 | -2/+27 |
| | | | | | | The generic pointer decoder did not advance the input position for empty values. This can lead to strange issues and even infinite loops. | ||||
* | rlp: fix encoding of one element strings and byte slices | Felix Lange | 2015-03-19 | 2 | -7/+20 |
| | | | | | | The encoder was missing a special case for one element strings whose element is below 0x7f. Such strings must be encoded as a single byte without a string header. | ||||
* | rlp: add DecodeBytes | Felix Lange | 2015-03-18 | 1 | -0/+7 |
| | | | | Über-convenience. | ||||
* | rlp: don't panic for nil *big.Int | Felix Lange | 2015-03-18 | 2 | -1/+7 |
| | | | | All other pointer types can handle nil just fine. | ||||
* | wip | obscuren | 2015-02-13 | 2 | -1/+27 |
|\ | |||||
| * | rlp: fix encoding of arrays with byte element type | Felix Lange | 2015-02-06 | 2 | -1/+27 |
| | | |||||
* | | rlp: add Flat | Felix Lange | 2015-02-12 | 2 | -0/+58 |
|/ | |||||
* | rlp: allow encoding non-empty interface values | Felix Lange | 2015-01-16 | 4 | -3/+23 |
| | | | | | | | | This needs to be supported because []someInterface does occur sometimes. Funny enough, the fix involves changes to the decoder. makeDecoder cannot return an error for non-empty interfaces anymore because the type cache builds both decoder and writer. Do the check at 'runtime' instead. | ||||
* | rlp: fix Decode benchmarks | Felix Lange | 2015-01-15 | 1 | -8/+10 |
| | |||||
* | rlp: add functions for encoding | Felix Lange | 2015-01-15 | 6 | -17/+860 |
| | | | | | | | | I'm reasonably confident that the encoding matches the output of ethutil.Encode for values that it supports. Some of the tests have been adpated from the Ethereum testing repository. There are still TODOs in the code. | ||||
* | Merge | obscuren | 2015-01-06 | 2 | -23/+72 |
| | |||||
* | rlp: display decoder target type in more error messages | Felix Lange | 2014-12-10 | 2 | -27/+33 |
| | | | | | Decode error messages now say "expected input list for foo.MyStruct" instead of just "expected List". | ||||
* | rlp: remove dead code | Felix Lange | 2014-12-09 | 1 | -2/+0 |
| | |||||
* | rlp: fix panic in decodeList on go 1.4+ | Felix Lange | 2014-12-09 | 1 | -48/+61 |
| | | | | | The documentation for reflect.Value.Index states that it will panic for out-of-bounds indices. Since go 1.4, it actually panics. | ||||
* | rlp: remove support for signed integer types | Felix Lange | 2014-12-09 | 3 | -52/+29 |
| | | | | | There is no agreement on how to encode negative integers across implementations. cpp-ethereum doesn't support them either. | ||||
* | rlp: move decoder type switch to decode.go | Felix Lange | 2014-12-09 | 2 | -32/+36 |
| | |||||
* | rlp: include target type in decoder error messages | Felix Lange | 2014-11-25 | 2 | -28/+42 |
| | |||||
* | rlp: add NewListStream (for p2p) | Felix Lange | 2014-11-25 | 2 | -0/+27 |
| | |||||
* | rlp: add Stream.Reset and accept any reader (for p2p) | Felix Lange | 2014-11-25 | 2 | -7/+66 |
| | |||||
* | rlp: fix pointer reuse | Felix Lange | 2014-11-17 | 2 | -2/+10 |
| | |||||
* | rlp: new package for streaming RLP decoder | Felix Lange | 2014-11-17 | 4 | -0/+1243 |