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

dex: rework fill_route to ensure we always make progress #2513

Merged
merged 18 commits into from
May 10, 2023
Merged

Conversation

hdevalence
Copy link
Member

Closes #2507 , along the lines of the comments there.

@hdevalence hdevalence temporarily deployed to smoke-test May 9, 2023 00:04 — with GitHub Actions Inactive
app/src/dex/router/tests.rs Outdated Show resolved Hide resolved
@hdevalence hdevalence temporarily deployed to smoke-test May 9, 2023 17:05 — with GitHub Actions Inactive
@hdevalence hdevalence temporarily deployed to smoke-test May 9, 2023 17:52 — with GitHub Actions Inactive

frontier_position_ids.insert(next_position_id);
frontier[constraining_index] = next_position;
// TODO: should we remove the old position's ID from the ID set?
Copy link
Member

Choose a reason for hiding this comment

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

I think, but I'm not certain, that we are missing a break 'next_position. AFAICT, it would make sense to have it here when we have a bona fide next_position to roll with

@hdevalence hdevalence temporarily deployed to smoke-test May 9, 2023 20:11 — with GitHub Actions Inactive
@hdevalence hdevalence temporarily deployed to smoke-test May 9, 2023 20:38 — with GitHub Actions Inactive

// We need to save these positions, because we mutated their state, even
// if we didn't fully consume their reserves.
for position in frontier {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be in the filling loop, otherwise we might execute against stale orders on later fils?

@hdevalence hdevalence temporarily deployed to smoke-test May 10, 2023 04:49 — with GitHub Actions Inactive
@hdevalence hdevalence marked this pull request as ready for review May 10, 2023 05:51
@hdevalence hdevalence changed the title [WIP] dex: rework fill_route dex: rework fill_route to ensure we always make progress May 10, 2023
hdevalence and others added 3 commits May 9, 2023 23:23
@hdevalence hdevalence temporarily deployed to smoke-test May 10, 2023 06:24 — with GitHub Actions Inactive
@hdevalence hdevalence merged commit e6c85ef into main May 10, 2023
@hdevalence hdevalence deleted the fillroute-v2 branch May 10, 2023 06:39
@cratelyn cratelyn added the A-dex Area: Relates to the dex label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dex Area: Relates to the dex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign routing execution
3 participants