Skip to content

fix: tokio-tungstenite 0.29 Message API needs Utf8Bytes / Bytes#17

Merged
satyakwok merged 1 commit into
mainfrom
chore/tungstenite-fix
May 12, 2026
Merged

fix: tokio-tungstenite 0.29 Message API needs Utf8Bytes / Bytes#17
satyakwok merged 1 commit into
mainfrom
chore/tungstenite-fix

Conversation

@satyakwok
Copy link
Copy Markdown
Member

@satyakwok satyakwok commented May 12, 2026

Followup to #9 (tokio-tungstenite 0.24 → 0.29) which broke main behind the bft feature flag.

Two callsites in src/bft.rs needed updating:

  • Message::Text(s)Message::Text(s.into()) (Utf8Bytes wrapper)
  • Message::Ping(vec![])Message::Ping(Default::default()) (Bytes wrapper)

Verified: cargo check --all-features clean, cargo test --all-features 10+1/11 pass.

Summary by CodeRabbit

  • Bug Fixes
    • Improved WebSocket message handling and keepalive mechanism for enhanced reliability in subscription requests.

Review Change Stack

The tokio-tungstenite 0.24 → 0.29 bump (#9) merged green because cargo
check defaults ran without --all-features, missing the `bft` feature's
two callsites:

  Message::Text(String) → Message::Text(Utf8Bytes)
  Message::Ping(Vec<u8>) → Message::Ping(Bytes)

`s.into()` and `Default::default()` cover both. Behaviour identical.
@satyakwok satyakwok enabled auto-merge (squash) May 12, 2026 07:26
@satyakwok satyakwok merged commit 5553e99 into main May 12, 2026
3 of 4 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 697266a3-85bb-4e91-aac7-51c52796d6b7

📥 Commits

Reviewing files that changed from the base of the PR and between f494669 and fdb0708.

📒 Files selected for processing (1)
  • src/bft.rs

📝 Walkthrough

Walkthrough

This PR makes two focused updates to WebSocket message construction in the BFT driver. Line 267 changes how outbound text frames are built when forwarding eth_subscribe requests, now explicitly calling .into() on the string. Line 286 updates the keepalive ping mechanism to use Default::default() instead of an empty vector for the ping payload. These are minor formatting changes to message creation with no alteration to subscription, request-response, or control flow logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

dependencies, rust

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/tungstenite-fix

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant