Parity-ethereum: Tracking issue util refactor

Created on 30 Aug 2017  Â·  20Comments  Â·  Source: openethereum/parity-ethereum

  • [x] @Hawstein journaldb and rocksdb dependencies should be separated from util.
  • [ ] @Hawstein all trie traits from util should be separated from util.
  • [x] migrations should be a library
  • [x] @debris -> replace sha3::Hashable trait and all of usages of it with a simple function called hash
  • [x] @debris -> this hash function should be a standalone library importing C impl of sha3 and tiny-keccak (for updatable sha3s)
  • [x] @folsen util should not reexport bigint
  • [x] @Hawstein util should not reexport ansi_term
  • [x] @axelchalon -> util should not reexport HeapSizeOf
  • [x] @Hawstein util should not reexport ParkingLot
  • [x] @debris util should not reexport vector::*
  • [x] @debris triehash should be separated from util
  • [x] @Hawstein semantic_version should be separated from util
  • [x] @Hawstein timer::PerfTimer should be a part of ethcore
  • [x] @debris error::UtilError should be replaced by error_chain
  • [ ] remove public reexports of traits modules
  • ~flatten util subcrates~ (controversial)
F6-refactor 📚 F9-meta 🔮 M4-core ⛓ P2-asap 🌊

Most helpful comment

@debris Great! Then I will take the following tasks too:

  • migrations should be a library
  • remove public reexports of traits modules

Since once I make those *.rs files into a lib, the above tasks are almost done.

All 20 comments

I'm not convinced about flattening util subcrates. Why not group non-blockchain-specific utilities within a single folder?

ok, let's keep all subcrates in util directory for now. We'll discuss it again someday

I'll take

- [ ] replace sha3::Hashable trait and all of usages of it with a simple function called `hash`
- [ ] this `hash` function should be a standalone library importing C impl of sha3 and tiny-keccak (for updatable sha3s)

Also fixed hash should be crates.io library dependant on bigint and little more

I'll take util should not reexport HeapSizeOf for now

I will take triehash should be separated from util

I'll take util should not reexport bigint

I'll take util should not reexport ansi_term if you guys don't mind:)

I'll take one more: util should not reexport ParkingLot.

@Hawstein thanks, merged!

I will take timer::PerfTimer should be a part of ethcore.

I will take semantic_version should be separated from util.

I will take

  • journaldb and rocksdb dependencies should be separated from util.
  • all trie traits from util should be separated from util.

@debris Should I move the journaldb, migration and trie out of util/src dir and put them in the util/ dir just like other libs. Seems that this is a reasonable way to arrange them.

@debris Should I move the journaldb, migration and trie out of util/src dir and put them in the util/ dir just like other libs. Seems that this is a reasonable way to arrange them.

@Hawstein yes, this would be a great first step. Eventually, we would also like to decouple journaldb and rocksdb :)

@debris they are already decoupled to some degree via the KeyValueDB trait.

I will take error::UtilError should be replaced by error_chain

@debris Hi, I am working on the all trie traits from util should be separated from util. Since it depends lots of stuffs in util/src, so I decide to move all the *.rs file in util/src out of the src dir and make it a lib. It needs to be done for other tasks too. Does it make sense for you?

@Hawstein yes, I believe it's one of the last things needed ;)

@debris Great! Then I will take the following tasks too:

  • migrations should be a library
  • remove public reexports of traits modules

Since once I make those *.rs files into a lib, the above tasks are almost done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryaan picture bryaan  Â·  3Comments

stone212 picture stone212  Â·  3Comments

0x7CFE picture 0x7CFE  Â·  3Comments

tzapu picture tzapu  Â·  3Comments

barakman picture barakman  Â·  3Comments