Skip to content

fix: restore engine API JWT signing after jsonwebtoken 11 bump - #1546

Merged
KolbyML merged 1 commit into
ReamLabs:masterfrom
ream-collective:fix/jwt-crypto-provider
Aug 6, 2026
Merged

fix: restore engine API JWT signing after jsonwebtoken 11 bump#1546
KolbyML merged 1 commit into
ReamLabs:masterfrom
ream-collective:fix/jwt-crypto-provider

Conversation

@perfogic

@perfogic perfogic commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What was wrong?

Since the jsonwebtoken 9.3.1 → 11.0.0 bump in #1537, every engine API request panics while signing the JWT. From ci logs of test devnet5 / serial (test_beacon_nodes_produce_blocks_and_converge):
image

jsonwebtoken 11 needs a crypto provider selected explicitly, but its default feature set (use_pem) enables neither. Beacon nodes therefore fail to authenticate with the execution client, get no payloads, and produce no blocks.

How was it fixed?

Enable a provider in the workspace Cargo.toml:

jsonwebtoken = { version = "11.0.0", default-features = false, features = ["rust_crypto"] }
  • rust_crypto over aws_lc_rs: prefer the pure-Rust provider, since ream-consensus-beacon depends on ream-execution-engine and is also built for the riscv32im zkVM targets.
  • default-features = false: only EncodingKey::from_secret (HS256) is used, so the default use_pem parsing can be omitted.

To-Do

Additional Context:

jsonwebtoken 11 requires exactly one of the `rust_crypto` or `aws_lc_rs` features;
its default feature set (`use_pem`) includes neither, so since the 9.3.1 -> 11.0.0
bump no crypto provider has been compiled in and every engine API request panics
while signing the JWT:

    Could not automatically determine the process-level CryptoProvider
    from jsonwebtoken crate features.

Beacon nodes talking to an execution client therefore fail authentication, receive
no payloads, produce no blocks, and the devnet5 serial tests time out waiting for
the head to advance past slot 0.

Prefer the pure-Rust provider: `ream-consensus-beacon` depends on
`ream-execution-engine` and is built for the riscv32im zkVM targets, where a C
library dependency would not build. `default-features` is disabled because only
`EncodingKey::from_secret` (HS256) is used and no PEM parsing is needed.
@perfogic
perfogic requested a review from KolbyML as a code owner July 30, 2026 19:05
@perfogic
perfogic requested a review from Kayden-ML July 30, 2026 19:07

@KolbyML KolbyML 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.

:shipit: looks good

@KolbyML
KolbyML merged commit 842a709 into ReamLabs:master Aug 6, 2026
55 of 81 checks passed
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.

2 participants