dex: 🌸 apply "fix chain halt in testnet 68" to main #3950
Merged
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.
Testnet 68 halted at height 100736, with an
.expect
here:penumbra/crates/core/component/dex/src/component/dex.rs
Line 66 in 1c99e24
This hit an error bubbled up from here:
penumbra/crates/core/component/dex/src/component/router/route_and_fill.rs
Line 277 in 1c99e24
The error occurs in this method, which is only ever used at that callsite:
penumbra/crates/core/component/dex/src/swap_execution.rs
Line 18 in 1c99e24
It's a little unclear why that method has double fallibility. Unfortunately, the answer may not be easily determined. It was added here
9cd566d
which indicates that there was previously an infallible
max_price
, but that code isn't included in the commit; the previous reference to an infalliblemax_price
was added in this commitb4b2635
which doesn't have the impl either, so presumably it got mangled during rebasing.
In any case, removing the double fallibility, as in this commit, allows committing block 100736 on testnet 68, which I verified by running this code against a local copy of a state snapshot.