Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sui-proxy/ cleanup handler/middleware] #10100

Merged
merged 1 commit into from
Mar 30, 2023
Merged

[sui-proxy/ cleanup handler/middleware] #10100

merged 1 commit into from
Mar 30, 2023

Conversation

suiwombat
Copy link
Contributor

Summary:

  • cleanup the consumer.rs code
  • add a new middleware to decode the protobufs
  • improve error handling for rpc call to detect general rpc issues

Test Plan:

tested locally

Description

Describe the changes or additions included in this PR.

Test Plan

How did you test the new or updated feature?


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

@vercel
Copy link

vercel bot commented Mar 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated
explorer ⬜️ Ignored (Inspect) Mar 30, 2023 at 4:54PM (UTC)
explorer-storybook ⬜️ Ignored (Inspect) Mar 30, 2023 at 4:54PM (UTC)
sui-wallet-kit ⬜️ Ignored (Inspect) Mar 30, 2023 at 4:54PM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Mar 30, 2023 at 4:54PM (UTC)

Summary:

* cleanup the consumer.rs code
* add a new middleware to decode the protobufs

Test Plan:

tested locally
fn encode_compress(request: &WriteRequest) -> Result<Vec<u8>, (StatusCode, &'static str)> {
let mut buf = Vec::new();
buf.reserve(request.encoded_len());
let Ok(()) = request.encode(&mut buf) else {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
let Ok(()) = request.encode(&mut buf) else {
if request.encode(&mut buf).is_err() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll fix this on the next pr. thanks <3

Copy link
Contributor

@after-ephemera after-ephemera left a comment

Choose a reason for hiding this comment

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

lgtm

@suiwombat suiwombat merged commit e76948d into main Mar 30, 2023
@suiwombat suiwombat deleted the cleanup_proxy branch March 30, 2023 19:35
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