Merged
Conversation
Liquidation size threshold feature (large_liq_notional_threshold, large_liq_duration on PerpMarket, liquidation.rs slow-liq logic) is unrelated to PropAMM. Moved to spike/large-liq-safety. Also adds close_account and transfer_authority bankrun tests, and fixes two pre-existing prettier/lint issues in the test file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tests Extends prop_amm matching to support three fill sources with true price priority: PropAMM book levels, DLOB limit orders, and vAMM. Adds 33 new tests covering unified matching, security scenarios, and margin behavior (taker margin type selection for open/close/reduce/flip/increase, maker margin filter skip semantics with delta recalculation). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… coverage - Header v2: add order_entry_size (u16) at offset 112, 6 bytes reserved at 114, shifting ORDERS_DATA_OFFSET from 112 to 120. Runtime stride via detect_layout(). - CU optimizations: remove happy-path log, authority_matches_32 for stored authority, inline increment_sequence_number (skip MidpriceBookViewMut construction). - Fix prop_amm.rs test helper missing ORDER_ENTRY_SIZE_OFFSET write (broke 20 tests). - Add regression tests: reserved-byte passthrough, margin filter drops external_fills, partial fills, AMM zero-fill fallthrough, pro-rata allocation, short-side fills, taker position_before overflow, all-sources-above-limit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update MIDPRICE_ACCOUNT_MIN_LEN 112→120 for header v2 - Fix shared taker order: each test places its own via placeTakerLimitOrder() - Fix DLOB maker setup: addUser() after init tx so client finds on-chain account - Fix bankrunConnection.ts TS error (empty tuple type mismatch) - Rebuild midprice_pino.so with latest header changes - Add 5 new mixed fill source tests: vAMM-only, DLOB-only, PropAMM+DLOB, all sources combined, and 2+2 CU measurement - 15/15 bankrun tests passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…2e tests - Use order.get_limit_price() instead of raw order.price for proper auction/oracle price resolution - Accept Market and Oracle order types in prop_amm match validation - Add atomic signed msg taker tests: limit, market, and oracle order variants - Fix ts-mocha hanging on failure with --exit flag Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…opAMM match - Add taker fee calculation and settlement for all three fill sources (PropAMM makers, DLOB makers, vAMM) using standard drift fee functions - Change taker_order_id from u32 to Option<u32>; None resolves to user.get_last_order_id(), eliminating race conditions in atomic place+fill transactions - Add DLOB maker validation: is_resting_limit_order, max_ts expiry, reduce-only enforcement - Add taker validation: max_ts expiry, reduce-only via existing position, MarketStatus::ReduceOnly enforcement - Update TS tests to use null for atomic signed-msg place+fill cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ht checks, oracle gating, funding settlement, order bookkeeping, post-fill finalization Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone workspace with: - propamm-sdk crate: PDA derivations, instruction builders (midprice-pino native + Drift Anchor CPI), Pyth oracle parsing, async PropAmmClient, sequence/fill monitoring - maker-bot example: full quoting loop with clap CLI + env var config - one-shot-quote example: minimal single-quote demo - rust-toolchain.toml pinned to stable (parent repo uses 1.76) 10/10 unit tests passing (instruction serialization, PDA determinism). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…thods SetOracleCacheEntries now reallocs both buffers to fit the new entry count (grow or shrink), with seed constraints to prevent cross-shard misuse. Native handler updated for parity. Cache account is optional in FillPerpOrder2 — pass drift program ID as sentinel to skip. Added AdminClient methods: initializeOraclePriceCache, setOracleCacheEntries, updateOracleCacheConfig, updateOraclePriceCache. PDA helper exported from SDK. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
- PropAMM registry: approve/disable/remove instructions with hot-wallet authority support, SDK PDA helper, rollout doc - Oracle cache: publish_ts-based staleness (prefer timestamp over slot), get_oracle_ts for Pyth Pull/Lazer sources, should_update_from method - CI: new propamm-tests job (midprice_pino unit + propAmmCUs bankrun), oracle cache SDK tests in verify-sdk-configs - SDK: export oracleCache module from index, fix build script echo Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts: - Cargo.toml: take devnet's pyth_lazer local path + pythnet-sdk dep - error.rs: keep both PropAMM errors and devnet's InvalidPerpMarketConfig - adminClient.ts: keep both oracle cache methods and updatePerpMarketConfig - Cargo.lock: regenerated Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- isolated_transfer_tests.rs: fix duplicate create_account_info import - user/tests.rs: remove unused imports and prefix unused variables - liquidation/tests.rs: remove unused imports and unnecessary mut Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
be52505 to
db18928
Compare
8038cc0 to
8bfa8a3
Compare
8bfa8a3 to
2f63f8a
Compare
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.
No description provided.