madara-alliance / madara

Madara is a powerful hybrid Starknet client written in Rust.
https://madara.build
Apache License 2.0
77 stars 30 forks source link

Block import pipeline refactor #228

Closed cchudant closed 2 months ago

cchudant commented 2 months ago

Pull Request type

Does this introduce a breaking change?

Yes: block number in db in class info is stored differently

Other information

This is a refactor I've been working on a little bit. I don't expect this to reach a point where it's merge-able soon as it's not a top priority

The pipeline is designed to fit with p2p retry/scoring and reorgs when we want to implement them: the driving of the pipeline being now in a single place, we can handle flushing the pipeline and retry logic there.

Current pipeline architecture docs is https://github.com/madara-alliance/madara/blob/main/crates/client/sync/src/l2.rs#L324 New pipeline architecture docs is https://github.com/madara-alliance/madara/blob/block_import/crates/client/block_import/src/lib.rs#L1

cchudant commented 2 months ago

Closing in favor of #232. The pipeline part of this PR will be implemented before p2p :)