Skip to content

Conversation

@Filter94
Copy link
Collaborator

@Filter94 Filter94 commented Oct 27, 2025

Fixes #442


Note

Allows Maru to operate without a local EL by making EL config optional, introducing fork-transition.l2-eth-api-endpoint, and updating factories/sync to work when EL is absent, with new tests and Helm/docker configs.

  • Config:
    • Make validatorElNode optional; add fork-transition with l2-eth-api-endpoint and protocol-transition-polling-interval.
    • Rename Linea fields to l1EthApiEndpoint and add required l2EthApiEndpoint; DTO/back-compat and validations updated.
    • Update TOML loaders, defaults, and tests accordingly.
  • App/Factory:
    • Accept nullable EL clients; expose apiPort(); close clients conditionally.
    • Create EL manager map only when validator EL is configured; EL sync becomes optional via NoOpLongRunningService.
    • Add checkL2EthApiEndpointAndForks and wire forkTransition interval.
  • Consensus/Sync:
    • DifficultyAwareQbftFactory takes optional Web3j; require presence on create; ProtocolStarter uses onBeaconSyncComplete.
    • SyncController.create refactored to accept elSyncServiceFactory instead of concrete handlers.
  • Follower without EL:
    • QbftFollowerFactory imports payload to EL only if client exists and validates conditionally.
    • New integration test MaruFollowerNoElTest verifies block import without EL.
  • Helm/Docker:
    • Move EL JSON-RPC URLs to [fork-transition]; remove eth-api-endpoint from [payload-validator].
    • Update chaos-testing values and docker/maru/config.dev.toml accordingly.
  • Build/CI:
    • Add test dependency in app/build.gradle; fix p2p testFixtures; bump azure/setup-helm to v4.3.1.

Written by Cursor Bugbot for commit edae720. This will update automatically on new commits. Configure here.

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 84.26966% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.39%. Comparing base (2f9071c) to head (edae720).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...src/main/kotlin/maru/config/HopliteTomlFriendly.kt 74.28% 4 Missing and 5 partials ⚠️
app/src/main/kotlin/maru/app/MaruAppFactory.kt 87.71% 7 Missing ⚠️
config/src/main/kotlin/maru/config/Config.kt 80.00% 2 Missing and 2 partials ⚠️
...tils/src/main/kotlin/testutils/maru/MaruFactory.kt 90.62% 3 Missing ⚠️
app/src/main/kotlin/maru/app/MaruApp.kt 80.00% 0 Missing and 2 partials ⚠️
.../kotlin/maru/consensus/qbft/DifficultyAwareQbft.kt 50.00% 1 Missing and 1 partial ⚠️
...pp/src/main/kotlin/maru/app/QbftFollowerFactory.kt 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #451      +/-   ##
============================================
+ Coverage     83.20%   83.39%   +0.18%     
- Complexity      978     1010      +32     
============================================
  Files           212      213       +1     
  Lines          7223     7328     +105     
  Branches        513      548      +35     
============================================
+ Hits           6010     6111     +101     
+ Misses          926      916      -10     
- Partials        287      301      +14     
Flag Coverage Δ
kotlin 83.39% <84.26%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

fluentcrafter
fluentcrafter previously approved these changes Oct 31, 2025
fluentcrafter
fluentcrafter previously approved these changes Nov 3, 2025
@fluentcrafter
Copy link
Collaborator

@Filter94 please chek the regression tests

@Filter94
Copy link
Collaborator Author

Filter94 commented Nov 3, 2025

@fluentcrafter The PR is not ready to merge yet

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

fluentcrafter
fluentcrafter previously approved these changes Nov 5, 2025
return ForksSchedule(chainId = 1337u, forks = listOf(pre, future))
}

private fun forksScheduleWithoutFutureDifficultyAware(nowTs: ULong): ForksSchedule {
Copy link
Collaborator

Choose a reason for hiding this comment

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

These 2 functions have a significant code duplication, can we improve that?

ChainFork(ClFork.QBFT_PHASE0, ElFork.Prague),
),
)
val current =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aslo it looks like we can avoid some suplication here...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made some improvements, please check

@Filter94 Filter94 merged commit be0fb67 into main Nov 6, 2025
10 checks passed
@Filter94 Filter94 deleted the without-el branch November 6, 2025 11:00
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.

Support Maru without EL

5 participants