Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarity integration plan #11

Closed
10 tasks done
mpapierski opened this issue Sep 21, 2018 · 1 comment
Closed
10 tasks done

Clarity integration plan #11

mpapierski opened this issue Sep 21, 2018 · 1 comment

Comments

@mpapierski
Copy link
Contributor

mpapierski commented Sep 21, 2018

Problem

We use excellent Parity libraries to send ETH transactions and make use of our contracts. However Parity doesn't support MIPS and they seemingly doesn't have plans to do so. We put a lot of effort into trying to get it right but getting deeper into the rabbit hole gave us more and more crates that won't support MIPS and big endian byte order. Our needs aren't that big - while Parity is really big set of libraries that probably implements whole ETH node we use it only to sign transactions, and to compile contracts parameters into data. Given the problems and our use case clarity was born.

Solution

We plan to swap all types that we use that are made by Parity to replace them with similar types provided by Clarity. Whenever a missing piece of functionality in Clarity is found it should be reported on Clarity repo, and a workaround has to be found if a nontrivial amount of work is required to cover it.

Plan

  • Remove dependency on ethereum_types
    • Replace ethereum_types::Address into clarity::Address
    • Replace ethereum_types::U256 into clarity::BigEndianInt
  • Remove dependency on ethkey
    • Replace ethkey::* types that could be simplified with a clarity::Transaction and clarity::PrivateKey - especially in crypto.rs
    • Cover missing functionality in crypto.rs especially verify and and hash_bytes methods with functionality provided by Clarity
  • Remove dependency on ethabi
    • Replace contract generation with precomputed values (or computed ourselves) (See ABI support clarity#21 for a proposal for adding support for ABI compilation in clarity)
    • eth_client.rs - Replace Transaction type to use Transaction from clarity.
    • In clarity a SignedTransaction replacement is a Transaction - it just differs if it has a signature or not.

Risks

@mpapierski
Copy link
Contributor Author

Solved with #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant