- May 27, 2021
-
-
Felix Lange authored
This change significantly improves the performance of RLPx message reads and writes. In the previous implementation, reading and writing of message frames performed multiple reads and writes on the underlying network connection, and allocated a new []byte buffer for every read. In the new implementation, reads and writes re-use buffers, and perform much fewer system calls on the underlying connection. This doubles the theoretically achievable throughput on a single connection, as shown by the benchmark result: name old speed new speed delta Throughput-8 70.3MB/s ± 0% 155.4MB/s ± 0% +121.11% (p=0.000 n=9+8) The change also removes support for the legacy, pre-EIP-8 handshake encoding. As of May 2021, no actively maintained client sends this format.
-
- Nov 13, 2020
-
-
Jaynti Kanani authored
-
- Nov 04, 2020
-
-
Martin Holst Swende authored
This PR contains a minor optimization in derivesha, by exposing the RLP int-encoding and making use of it to write integers directly to a buffer (an RLP integer is known to never require more than 9 bytes total). rlp.AppendUint64 might be useful in other places too. The code assumes, just as before, that the hasher (a trie) will copy the key internally, which it does when doing keybytesToHex(key). Co-authored-by:
Felix Lange <fjl@twurst.com>
-
- Sep 14, 2020
-
-
Felix Lange authored
This can be useful when working with raw RLP data.
-
- Dec 11, 2017
-
-
Felix Lange authored
Issue found by @guidovranken
-
- Jun 12, 2017
-
-
S. Matthew English authored
-
- Sep 10, 2015
-
-
Felix Lange authored
-
Felix Lange authored
-
Felix Lange authored
These functions allow destructuring of raw rlp-encoded bytes without the overhead of reflection or copying.
-