Skip to content

go/proxyd: Proxy requests using batch JSON-RPC#2480

Merged
mergify[bot] merged 3 commits intoethereum-optimism:developfrom
Inphi:inphi/batch-causality
May 2, 2022
Merged

go/proxyd: Proxy requests using batch JSON-RPC#2480
mergify[bot] merged 3 commits intoethereum-optimism:developfrom
Inphi:inphi/batch-causality

Conversation

@Inphi
Copy link
Contributor

@Inphi Inphi commented Apr 19, 2022

We forward several RPC request objects to upstreams using the JSON-RPC
batch functionality. This should be more efficient than serialized RPC
request proxying the round-trip latency of the remaining request objects
are eliminated.

A new server config, max_upstream_batch_size, is introduced to limit
the number of RPC request objects in a single batch request. This is to
avoid overloading upstream as proxyd may accept a large number of
request objects in a single request by having a large max_body_size_bytes
config value.

@changeset-bot
Copy link

changeset-bot bot commented Apr 19, 2022

⚠️ No Changeset found

Latest commit: 8a008ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify mergify bot requested review from cfromknecht and tuxcanfly April 19, 2022 04:26
@mergify
Copy link
Contributor

mergify bot commented Apr 19, 2022

Hey @Inphi! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Apr 19, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 19, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@Inphi Inphi force-pushed the inphi/batch-causality branch from ca1366a to f10ebb6 Compare April 19, 2022 13:49
@mergify mergify bot removed the conflict label Apr 19, 2022
@Inphi Inphi force-pushed the inphi/batch-causality branch from f10ebb6 to bba4660 Compare April 28, 2022 05:53
@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2022

Hey @Inphi! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Apr 28, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@Inphi Inphi force-pushed the inphi/batch-causality branch from 9257945 to f5acf11 Compare April 29, 2022 20:07
@Inphi Inphi marked this pull request as ready for review April 29, 2022 20:07
@mergify mergify bot removed the conflict label Apr 29, 2022
We forward several RPC request objects to upstreams using the JSON-RPC
batch functionality. This should be more efficient than serialized RPC
request proxying the round-trip latency of the remaining request objects
are eliminated.

A new server config, `max_upstream_batch_size`, is introduced to limit
the number of RPC request objects in a single batch request. This is to
avoid overloading upstream as proxyd may accept a large number of
request objects in a single request by having a large `max_body_size_bytes`
config value.
@Inphi Inphi force-pushed the inphi/batch-causality branch from f5acf11 to 19a5563 Compare April 29, 2022 20:11
@mslipper
Copy link
Collaborator

Apart from that one request above, this LGTM.

Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

LGTM, looking forward to seeing this land! 🎉

@mergify
Copy link
Contributor

mergify bot commented May 2, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented May 2, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot merged commit f48bd87 into ethereum-optimism:develop May 2, 2022
@mslipper mslipper mentioned this pull request May 10, 2022
@mslipper mslipper mentioned this pull request May 10, 2022
theochap pushed a commit that referenced this pull request Dec 10, 2025
)

## Summary

Updates doc comments in the `kona-protocol` crate to properly format
code references with backticks so they render correctly in generated
documentation.

## Problem

Code references in doc comments like `[BlockInfo]` were not being
rendered as code in the generated documentation because they lacked
backticks. This made the documentation less readable and inconsistent
with Rust documentation conventions.

## Solution

Systematically updated all doc comments in the `kona-protocol` crate to
format code references with backticks:

- `[BlockInfo]` → `[`BlockInfo`]`
- `[OpAttributesWithParent]` → `[`OpAttributesWithParent`]` 
- `[L2BlockInfo]` → `[`L2BlockInfo`]`
- And many more...

## Changes

- **33 files modified** across the `kona-protocol` crate
- **76 code references** properly formatted with backticks
- Automated approach using Python script to ensure consistency and
reduce manual errors
- All changes preserve existing functionality while improving
documentation readability

## Examples

**Before:**
```rust
/// Create a new [OpAttributesWithParent] instance.
/// Returns the [BlockInfo] for this block.
```

**After:**
```rust
/// Create a new [`OpAttributesWithParent`] instance.
/// Returns the [`BlockInfo`] for this block.
```

## Verification

- ✅ Documentation builds successfully (`cargo doc` passes)
- ✅ Code compiles without issues (`cargo check` passes)
- ✅ Generated HTML documentation properly renders code references with
`<code>` tags
- ✅ No functional changes to the codebase

This improvement enhances the developer experience by making the API
documentation more readable and following Rust documentation best
practices.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: refcell <21288394+refcell@users.noreply.github.com>
Co-authored-by: refcell <abigger87@gmail.com>
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.

3 participants