mana-ethereum / ex_rlp Goto Github PK
View Code? Open in Web Editor NEWElixir implementation of Ethereum's RLP (Recursive Length Prefix) encoding
License: MIT License
Elixir implementation of Ethereum's RLP (Recursive Length Prefix) encoding
License: MIT License
moved from ethereumex to here.
hi there, thanks for your good work.
when i send transaction using Ethereumex.HttpClient.eth_send_raw_transaction(signed_transaction)
, sometime errors occur just like that:
no match of right hand side value: {:error, %{"code" => -32000, "message" => "rlp: non-canonical integer (leading zero bytes) for *big.Int, decoding into (types.Transaction)(types.txdata).R"}}
ex_rlp version: the latest version 0.5.3
if i change any part of transaction, nonce
, gas_price
, etc., errors disappear.
i searched for a long time, it looks like a problem of RLP, mentioned years before:
it looks like that's hard to reproduce it, cause it's random to generate the leading zeros in R or S. i will try it more using large amount of random transaction arguments, as this error reproduced, it will be posted here.
thanks in advance.
Encoder/Decoder protocols for Map override protocols for other structs. So it's not possible to define custom encoding/decoding logic
Currently, we don't handle errors from https://github.com/ethereum/tests/blame/develop/RLPTests/invalidRLPTest.json
Benchmark encoding/decoding speed and compare with other implementations
"what the fuck" |> ExRLP.encode(encoding: :hex)
"8d7768617420746865206675636b"
Decode It in Web3.js:
web3.utils.toAscii("0x8d7768617420746865206675636b")
'�what the fuck'
There is an extra symbol there
Rewrite tests to fetch tests during ci from https://github.com/ethereum/tests
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.