Allow single-node payments with one quote#150
Open
mickvandijke wants to merge 2 commits into
Open
Conversation
ef4091f to
2e9599e
Compare
…sholds - Remove unused `price` from loops processing quotes. - Replace inline constants with `SINGLE_NODE_PAYMENT_MULTIPLIER` and `SINGLE_NODE_MIN_QUOTE_COUNT`. - Enforce quote count constraints and sort by price in single-node payment calculations. - Add tests for quote processing, extended range validation, and payment behavior.
grumbach
approved these changes
Jul 14, 2026
grumbach
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the selection and payment changes. The degraded path only goes as far as needed: quote collection still attempts the full 7, selection takes the largest quorum-supported set (iterating down from 7), and the witness quorum requirement itself is unchanged. The median index matches the node verifier for every quote count, and the parity test against the protocol implementation at full size is a good drift guard. The merkle/closest-by-distance path correctly keeps the full close-group requirement.
Two non-blocking notes:
- an e2e test for the actual 1-quote payment + PUT + readback path would be good as a follow-up (unit tests cover selection and payment construction, but not the full flow)
- PreparedChunk::payment is a public type change, so ant-core needs the semver bump at release
Security Audit failure is inherited from main (crossbeam-epoch advisory), not from this PR.
The node-side price floor discussed in Slack lands separately.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Tests