Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rlp]

The purpose of RLP (Recursive Length Prefix) is to encode arbitrarily nested arrays of binary data, and RLP is the main encoding method used to serialize objects in Ethereum.

-1
votes
0answers
21 views

Why doesn't Ethereum use protobuf so gRPC can be leveraged?

Why doesn't Ethereum use protobuf (instead of RLPx) so gRPC can be leveraged for peer to peer (p2p) communication and JSON gRPC? The use of gRPC and Protobuf will certainly enhance scalability https:...
-1
votes
0answers
21 views

Ethereum and Quorum RLP/RLPx to be replaced with gRPC and Protocol Buffers (protobuf)

I am trying to experiment and enhance Ethereum and Quorum w RLP/RLPx to be replaced with gRPC and Protocol Buffers (protobuf). Are there here who have considered this as well? Why wasn't gRPC and ...
1
vote
0answers
27 views

is there a library to convert transaction receipt to rlp?

I found ethereumjs-tx for transaction to rlp, but i didnt find any libraries to convert transaction reciept to rlp. or is there a way to get rlp format transaction receipt from a service like infura ...
0
votes
0answers
14 views

Difference between Recursive Linear Prefix or Recursive Length Prefix? Vs Google Protocol Buffer (Protobuf)

Like to know what is the difference between Recursive Linear Prefix and Recursive Length Prefix? I have seen both around Are there they same? Or different? Also would like to know the reason why RLP ...
1
vote
1answer
32 views

block hash from block-header rlp [duplicate]

Given the RLP of a block header, how do i get the block hash? https://github.com/ethereum/go-ethereum/blob/master/core/types/block.go#L99 The above link says: Hash returns the block hash of the ...
0
votes
0answers
13 views

Why RLP choose 55 bytes length for split item/list encoding?

I know we choose [0x00, 0x7f] for ASCII, and split the remain [0x80, 0xff] to [0x80, 0xbf] for item, [0xc0, 0xff] for list, but how do we choose 55 bytes length further for split the item or list?
0
votes
1answer
39 views

what type of encoding is used by the abi specification in solidity

the abi specification of solidity which provides functions like abi.encodePacked() using a certain type of encoding (eg: for functions, a 4 byte function signature hash followed by encoding of ...
2
votes
1answer
103 views

geth inter-node communication (devp2p/rlpx) encryption

I am currently analysing the encryption mechanisms used in geth. Currently I have gathered the following information from the source code (https://github.com/ethereum/go-ethereum/blob/master/p2p/rlpx....
1
vote
0answers
124 views

Recovered Sender Address from Raw Transaction

I'm trying this code example : https://thomasclowes.com/verifying-an-ethereum-signature-on-the-server-php-2/ Expected $recoveredSenderAddress = 0xd5bfc359c3a377bb8afd41db8ffc8d1349718233 Actual $...
0
votes
1answer
101 views

Rlp vs rlpx: the specified difference between rlp and rlpx?

Rlp vs rlpx - the specified difference between rlp and rlpx?
0
votes
0answers
134 views

Protocol buffers (protobuf) vs rlp serialization - performance improvement

Assume Protocol buffers (protobuf) was used in place of rlp/rlpx, will performance improve considerably?
0
votes
0answers
29 views

use ecdsa to sign rlp to get rawTransaction

f864 01 850 4a817c800 82 5208 94 e0defb92145fef3c3a945637705fafd3aa74a241 01 nonce gasPrice gaslimit toAddress balance this is my tx. before i ...
0
votes
1answer
169 views

Broadcast error rlp: non-canonical integer (leading zero bytes) for uint64

Here's a transaction to broadcast: ...
0
votes
1answer
119 views

How does Ethereum differentiate between 0x0 and null during contract creation?

According to the EVM documentation, all values are initialized. This means to will contain the 0 address, as null is not a recognized state. The 0 address links to an external account (which we all ...
1
vote
0answers
76 views

Hex Prefix Ethereum - Yellow Paper

I am trying to understand what is Hex Prefix as specified in the Yellow Paper(Appendix C), I don't see a similar reference in the whitepaper, but thank's to this awesome medium post I think I got it, ...
1
vote
0answers
71 views

What does “RlpInvalidIndirection” error mean?

I run my own Parity node for Ropsten network. I am sending raw transactions to the node with "eth_sendRawTransaction" api, and sometimes it returns {-32602, "Invalid RLP.", "RlpInvalidIndirection"} ...
1
vote
1answer
154 views

Correct way to deterministically compute contract address in Python

To begin with, I have already gone through the approach outlined in the following thread: How is the address of an Ethereum contract computed? I wanted to test if the approach actually works. On my ...
0
votes
1answer
82 views

Why a length-1024 string of RLP encoding is \xb9\x04\x00?

In the Ethereum wiki RLP page, If a string is more than 55 bytes long, the RLP encoding consists of a single byte with value 0xb7 plus the length in bytes of the length of the string in binary form,...
0
votes
0answers
108 views

What's sharing through P2P ethereum network?

I'm a new user of ethereum. I didn't succeed to understand exactly which fields or states are shared through the P2P network in ethereum. I mean, is each execution's step of the EVM shared, or just ...
0
votes
1answer
153 views

How to sign a simple transfer TX with digitalbitbox python api

I'm trying to sign a simple transfer transaction using digitalbitbox's python api (see here and code snippet below). I send the following json to the HW wallet api: Sending: {"sign":{"data":[{"...
3
votes
2answers
632 views

How to RLP-encode messages in Solidity

I'm trying to figure out how to interact with the current version of the Casper contract from Solidity. The vote-function in the casper contract takes an array of bytes, which represents the RLP-...
2
votes
1answer
135 views

RLP Rationale Question

I am trying to understand why RLP was chosen and developed as an in-house protocol.I stumbled up this link which provides some insights: https://github.com/ethereum/wiki/wiki/Design-Rationale Trying ...
0
votes
1answer
209 views

How long can a string be until it spills into the next word?

string is dynamic length storage. I imagine a string of length (bytes length) 1, 2 or 3 is all the same length on storage, probably one word. Which byte causes it to spill over into a second, third ...
1
vote
1answer
284 views

RLP decoding question

I am trying to understand what this means from the RLP white paper wiki "The only purpose of RLP is to encode structure; encoding specific data types (eg. strings, floats) is left up to higher-order ...
6
votes
1answer
330 views

Ethereum network messaging

I am trying to "join the dots" around the networking aspect of Ethereum. From the documents, it seems, the underlying protocol is RLPx that powers the ÐΞVp2p Wire Protocol. Though TCP provides a ...
2
votes
2answers
664 views

RLP ethereum decoding

Hi! I have some data, like this ( 827ab7 ), encoding RLP. How I can to know, what is it (string, list or int)?
3
votes
1answer
156 views

What is the shared nibble of this extension node?

I have an extension node here: Key: 000b17906abb9f83c5e190bc3d0bed212e66bf44d99997c53c2071e1413194b6 Value: [ 3866a6d45a815576000da23c1a017179233e9d6437806aef7c2264588739d0, ...
2
votes
1answer
190 views

How Merkle Tree obtain root node hash (example from 'Understanding the ethereum trie')?

I read Understanding the ethereum trie and try to do examples from that article. Now i am at ex1.py - first exaple. Look at code from that example: import sys sys.path.append('src') import trie, ...
3
votes
1answer
650 views

Block header format

Does anyone understand what each element of a block header represents? I have an example block header represented here: [ cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526, ...
1
vote
1answer
123 views

Confusion over RLP encoding for byte array > 55 bytes

I am reading through the wiki on RLP (https://github.com/ethereum/wiki/wiki/RLP) and think I am missing something fundamental. For byte arrays (not lists) greater than 55 bytes, the RLP encoding is ...
0
votes
1answer
330 views

Does RLP specify integer encoding?

The RLP specification says the following about integers: The only purpose of RLP is to encode structure; encoding specific atomic data types (eg. strings, ints, floats) is left up to higher-order ...
5
votes
2answers
2k views

LevelDB in Geth, key and values

When parsing through the levelDB or RocksDB (Depending on the client you are using) there are string values representing the key and the value. These are both stored as Byte arrays as well. My ...
2
votes
1answer
103 views

binary encoding of nonce 0

Although probably not an issue in practice, I'm confused how nonce of zero is encoded in transactions. According to RLP doc, \x00 should be encoded as \x00. But the source code of pyethereum shows ...
9
votes
1answer
1k views

Why was RLP chosen as the low level protocol encoding algorithm?

Is this an ad-hoc decision? Why RLP? Is it specifically suited to something?
4
votes
1answer
497 views

Invalid transaction v,r,s values with geth when reading from of signed MEW RLP transaction

I generated a signed transaction with myEtherWallet: ...
0
votes
1answer
93 views

Can I add leading zeroes at will when building an RLP-encoded transaction?

Suppose I'm building a transaction such as: const raw = [ new Buffer("0001", "hex"), new Buffer("23000000000", "hex"), new Buffer("21000", "hex"), new Buffer("0x00000000000000000000"),...
5
votes
1answer
97 views

What does string mean in patricia tree wiki

What does string mean in patricia tree wiki specifically here Merkle Patricia trees provide a cryptographically authenticated data structure that can be used to store all (key, value) bindings, ...
3
votes
0answers
183 views

Simple hello packet

I am trying to generate a simple hello packet for handshaking with a remote Ethereum client using the encode method from the rlp library. from rlp import encode hello = bytearray(encode([0x00, 4, "...
3
votes
2answers
292 views

RLP encoding of 0

According to the docs here, For a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding I ran the following using pyrlp (similar to the code in pyethereum here):...
7
votes
2answers
2k views

Clarification of “256 bit word” semantics

EVM has "256bit words". Some cases treat strings shorter than 32 bytes (256 bits) as left-justified ascii (packed into the most significant bytes of the word). Does this mean that the word value of ...