Skip to content

Remove web3j dependency #10877

Description

@lucassaldanha

Summary

Remove the web3j dependency (org.web3j:core, org.web3j:utils) from Teku entirely. This is the final step of a three-part effort to eliminate web3j from the codebase:

  1. New engine api client #10475 — New OkHttp + Jackson Engine API client (removes the need for web3j in ethereum/executionclient, once it becomes the default client).
  2. Remove web3j fetching deposit logic #10876 — Remove the legacy Eth1/PoW deposit-fetching logic (removes web3j from beacon/pow / services/powchain).
  3. This issue — Delete the remaining web3j usages and the dependency itself, plus the build tooling that exists solely to manage it.

This issue should be done last, after #10475's client is the default and #10876 has landed.

Depends On

Current web3j footprint (what remains after #10475 + #10876)

Location Dependency Usage Action
ethereum/executionclient/build.gradle:16 api 'org.web3j:core' Legacy Engine API transport stack: Web3JClient, Web3JExecutionEngineClient, Web3jClientBuilder, Web3jHttpClient, Web3jIpcClient, Web3jWebsocketClient, DefaultExecutionWeb3jClientProvider, ExecutionWeb3jClientProvider, JsonRpcErrorCodes, JWT websocket auth helper Remove once new client is default
infrastructure/logging/build.gradle:5 implementation 'org.web3j:utils' Converter.java uses only org.web3j.utils.Convert for Wei→ETH/Gwei formatting Replace with internal conversion
acceptance-tests/build.gradle:40 testFixturesImplementation 'org.web3j:core' EL transaction senders: TekuDepositSender, DepositTransactionSender, DepositGenerator, DepositSenderService, ExecutionRequestsService, withdrawal/consolidation/deposit request contracts, BesuNode Migrate or replace (see open questions)
build.gradle:~180 isWeb3jMajorUpgrade guard Pins web3j below major v5 in dependency-update checks Remove
build.gradle:~280 (and spotless) exclude 'web3j' Excludes generated web3j contract wrappers from spotless Remove

Scope

Remove — Engine API legacy transport (ethereum/executionclient)

  • Delete the entire …/executionclient/web3j/ package and the web3j-based client/provider wiring.
  • Make the new OkHttp + Jackson client (New engine api client #10475) the only Engine API client; remove the --Xnew-engine-api-client-enabled flag and the old/new branching in ExecutionLayerManagerImpl / ExecutionLayerService.
  • Drop api 'org.web3j:core' from ethereum/executionclient/build.gradle.

Remove — logging utility dependency (infrastructure/logging)

  • Replace org.web3j.utils.Convert usage in Converter.java with an internal Wei/Gwei/Ether conversion (small BigInteger/BigDecimal helper).
  • Drop implementation 'org.web3j:utils'.

Remove / migrate — acceptance-test utilities (acceptance-tests)

  • These submit real EL transactions (deposits + EIP-6110/7002/7251 execution requests) and use web3j independently of the Engine API. Decide per the open questions: replace with a lightweight signer + raw JSON-RPC, reuse Besu tooling, or retain a single isolated module — but the goal is no org.web3j anywhere.

Remove — build tooling

  • Delete the isWeb3jMajorUpgrade dependency-update guard in build.gradle.
  • Remove the exclude 'web3j' spotless entries (no generated web3j sources remain).
  • Confirm no leftover org.web3j entries in gradle/versions.gradle / version catalog and no transitive force/exclusion rules referencing it.

Acceptance criteria

  • No module declares org.web3j:* (core or utils); confirmed via grep -rn "web3j" --include=build.gradle and a dependency report.
  • The …/executionclient/web3j/ package and --Xnew-engine-api-client-enabled flag are gone; the OkHttp client is the sole Engine API client.
  • All previously supported Engine API transports are either still supported by the new client or explicitly removed with a documented deprecation.
  • Converter Wei/Gwei/Ether formatting is internal and unit-tested.
  • Acceptance tests (deposits + EIP-6110/7002/7251 execution requests) pass without web3j.
  • isWeb3jMajorUpgrade guard and spotless web3j excludes removed.
  • Build, unit, integration, reference, and acceptance tests pass; CHANGELOG updated (notably any removed/changed Engine API transport behavior and the removal of --Xnew-engine-api-client-enabled).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions