fix: restore engine API JWT signing after jsonwebtoken 11 bump - #1546
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong?
Since the

jsonwebtoken9.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):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:rust_cryptooveraws_lc_rs: prefer the pure-Rust provider, sinceream-consensus-beacondepends onream-execution-engineand is also built for the riscv32im zkVM targets.default-features = false: onlyEncodingKey::from_secret(HS256) is used, so the defaultuse_pemparsing can be omitted.To-Do
Additional Context:
lean clientandbeacon clienttests passed on fix: restore engine API JWT signing after jsonwebtoken 11 bump ream-collective/ream#11, except fortest_lean_node_checkpoint_sync_from_fresh_source(this is failed on previous PRs)So this PR don't affect the state of
lean client.Thanks!