Skip to main content

Besu Integration (Credible Layer Plugin)

Home · Generic Index · Chain Overlays

This document covers credible-layer-besu-plugin, which integrates the Credible Layer sidecar into Hyperledger Besu.

Components

  • Plugin entrypoint: credible-layer-besu-plugin/src/main/java/net/phylax/credible/CredibleLayerPlugin.java
  • Transaction selection hook: CredibleTransactionSelector implements PluginTransactionSelector.
  • Sidecar strategy: DefaultSidecarStrategy orchestrates transport calls and handles timeouts/fallbacks.
  • Transports: JSON-RPC (JsonRpcTransport) and gRPC (GrpcTransport).

Sequencer Context

  • The sequencer config enables CredibleLayerPlugin alongside the sequencer plugins in credible-sdk/docker/maru-besu-sidecar/config/linea-besu-sequencer/sequencer-credible-grpc.config.toml.
  • See docs/chains/linea/sequencer-integration.md for the combined plugin pipeline view.

Runtime Flow

Transport Notes

  • JSON-RPC is the default transport (--plugin-credible-sidecar-transport-type=http).
  • gRPC supports streaming and lower latency.
  • Configured via CLI flags in Besu:
    • --plugin-credible-sidecar-rpc-endpoints
    • --plugin-credible-sidecar-grpc-endpoints
    • --plugin-credible-sidecar-processing-timeout-ms
    • --plugin-credible-sidecar-aggregated-timeout-ms

Failure Behavior

  • The strategy performs a race to success across transports and supports fallback endpoints.
  • If aggregated timeout is exceeded in an iteration, the strategy becomes inactive for that block production cycle.
  • Reorg events are sent when a previously queued transaction is dropped during selection.

Related code:

  • credible-layer-besu-plugin/src/main/java/net/phylax/credible/strategy/DefaultSidecarStrategy.java
  • credible-layer-besu-plugin/src/main/java/net/phylax/credible/txselection/CredibleTransactionSelector.java
  • credible-layer-besu-plugin/src/main/java/net/phylax/credible/transport/*