fix: decode OrderUid.validTo as big-endian in Autopilot#4404
Merged
Conversation
Matches the on-chain layout per GPv2Order.packOrderUidParams (Solidity uint32 is packed BE) and the canonical implementation in model::OrderUid::parts. The previous from_le_bytes was dormant because parts() is private and its sole caller, owner(), reads .1; switching to BE prevents future callers from reading wrong validTo values.
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the OrderUid decomposition logic in crates/autopilot/src/domain/auction/order.rs by changing the byte order conversion for the final 4 bytes from little-endian to big-endian. No review comments were provided for these changes, and I have no feedback to provide.
jmg-duarte
reviewed
May 12, 2026
|
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AryanGodara
approved these changes
May 20, 2026
jmg-duarte
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug in validTo decoding.
Correct decoding uses BE in gpv2 settlement, model crate, driver crate. Only in this place LE is used which is wrong.