openethereum / parity-ethereum

The fast, light, and robust client for Ethereum-like networks.
Other
6.82k stars 1.69k forks source link

Re-architecture/Major refactor for modern Parity #4228

Closed rphmeier closed 6 years ago

rphmeier commented 7 years ago

Motivation:

Parity was originally written with purely the Ethereum chain in mind -- basic synchronization and mining, with an RPC layer over-top of it. We have now evolved numerous consensus engines, each with their own demands. The light client is on the way and warp sync complicates things further. We've grown a UI which adapts to the operating mode of the client. While developing these features, we have taken on a not-insignificant amount of technical debt. These are the key issues which I feel we currently face:

Common Transaction Pool Interface

Decouple Transaction Queue from Miner/Client

Decouple Client and Miner

Decouple Miner and Consensus

Client Traits Refactoring

Generalize Client

Consensus Engines

What does this enable?

cc @ethcore/core-devs for feedback.

rphmeier commented 7 years ago

(this is sort of a stream-of-consciousness write-up, just going through the things which seem the most fragile/hacky in the core code for now)

debris commented 7 years ago

I couldn’t agree more! I would also add decoupling BlockChainClient and database. Our tests, where it's not necessary, should not use io at all

rphmeier commented 7 years ago

@debris Good point, that's done in #4566.

Also relevant: #4591

5chdn commented 6 years ago

What's the take on this?

debris commented 6 years ago

I will close this pr as most post of the points have been addressed by independent pull requests.