Skip to content

Conversation

@jframe
Copy link
Contributor

@jframe jframe commented Sep 23, 2025

PR description

Fixes a Json decoding error on eth_subscribe by using a Jackson mapper with jdk8 support. This is due to the addition of Optional<BlockAccessListResult> on the BlockResult.

I've created a Jackson mapper in the SubscriptionManager to use instead of using the vertx Json library. It would be ideal to pass in Jackson mapper instead but there didn't seem to be one readably available where the SubscriptionManager is created.

This is the error we get:

2025-09-23 05:07:05.572+0000 | vert.x-eventloop-thread-7 | ERROR | SubscriptionManager | Failed to notify subscribers.                                                                                                             
io.vertx.core.json.EncodeException: Failed to encode as JSON: Java 8 optional type `java.util.Optional<org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.BlockAccessListResult>` not supported by default: add Module "com
.fasterxml.jackson.datatype:jackson-datatype-jdk8" to enable handling (through reference chain: org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.response.SubscriptionResponse["params"]->org.hyperledger.besu.ethe
reum.api.jsonrpc.websocket.subscription.response.SubscriptionResponseResult["result"]->org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.BlockResult["blockAccessList"])                                                  
    at io.vertx.core.json.jackson.DatabindCodec.toString(DatabindCodec.java:167)

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

Signed-off-by: Jason Frame jason.frame@consensys.net

…<BlockAccessListResult>

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@jframe jframe enabled auto-merge (squash) September 23, 2025 08:51
@jframe jframe merged commit 648acae into hyperledger:main Sep 23, 2025
46 checks passed
@macfarla
Copy link
Contributor

related fix #9220

AliZDev-v0 pushed a commit to AliZDev-v0/besu that referenced this pull request Oct 5, 2025
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Ali Zhagparov <alijakparov.kz@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Oct 13, 2025
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: jflo <justin+github@florentine.us>
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.

3 participants