Skip to content

Refactor/Move aura block processor to DI.#8950

Merged
asdacap merged 2 commits into
masterfrom
fix/aura-merge-missed-witdhrawal-processorr
Jul 25, 2025
Merged

Refactor/Move aura block processor to DI.#8950
asdacap merged 2 commits into
masterfrom
fix/aura-merge-missed-witdhrawal-processorr

Conversation

@asdacap

@asdacap asdacap commented Jul 7, 2025

Copy link
Copy Markdown
Contributor
  • Move aura and aura merge block processor to DI.
  • Have proper support for RPCs including simulate.
  • Remove some factory overrides that is no longer necessary.
  • Make it easier to apply to unit test.
  • Added IBlockValidationModule for some weird aura component that is not set in block producer. This replaces IValidationTransactionExecutor.

Types of changes

What types of changes does your code introduce?

  • Refactoring

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • Gnosis can sync
  • Gnosis hive test passes

@asdacap asdacap requested a review from Copilot July 7, 2025 23:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors block validation and RPC execution by centralizing related registrations into DI modules, removes outdated factory overrides, and streamlines plugin and JSON-RPC initialization.

  • Introduce IBlockValidationModule to unify block validation and RPC DI configuration, replacing IValidationTransactionExecutor.
  • Update plugins (TaikoPlugin, AuRaPlugin, etc.) and JSON-RPC factories to register and apply these validation modules via a new AddModule extension.
  • Remove legacy interfaces and factory classes no longer needed under the new DI pattern.

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

File Description
src/Nethermind/Nethermind.Taiko/TaikoPlugin.cs Replace scoped executor registration with TaikoBlockValidationModule
src/Nethermind/Nethermind.Init/Modules/BlockProcessingModule.cs Add StandardBlockValidationModule and register it as IBlockValidationModule
src/Nethermind/Nethermind.Core/ContainerBuilderExtensions.cs Add AddModule extension for bulk module registration
src/Nethermind/Nethermind.Core/Container/ValidationBlockProcessingModule.cs Define new IBlockValidationModule marker interface
Comments suppressed due to low confidence (1)

src/Nethermind/Nethermind.Init/Modules/BlockProcessingModule.cs:85

  • The new StandardBlockValidationModule registers scoped bindings for block validation; however, there are no tests verifying these registrations. Consider adding unit tests to confirm that IBlockProcessor.IBlockTransactionsExecutor and ITransactionProcessorAdapter are correctly bound.
    private class StandardBlockValidationModule : Module, IBlockValidationModule

}

public static ContainerBuilder AddModule(this ContainerBuilder builder, IModule module)
public static ContainerBuilder AddModule(this ContainerBuilder builder, params IReadOnlyList<IModule> modules)

Copilot AI Jul 7, 2025

Copy link

Choose a reason for hiding this comment

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

The AddModule extension signature expects params IReadOnlyList<IModule> modules, which will not match typical module arrays. Change it to accept params IModule[] modules or IEnumerable<IModule> modules so that passed-in modules are properly registered.

Suggested change
public static ContainerBuilder AddModule(this ContainerBuilder builder, params IReadOnlyList<IModule> modules)
public static ContainerBuilder AddModule(this ContainerBuilder builder, params IModule[] modules)

Copilot uses AI. Check for mistakes.
return payloadPreparationService;
}

private class TaikoBlockValidationModule : Module, IBlockValidationModule

Copilot AI Jul 7, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider moving TaikoBlockValidationModule out of TaikoPlugin.cs into its own file to improve readability and reduce the size of the plugin class.

Copilot uses AI. Check for mistakes.
@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch 2 times, most recently from 33341c2 to ccc1572 Compare July 14, 2025 02:58
@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from ccc1572 to ffb4e0c Compare July 21, 2025 13:43
@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from ffb4e0c to 8da1902 Compare July 23, 2025 12:25
@asdacap asdacap merged commit 4f0f98a into master Jul 25, 2025
77 checks passed
@asdacap asdacap deleted the fix/aura-merge-missed-witdhrawal-processorr branch July 25, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants