Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Consider further isolation of consensus related code #13449

Closed
davxy opened this issue Feb 23, 2023 · 2 comments
Closed

Consider further isolation of consensus related code #13449

davxy opened this issue Feb 23, 2023 · 2 comments
Assignees
Labels
I7-refactor Code needs refactoring. Z0-trivial Writing the issue is of the same difficulty as patching the code.

Comments

@davxy
Copy link
Member

davxy commented Feb 23, 2023

We already have primitive/consensus and client/consensus folders to keep together consensus related code.

Currently these folders contains code for protocols related to block authoring such as BABE, AURA, PoW and some shared utility code.

I propose to add to these folders everything related to consensus (thus also finality) such as grandpa and beefy crates.

Even though this is not paramount, I can't see any good reason to have these crates floating with the rest of the code.
In general I think is a good practice to logically organize the code.

If there isn't any drawback I can easily take on this trivial chore.

@davxy davxy added I7-refactor Code needs refactoring. Z0-trivial Writing the issue is of the same difficulty as patching the code. labels Feb 23, 2023
@ghost
Copy link

ghost commented Feb 24, 2023

If there isn't any drawback I can easily take on this trivial chore.

(commenting in the role of an outside observer)

I7-refactor Code needs refactoring.

The question is: Can this task ("further isolation of consensus related code") be done by strict refactoring?

(Strict Refactoring: zero functional change)

Because even a strict refactoring can still introduce side-effects (things usually visible only in the machine-code, link long vs. short jumps etc.).

Z0-trivial Writing the issue is of the same difficulty as patching the code.

Refactoring should not be labeled as trivial - because it is not trivial.

(Should have own label, like Z9-The-Art-of-Code)

@davxy
Copy link
Member Author

davxy commented Feb 24, 2023

You are right, refactory is not trivial. But this is mostly about renaming and moving files from one folder to another

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring. Z0-trivial Writing the issue is of the same difficulty as patching the code.
Projects
None yet
Development

No branches or pull requests

1 participant