Skip to content

Commit

Permalink
[Trivial] Log when order with unknown appData is placed (#2181)
Browse files Browse the repository at this point in the history
# Description
It is our intention to forbid orders which provide an appDataHash which
we cannot load the pre-image for (as users may later claim they
specified meta-intents such as pre and post hooks, without the protocol
being able to send them to solvers.

Before we do that, we want to make sure we are not breaking existing
implementations.

# Changes
<!-- List of detailed changes (how the change is accomplished) -->

- [ ] Add a log for whenever an order with an appData hash which we
cannot find (and therefore for now assume the default AppData for) is
placed.

## How to test
CI

<!--
## Related Issues

Fixes #
-->
  • Loading branch information
fleupold authored Dec 18, 2023
1 parent 2f52855 commit 12d1af4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/shared/src/order_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ impl OrderValidating for OrderValidator {
let protocol = if let Some(full) = full_app_data_override {
validate(full)?.protocol
} else {
tracing::warn!(hash = hex::encode(hash.0), "Unknown appData pre-image");
ProtocolAppData::default()
};

Expand Down

0 comments on commit 12d1af4

Please sign in to comment.