Skip to content

feat: implement issues #375, #376, #377, #378 - #448

Merged
james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
lordstephen9:feat/issues-375-376-377-378
Sep 30, 2026
Merged

james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
lordstephen9:feat/issues-375-376-377-378

Conversation

@lordstephen9

Copy link
Copy Markdown

#375 — Hot-path storage consolidation (InvocationCtx)

  • Add InvocationCtx struct that loads Config, FeeRecipient, OpenIntents, and TotalVolume exactly once per invocation
  • Update accept_intent_inner, fill_intent_inner, slash_solver to use InvocationCtx; commit dirty counters before any external call (CEI)
  • Document reentrancy invariant in struct doc comment
  • Fix duplicate constant definitions (DISPUTE_WINDOW, ARBITER_WINDOW, SLASH_COOLDOWN, MAX_BATCH_SIZE, MAX_EXTENSION_DURATION, DEFAULT_*)
  • Fix duplicate accept_intent_inner / batch_fill_intent / batch_cancel_intent
  • Add DEFAULT_MAX_ACTIVE_INTENTS_PER_SOLVER constant
  • Fix slash_solver: remove broken fee_recipient_share/caller_rebate/ slash_cycles dead code; use InvocationCtx for single fee_recipient read
  • Add all missing Error variants (BatchTooLarge, ImplausibleDstAmount, MaxActiveIntentsCapReached, TimelockNotElapsed, InvalidConfig, etc.)
  • Update docs/149-resource-cost-per-entrypoint.md with before/after table

#376 — Core/periphery split

  • Add intent_periphery/ crate: thin proxy contract that exposes heavy view surfaces (list_solvers, list_open_intents, get_stats, etc.) via cross-contract calls to core, keeping core wasm small and auditable

#377 — SDK upgrade migration notes

  • Add docs/event-schema.md migration note covering typed events, test registration API change, TTL/auth API notes, and event compatibility testing steps

#378 — Pluggable pre-submission policy hook

  • Add DataKey::PolicyContract, DataKey::PendingPolicy
  • Add Error::PolicyRejected, Error::NoPendingPolicy
  • Add propose_set_policy / execute_set_policy / get_policy admin fns timelocked by ADMIN_TIMELOCK_DELAY
  • Add check_policy helper: fail-closed, zero-cost when unset
  • Wire check_policy into submit_intent_inner (before state changes)
  • Add examples/policy_daily_cap/ reference policy with per-user 24h cap
  • Document policy hook events in docs/event-schema.md

Also: update .gitignore to exclude *.optimized.wasm, criterion/, flamegraph artifacts, and Cargo.lock files for new sub-crates

Summary

Related issue

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI / tooling

Component

  • Contract (vortex-contract)
  • Backend (vortex-backend)
  • Frontend (vortex-frontend)

Checklist

  • My code follows the project's style and conventions
  • I ran lint / type-check / build locally and they pass
  • I added or updated tests where appropriate
  • I updated documentation where appropriate
  • My commits follow Conventional Commits

Screenshots / notes

Closes
Closes #375
Closes #376
Closes #377
Closes #378

…otocol#376, stellar-vortex-protocol#377, stellar-vortex-protocol#378

stellar-vortex-protocol#375 — Hot-path storage consolidation (InvocationCtx)
- Add InvocationCtx struct that loads Config, FeeRecipient,
  OpenIntents, and TotalVolume exactly once per invocation
- Update accept_intent_inner, fill_intent_inner, slash_solver to use
  InvocationCtx; commit dirty counters before any external call (CEI)
- Document reentrancy invariant in struct doc comment
- Fix duplicate constant definitions (DISPUTE_WINDOW, ARBITER_WINDOW,
  SLASH_COOLDOWN, MAX_BATCH_SIZE, MAX_EXTENSION_DURATION, DEFAULT_*)
- Fix duplicate accept_intent_inner / batch_fill_intent / batch_cancel_intent
- Add DEFAULT_MAX_ACTIVE_INTENTS_PER_SOLVER constant
- Fix slash_solver: remove broken fee_recipient_share/caller_rebate/
  slash_cycles dead code; use InvocationCtx for single fee_recipient read
- Add all missing Error variants (BatchTooLarge, ImplausibleDstAmount,
  MaxActiveIntentsCapReached, TimelockNotElapsed, InvalidConfig, etc.)
- Update docs/149-resource-cost-per-entrypoint.md with before/after table

stellar-vortex-protocol#376 — Core/periphery split
- Add intent_periphery/ crate: thin proxy contract that exposes heavy
  view surfaces (list_solvers, list_open_intents, get_stats, etc.) via
  cross-contract calls to core, keeping core wasm small and auditable

stellar-vortex-protocol#377 — SDK upgrade migration notes
- Add docs/event-schema.md migration note covering typed events,
  test registration API change, TTL/auth API notes, and event
  compatibility testing steps

stellar-vortex-protocol#378 — Pluggable pre-submission policy hook
- Add DataKey::PolicyContract, DataKey::PendingPolicy
- Add Error::PolicyRejected, Error::NoPendingPolicy
- Add propose_set_policy / execute_set_policy / get_policy admin fns
  timelocked by ADMIN_TIMELOCK_DELAY
- Add check_policy helper: fail-closed, zero-cost when unset
- Wire check_policy into submit_intent_inner (before state changes)
- Add examples/policy_daily_cap/ reference policy with per-user 24h cap
- Document policy hook events in docs/event-schema.md

Also: update .gitignore to exclude *.optimized.wasm, criterion/,
flamegraph artifacts, and Cargo.lock files for new sub-crates
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@lordstephen9 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! 🚀

Learn more about application limits

…-377-378

# Conflicts:
#	intent_settlement/src/lib.rs
@james2177
james2177 merged commit 5d2a48e into stellar-vortex-protocol:main Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment