Batch intent view, dust-tolerant fills, slash-cycle cap, reputation badge - #323
Open
knytcomics-ui wants to merge 1 commit into
Open
Conversation
…tion badge - Add get_intents_batch for bulk intent lookups, wired into the solver bot example (Closes stellar-vortex-protocol#250). - Add ProtocolConfig.min_partial_fill and dust_tolerance_bps so fill_intent rejects dust-spam fills and treats near-complete fills as Filled (Closes stellar-vortex-protocol#247). - Cap Open -> Accepted -> Slashed cycles via ProtocolConfig.max_slash_cycles; intents exceeding it move to a new terminal Abandoned state (Closes stellar-vortex-protocol#241). - Add a design note and minimal reputation_badge prototype contract for a soulbound solver tier badge (Closes stellar-vortex-protocol#242). Note: intent_settlement/src/lib.rs already fails to build on main (undefined DEFAULT_MIN_BOND/MAX_PROTOCOL_FEE_BPS/etc. constants referenced by set_config/load_config, pre-existing from PR stellar-vortex-protocol#184); CI on main is currently red for the same reason. No Rust toolchain was available in this environment to run cargo fmt/clippy/test locally.
|
@knytcomics-ui Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Four assigned issues bundled into one PR:
get_intents_batch#250 —get_intents_batch(intent_ids)view onintent_settlement, bounded byMAX_BATCH_SIZE, mirroringget_intent'sOption<IntentRecord>semantics per entry.examples/risk_aware_solver_bot.pygainsget_intents_batch/screen_candidateshelpers demonstrating the batched call.ProtocolConfig.min_partial_fillanddust_tolerance_bps(admin-configurable viaset_config).fill_intentnow rejects non-completing fills below the floor, and treats a fill landing within the dust tolerance ofmin_dst_amountasFilledinstead of leaving an unfillablePartiallyFilledremainder. README's fee/fill discussion and error table updated (newFillTooSmallerror).Open → Accepted → Slashedcycles per intent #241 —ProtocolConfig.max_slash_cyclesandIntentRecord.slash_cycles.slash_solvernow retires an intent to a new terminalAbandonedstate (instead of re-opening indefinitely) once it hits the cap, preserving partial-fill progress. Newintent_abandonedevent. SECURITY.md, README's lifecycle diagram, anddocs/event-schema.md's transition table updated.docs/242-reputation-tier-badge-design.mdresolvesdocs/solver-registry-design.md§10 Q3 (soulbound, bespoke contract, auto mint/burn on tier change). Minimalreputation_badgeprototype crate (mint_badge/burn_badge/get_badge, admin-gated as a placeholder untilsolver_registryfrom issue fix: block solver deregistration while holding an accepted intent #1 exists) with tests covering mint-on-promotion, burn-on-demotion, and per-solver query isolation.Closes #250
Closes #247
Closes #241
Closes #242
Validation performed
cargo fmt/clippy/testcould not be run locally.intent_settlement/src/lib.rsonmainalready fails to compile —set_config/load_configreferenceDEFAULT_MIN_BOND,DEFAULT_FILL_WINDOW,DEFAULT_INTENT_EXPIRY,DEFAULT_PROTOCOL_FEE_BPS,MAX_PROTOCOL_FEE_BPS,MIN_FILL_WINDOW_SECS,MIN_INTENT_EXPIRY_SECS,MIN_BOND_FLOOR,MAX_BATCH_SIZE, andMAX_EXTENSION_DURATION, none of which are defined anywhere in the crate (introduced by the mergedfeat/protocol-fee-capPR feat: add max protocol fee cap and admin audit trail #184). CI onmain's latest commits shows this as a standing failure, predating this branch. This PR does not touch or fix those names — it follows the same (currently-broken) references for consistency, per new-field additions toProtocolConfig/IntentRecord/Error/IntentStateand the newreputation_badgecrate (not part of CI'sintent_settlement-scoped workflow, so unaffected by the above).examples/risk_aware_solver_bot.pychanges verified withpython3 -m py_compile.main, please runcargo build/cargo testin CI or locally before merging to confirm this PR's additions are syntactically correct — I was unable to do so myself.