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

Remove coupling from merge plugin and aura #7044

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smartprogrammer93
Copy link
Contributor

Changes

  • decouple merge plugin from aura consensus.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

@@ -9,6 +9,7 @@
<ProjectReference Include="..\Nethermind.Blockchain\Nethermind.Blockchain.csproj" />
<ProjectReference Include="..\Nethermind.Core\Nethermind.Core.csproj" />
<ProjectReference Include="..\Nethermind.Consensus\Nethermind.Consensus.csproj" />
<ProjectReference Include="..\Nethermind.Init\Nethermind.Init.csproj" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it was implicitly referenced by Merge.Plugin -> Aura -> Init.
So when i broke the coupling, it became needed

Copy link
Contributor

@MarekM25 MarekM25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we test it with gnosis node and mainnet node?

@@ -73,6 +73,11 @@ protected override PostMergeBlockProducerFactory CreateBlockProducerFactory()
_blocksConfig,
_api.LogManager);

protected override IBlockFinalizationManager InitializeMergeFinilizationManager()
{
return new MergeFinalizationManager(_blockFinalizationManager, _api.FinalizationManager, _poSSwitcher);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be AuraMergeFinalizationManager here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


public AuRaMergeFinalizationManager(IManualBlockFinalizationManager manualBlockFinalizationManager, IBlockFinalizationManager? blockFinalizationManager, IPoSSwitcher poSSwitcher) : base(manualBlockFinalizationManager, blockFinalizationManager, poSSwitcher)
{
_auRaBlockFinalizationManager = blockFinalizationManager as IAuRaBlockFinalizationManager;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make to instantiate this and put blockFinalizationManager as anything else than IAuRaBlockFinalizationManager ? If not why not make it explicit in constructor? And why use as instead of proper casting and throwing exceptions?

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

Successfully merging this pull request may close these issues.

None yet

3 participants