宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

以太坊RLP编码例程分解

原生交易报文:https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md

分解

98504a817c800825208943535353535353535353535353535353535353535880de0b6b3a764000080018080

//signing data

ec //list RLP encode: 0xc0 + len(signing_data_without_rlp_head) = 0xc0 + 44 = 192 + 44 = 236 = ech
09 //nonce: (0-127)'s RLP encode is itself
85 //gasPrice RLP encode:128 + len(gasPrice) = 128 + 5 = 133 = 85h
04a817c800 //gasPrice
82 //gaslimit RLP encode:128 + len(gaslimit) = 128 + 2 = 130 = 82h
5208 //gaslimit
94 //recipient RLP encode:128+len(recipient) = 128 + 20 = 148 = 94h
3535353535353535353535353535353535353535 //recipient
88 //value RLP encode:128 + len(value) = 128 + 8 = 136 = 88h
0de0b6b3a7640000 //value
80 //data RLP:data is NULL, NULL’s RLP is 128 + 0 = 128 = 80h
01 //chainID: (0-127)'s RLP encode is itself
80 //0 is trade as NULL, NULL’s RLP is 128 + 0 = 128 = 80h
80 //0 is trade as NULL, NULL’s RLP is 128 + 0 = 128 = 80h