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

Make bounded_visitor default bound configurable #17310

Open
henrymai opened this issue Apr 24, 2024 · 0 comments
Open

Make bounded_visitor default bound configurable #17310

henrymai opened this issue Apr 24, 2024 · 0 comments

Comments

@henrymai
Copy link

henrymai commented Apr 24, 2024

Steps to Reproduce Issue

Upon trying to perform a sui_tryMultiGetPastObjects on checkpoint 32260640, we get the following error:

RPC call sui_tryMultiGetPastObjects failed (1 retries remaining): ErrorObject { code: ServerError(-32000), message: "RPC call failed: Failure serializing object in the requested format: \"Deserialized value too large\"", data: None }
Pipe terminated: Err(Failed to process checkpoint: 32260640

Caused by:
    0: getting past objects
    1: Failed to process `sui_multiGetPastObjects`
    2: ErrorObject { code: ServerError(-32000), message: "RPC call failed: Failure serializing object in the requested format: \"Deserialized value too large\"", data: None }
    3: ErrorObject { code: ServerError(-32000), message: "RPC call failed: Failure serializing object in the requested format: \"Deserialized value too large\"", data: None }

I'm not sure exactly which object right now since our logs don't mention it.

However, upon digging through the code, it looks like a potential fix for this is to just allow the bounded_visitor default bound (or deserialization code path) to be configurable.

Here are some more details from tracing the error in the SUI codebase:

This is the error:

#[error("Deserialized value too large")]
OutOfBudget,

The error is returned in bounded_visitor.rs:debit() :

Err(Error::OutOfBudget)

debit() is called while deserializing the struct.

The struct deserialization path just uses Self::default()

self.bound defaults to const MAX_BOUND: usize = 1024 * 1024;

Since we are running our own SUI node, a quick fix for this would be to make the default for self.bound configurable rather than using a hardcoded const, and then we can re-deploy the updated version with the appropriate configuration increasing the default bound.

Expected Result

Expect to be able to successfully retrieve the object history when using sui_tryMultiGetPastObjects.

Actual Result

SUI RPC node error in the description above.

System Information

  • OS: Ubuntu 22.04.3 LTS
  • Compiler: N/A (using a prebuilt image: mysten/sui-node:mainnet-v1.23.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants