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

Driver sends quote response with JIT orders #3103

Merged
merged 67 commits into from
Dec 2, 2024

Conversation

squadgazzz
Copy link
Contributor

@squadgazzz squadgazzz commented Nov 1, 2024

Description

Closes task n3 from #3082 by start sending the new /quote response with the updated fields that include clearing prices instead of the executed amount, jit orders and pre-interactions.

Changes

  • Updated driver's /quote response which is now supported by the trade verifier.

How to test

New driver's and services' e2e tests.

Copy link

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.

@github-actions github-actions bot added the stale label Nov 27, 2024
@github-actions github-actions bot removed the stale label Nov 28, 2024
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Looks alright to me. I would just like to understand the e2e test better before approving.

crates/driver/src/tests/cases/quote.rs Show resolved Hide resolved
crates/e2e/tests/e2e/cow_amm.rs Outdated Show resolved Hide resolved
crates/e2e/tests/e2e/cow_amm.rs Outdated Show resolved Hide resolved
crates/e2e/tests/e2e/cow_amm.rs Show resolved Hide resolved
Copy link

github-actions bot commented Dec 2, 2024

Reminder: Please consider backward compatibility when modifying the API specification.
If breaking changes are unavoidable, ensure:

  • You explicitly pointed out breaking changes.
  • You communicate the changes to affected teams.
  • You provide proper versioning and migration mechanisms.

Caused by:

Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Good job! 👏

squadgazzz added a commit that referenced this pull request Dec 2, 2024
# Description
Closes task n2 from #3082
by implementing support of the quotes with JIT orders in the trade
verifier. For a gradual migration, it has to support both quote
versions.

# Changes

- [ ] Added a new version of the trade with JIT orders.
- [ ] Utilized the clearing prices to calculate the out amount.
- [ ] Altered the `Solver.sol` helper contract to fetch all token
balances as was proposed in [one of the
comments](#3085 (comment)),
which reduces the overall code complexity.
- [ ] Bumped into an issue while converting floats into `BigRational`.
~~Implemented a workaround with converting float's string representation
into `BigRational`.~~ Used `BigDecimal` in the config instead.

## How to test
Unit tests. e2e would be possible only once the driver support is
implemented(see #3103).
Base automatically changed from 3082/trade-verifier-jit-orders-support to main December 2, 2024 13:18
# Conflicts:
#	crates/e2e/tests/e2e/quote_verification.rs
#	crates/shared/src/trade_finding/mod.rs
@squadgazzz squadgazzz enabled auto-merge (squash) December 2, 2024 13:21
@squadgazzz squadgazzz merged commit 1413398 into main Dec 2, 2024
11 checks passed
@squadgazzz squadgazzz deleted the 3082/driver-sends-quote-jit-orders branch December 2, 2024 13:28
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants