-
Notifications
You must be signed in to change notification settings - Fork 13
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
Deserialization Error in MarketMap::sync for SpotMarket #55
Comments
thank you for the detailed issue! please confirm 2 things:
must use a rust version I'll take a look at your improved logging suggestions |
stable-aarch64-apple-darwin (default) Mac M2. Will attempt to switch toolchain host and report back. |
Unfortunately changing the toolchain does not resolve the problem. Although the gateway is able to be initialised, after just a few seconds it will panic. Likely due to
|
hmm and was it rust version <= if downgrading rust versions doesn't solve it, then some info about the gateway RPC provider used, startup command, and commit would be great to help me reproduce the issue. |
downgrading to gateway RPC provider is a helius mainnet RPC. |
Issue Resolved.To resolve a similar issue to mine you must vendor |
Description
We are encountering a
SizeMismatch
error when deserializingSpotMarket
data in theMarketMap::sync
method. This error occurs during the initialization of the Drift Gateway, preventing the system from properly syncing market data.Error Details
The error occurs in the following function:
This suggests that there's a mismatch between the expected size of the
SpotMarket
struct and the actual size of the data being deserialized.Possible Causes
SpotMarket
struct definition in the SDK might not match the current on-chain data structure.Impact
This error prevents the Drift Gateway from initializing properly, which could lead to system-wide issues and prevent proper market data synchronization.
Suggested Investigation Steps
SpotMarket
struct definition in the SDK with the on-chain program's definition.SpotMarket
struct or related serialization/deserialization logic.Proposed Solution: Improved Logging and Error Handling
We suggest implementing more robust logging and error handling in the
MarketMap::sync
method. Here's a proposed update to thesync
function:This implementation provides:
Additional Context
We're using the latest version of the Drift Protocol SDK. The error occurs consistently during the Drift Gateway initialization process.
Next Steps
We would appreciate your insights on this issue and the proposed solution. If you need any additional information or if you'd like us to perform any specific tests, please let us know.
The text was updated successfully, but these errors were encountered: