Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic installation fails & 200 tests fail #1251

Closed
Jovonni opened this issue Oct 10, 2024 · 2 comments
Closed

Basic installation fails & 200 tests fail #1251

Jovonni opened this issue Oct 10, 2024 · 2 comments

Comments

@Jovonni
Copy link

Jovonni commented Oct 10, 2024

What version of rustc, and solana dependencies does this repo need?

I am not seeing many detailed installation instructions here that work.

I have tried with rustc 1.76.0 (07dca489a 2024-02-04) and rustc 1.81.0 (eeb90cda1 2024-09-04), but still get roughly ~200 failed tests. Not sure if this is related to #891, because its soluditons do not work

using a mac M1 (12.2.1)

Failed tests logs here:

cargo test
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
warning: unused import: `crate::PERCENTAGE_PRECISION`
 --> programs/drift/src/math/spot_balance.rs:8:5
  |
8 | use crate::PERCENTAGE_PRECISION;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: variable does not need to be mutable
 --> programs/drift/src/math/fuel/tests.rs:8:13
  |
8 |         let mut perp_market = PerpMarket {
  |             ----^^^^^^^^^^^
  |             |
  |             help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
  --> programs/drift/src/math/fuel/tests.rs:53:13
   |
53 |         let mut spot_market = SpotMarket {
   |             ----^^^^^^^^^^^
   |             |
   |             help: remove this `mut`

warning: `drift` (lib) generated 1 warning (run `cargo fix --lib -p drift` to apply 1 suggestion)
warning: `drift` (lib test) generated 3 warnings (1 duplicate) (run `cargo fix --lib -p drift --tests` to apply 2 suggestions)
    Finished test [unoptimized + debuginfo] target(s) in 0.47s
     Running unittests src/lib.rs (target/debug/deps/drift-dba1d4a307e6d33c)

running 662 tests

... successful tests here...

failures:

many failed tests

---- math::margin::tests::validate_spot_margin_trading::sol_ask_larger_than_deposit stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:787
thread 'math::margin::tests::validate_spot_margin_trading::sol_ask_larger_than_deposit' panicked at programs/drift/src/math/margin/tests.rs:2689:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Err(MarginTradingDisabled)

---- math::margin::tests::validate_spot_margin_trading::sol_ask_smaller_than_deposit stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:787
thread 'math::margin::tests::validate_spot_margin_trading::sol_ask_smaller_than_deposit' panicked at programs/drift/src/math/margin/tests.rs:2772:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Ok(())

---- math::margin::tests::validate_spot_margin_trading::sol_bids_value_larger_than_usdc_deposit stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:802
thread 'math::margin::tests::validate_spot_margin_trading::sol_bids_value_larger_than_usdc_deposit' panicked at programs/drift/src/math/margin/tests.rs:2938:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Err(MarginTradingDisabled)

---- math::margin::tests::validate_spot_margin_trading::sol_bids_value_smaller_than_usdc_deposit stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:802
thread 'math::margin::tests::validate_spot_margin_trading::sol_bids_value_smaller_than_usdc_deposit' panicked at programs/drift/src/math/margin/tests.rs:3021:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Ok(())

---- math::margin::tests::validate_spot_margin_trading::sol_ask_with_borrow stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:787
thread 'math::margin::tests::validate_spot_margin_trading::sol_ask_with_borrow' panicked at programs/drift/src/math/margin/tests.rs:2855:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Err(MarginTradingDisabled)

---- math::margin::tests::validate_spot_margin_trading::sol_bids_with_usdc_borrow stdout ----
Could not find spot market 1 at programs/drift/src/math/margin.rs:802
thread 'math::margin::tests::validate_spot_margin_trading::sol_bids_with_usdc_borrow' panicked at programs/drift/src/math/margin/tests.rs:3104:9:
assertion `left == right` failed
  left: Err(SpotMarketNotFound)
 right: Err(MarginTradingDisabled)

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_ask_with_imf stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_ask_with_imf' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_bid_with_imf stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_bid_with_imf' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_when_long_5x stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_when_long_5x' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_custom_margin_ratio stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_custom_margin_ratio' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_custom_margin_ratio stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_custom_margin_ratio' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_when_short_5x stdout ----
thread 'math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_when_short_5x' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_ask_with_imf stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_ask_with_imf' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_already_short stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_already_short' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_with_imf stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_with_imf' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell_already_long stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell_already_long' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_bid_custom_margin_ratio stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_bid_custom_margin_ratio' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_sell_custom_margin_ratio stdout ----
thread 'math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_sell_custom_margin_ratio' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- state::oracle::tests::switchboard_on_demand stdout ----
thread 'state::oracle::tests::switchboard_on_demand' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.0/src/internal.rs:32:3:
from_bytes>TargetAlignmentGreaterAndInputNotAligned

---- state::order_params::tests::get_close_perp_params::btc stdout ----
thread 'state::order_params::tests::get_close_perp_params::btc' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anchor-lang-0.29.0/src/accounts/account_loader.rs:188:59:
range end index 1240 out of range for slice of length 1216

---- state::order_params::tests::get_close_perp_params::test_default_starts_on_perp_markets stdout ----
thread 'state::order_params::tests::get_close_perp_params::test_default_starts_on_perp_markets' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anchor-lang-0.29.0/src/accounts/account_loader.rs:188:59:
range end index 1240 out of range for slice of length 1216

---- state::order_params::tests::get_close_perp_params::doge stdout ----
thread 'state::order_params::tests::get_close_perp_params::doge' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anchor-lang-0.29.0/src/accounts/account_loader.rs:188:59:
range end index 1240 out of range for slice of length 1216

---- state::traits::tests::market_index_offset::spot_market stdout ----
thread 'state::traits::tests::market_index_offset::spot_market' panicked at programs/drift/src/state/traits/tests.rs:88:9:
assertion `left == right` failed
  left: 0
 right: 11

---- state::traits::tests::market_index_offset::perp_market stdout ----
thread 'state::traits::tests::market_index_offset::perp_market' panicked at programs/drift/src/state/traits/tests.rs:102:9:
assertion `left == right` failed
  left: 0
 right: 11

---- state::traits::tests::size::perp_market stdout ----
thread 'state::traits::tests::size::perp_market' panicked at programs/drift/src/state/traits/tests.rs:22:9:
assertion `left == right` failed
  left: 1216
 right: 1240

---- state::traits::tests::size::spot_market stdout ----
thread 'state::traits::tests::size::spot_market' panicked at programs/drift/src/state/traits/tests.rs:29:9:
assertion `left == right` failed
  left: 776
 right: 808

---- state::traits::tests::size::state stdout ----
thread 'state::traits::tests::size::state' panicked at programs/drift/src/state/traits/tests.rs:43:9:
assertion `left == right` failed
  left: 992
 right: 1016


failures:
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::failure_due_to_limit_price
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::success_with_limit_price
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::successful_liquidation_dust_position
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::successful_liquidation_liability_transfer_implied_by_pnl
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::successful_liquidation_liability_transfer_to_cover_margin_shortage
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::successful_liquidation_liquidator_max_liability_transfer
    controller::liquidation::tests::liquidate_borrow_for_perp_pnl::successful_liquidation_over_multiple_slots
    controller::liquidation::tests::liquidate_perp::fail_liquidating_long_perp_due_to_limit_price
    controller::liquidation::tests::liquidate_perp::fail_liquidating_short_perp_due_to_limit_price
    controller::liquidation::tests::liquidate_perp::liquidate_user_with_step_size_position
    controller::liquidation::tests::liquidate_perp::liquidation_accelerated
    controller::liquidation::tests::liquidate_perp::liquidation_over_multiple_slots
    controller::liquidation::tests::liquidate_perp::partial_liquidation_oracle_down_20_pct
    controller::liquidation::tests::liquidate_perp::successful_liquidation_by_canceling_order
    controller::liquidation::tests::liquidate_perp::successful_liquidation_half_of_if_fee
    controller::liquidation::tests::liquidate_perp::successful_liquidation_long_perp
    controller::liquidation::tests::liquidate_perp::successful_liquidation_long_perp_whale_imf_factor
    controller::liquidation::tests::liquidate_perp::successful_liquidation_portion_of_if_fee
    controller::liquidation::tests::liquidate_perp::successful_liquidation_short_perp
    controller::liquidation::tests::liquidate_perp::successful_liquidation_to_cover_margin_shortage
    controller::liquidation::tests::liquidate_perp::successful_liquidation_up_to_max_liquidator_base_asset_amount
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::failure_due_to_asset_tier_violation
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::failure_due_to_contract_tier_violation
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::failure_due_to_limit_price
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::success_with_limit_price
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::successful_liquidate_dust_position
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::successful_liquidation_liquidator_max_pnl_transfer
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::successful_liquidation_over_multiple_slots
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::successful_liquidation_pnl_transfer_implied_by_asset_amount
    controller::liquidation::tests::liquidate_perp_pnl_for_deposit::successful_liquidation_pnl_transfer_to_cover_margin_shortage
    controller::liquidation::tests::liquidate_perp_with_fill::successful_liquidate_perp_with_fill_long
    controller::liquidation::tests::liquidate_perp_with_fill::successful_liquidate_perp_with_fill_long_with_amm
    controller::liquidation::tests::liquidate_perp_with_fill::successful_liquidate_perp_with_fill_short
    controller::liquidation::tests::liquidate_perp_with_fill::successful_liquidate_perp_with_fill_short_with_amm
    controller::liquidation::tests::liquidate_spot::failure_due_to_limit_price
    controller::liquidation::tests::liquidate_spot::liquidate_over_multiple_slots
    controller::liquidation::tests::liquidate_spot::success_with_to_limit_price
    controller::liquidation::tests::liquidate_spot::successful_liquidation_dust_borrow
    controller::liquidation::tests::liquidate_spot::successful_liquidation_half_if_fee
    controller::liquidation::tests::liquidate_spot::successful_liquidation_liability_transfer_implied_by_asset_amount
    controller::liquidation::tests::liquidate_spot::successful_liquidation_liability_transfer_to_cover_margin_shortage
    controller::liquidation::tests::liquidate_spot::successful_liquidation_liquidator_max_liability_transfer
    controller::liquidation::tests::resolve_perp_bankruptcy::successful_resolve_perp_bankruptcy
    controller::liquidation::tests::resolve_perp_bankruptcy::successful_resolve_perp_bankruptcy_with_fee_pool
    controller::liquidation::tests::resolve_spot_bankruptcy::successful_resolve_spot_bankruptcy
    controller::liquidation::tests::set_user_status_to_being_liquidated::failure_sufficient_collateral
    controller::liquidation::tests::set_user_status_to_being_liquidated::success
    controller::lp::tests::test_lp_margin_calc
    controller::lp::tests::test_lp_settle_pnl
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_full_long
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_full_short
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_small_maker_order
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_long
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_long_max_amount
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_long_neg_qas
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_short
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_short_max_amount
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_short_neg_qas
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_short_unavailable_amm
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_short_with_split_lps
    controller::orders::amm_jit_tests::amm_jit::fulfill_with_amm_jit_taker_zero_price_long_imbalance
    controller::orders::amm_jit_tests::amm_jit::no_fulfill_with_amm_jit_taker_long
    controller::orders::amm_jit_tests::amm_jit::no_fulfill_with_amm_jit_taker_short
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_full_long
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_full_short
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_small_maker_order
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_long
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_long_max_amount
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_long_neg_qas
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_short
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_short_max_amount
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_short_neg_qas
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_jit_taker_zero_price_long_imbalance
    controller::orders::amm_lp_jit_tests::amm_lp_jit::fulfill_with_amm_lp_only_jit_taker_long_max_amount
    controller::orders::amm_lp_jit_tests::amm_lp_jit::no_fulfill_with_amm_lp_jit_taker_long
    controller::orders::amm_lp_jit_tests::amm_lp_jit::no_fulfill_with_amm_lp_jit_taker_short
    controller::orders::fuel_tests::fuel_scoring::deposit_and_borrow_fuel
    controller::orders::fuel_tests::fuel_scoring::deposit_fuel
    controller::orders::fuel_tests::fuel_scoring::taker_maker_perp_fuel_boost
    controller::orders::tests::fill_order::expire_order
    controller::orders::tests::fill_order::fallback_maker_order_id
    controller::orders::tests::fill_order::maker_order_canceled_for_breaching_oracle_price_band
    controller::orders::tests::fill_order::max_open_interest
    controller::orders::tests::fill_spot_order::expire_order
    controller::orders::tests::force_cancel_orders::cancel_order_after_fulfill
    controller::orders::tests::fulfill_order::fulfill_post_only_ask_with_amm
    controller::orders::tests::fulfill_order::fulfill_post_only_bid_with_amm
    controller::orders::tests::fulfill_order::fulfill_users_with_multiple_orders_and_markets
    controller::orders::tests::fulfill_order::fulfill_with_amm_and_maker
    controller::orders::tests::fulfill_order::fulfill_with_amm_end_of_auction
    controller::orders::tests::fulfill_order::fulfill_with_amm_when_maker_is_filler
    controller::orders::tests::fulfill_order::fulfill_with_maker_then_amm
    controller::orders::tests::fulfill_order::fulfill_with_maker_with_auction_incomplete
    controller::orders::tests::fulfill_order::fulfill_with_multiple_maker_orders
    controller::orders::tests::fulfill_order::maker_insufficient_collateral
    controller::orders::tests::fulfill_order::maker_position_reducing_above_maintenance_check
    controller::orders::tests::fulfill_spot_order::fulfill_users_with_multiple_maker_orders
    controller::orders::tests::fulfill_spot_order::fulfill_users_with_multiple_orders_and_markets
    controller::orders::tests::fulfill_spot_order::maker_insufficient_collateral
    controller::orders::tests::get_maker_orders_info::jit_maker_order_id
    controller::orders::tests::get_maker_orders_info::one_maker_order_canceled_for_being_expired
    controller::orders::tests::get_maker_orders_info::one_maker_order_canceled_for_being_reduce_only
    controller::orders::tests::get_maker_orders_info::one_maker_order_canceled_for_breaching_oracle_price_band
    controller::orders::tests::get_maker_orders_info::two_makers
    controller::orders::tests::get_maker_orders_info::two_makers_with_max_orders
    controller::orders::tests::get_spot_maker_orders_info::jit_maker_order_id
    controller::orders::tests::get_spot_maker_orders_info::one_maker_order_canceled_for_being_expired
    controller::orders::tests::get_spot_maker_orders_info::one_maker_order_canceled_for_being_reduce_only
    controller::orders::tests::get_spot_maker_orders_info::one_maker_order_canceled_for_breaching_oracle_price_band
    controller::orders::tests::get_spot_maker_orders_info::two_makers
    controller::orders::tests::get_spot_maker_orders_info::two_makers_with_max_orders
    controller::pnl::delisting::delisting_test::delist_market_with_0_balance_long_at_best_effort
    controller::pnl::delisting::delisting_test::delist_market_with_0_balance_long_at_target
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_long_at_target
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_long_at_target_price_w_positive_quote_long
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_long_negative_expiry_price
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_shorts_owe_longs_0
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_shorts_owe_longs_long_close_first
    controller::pnl::delisting::delisting_test::delist_market_with_1000_balance_shorts_owe_longs_short_close_first
    controller::pnl::delisting::delisting_test::delist_market_with_neg_balance_long_at_best_effort
    controller::pnl::delisting::delisting_test::delist_market_with_neg_balance_short_at_target
    controller::pnl::delisting::delisting_test::failed_attempt_to_close_healthy_market
    controller::pnl::tests::market_fee_pool_pays_back_to_pnl_pool
    controller::pnl::tests::market_fee_pool_receives_portion
    controller::pnl::tests::user_does_not_meet_maintenance_requirement
    controller::pnl::tests::user_does_not_meet_strict_maintenance_requirement
    controller::pnl::tests::user_invalid_oracle_position
    controller::pnl::tests::user_long_negative_unrealized_pnl
    controller::pnl::tests::user_long_positive_unrealized_pnl_up_to_max_positive_pnl
    controller::pnl::tests::user_long_positive_unrealized_pnl_up_to_max_positive_pnl_price_breached
    controller::pnl::tests::user_no_position
    controller::pnl::tests::user_short_negative_unrealized_pnl
    controller::pnl::tests::user_short_positive_unrealized_pnl_up_to_max_positive_pnl
    controller::pnl::tests::user_unsettled_negative_pnl
    controller::pnl::tests::user_unsettled_positive_pnl_less_than_pool
    controller::pnl::tests::user_unsettled_positive_pnl_more_than_pool
    controller::position::tests::amm_pred_market_example
    controller::position::tests::amm_split_large_k
    controller::position::tests::amm_split_large_k_with_rebase
    controller::position::tests::recenter_amm_1
    controller::position::tests::recenter_amm_2
    controller::position::tests::test_move_amm
    controller::position::tests::test_quote_unsettled_lp
    controller::position::tests::update_amm_near_boundary
    controller::position::tests::update_amm_near_boundary2
    controller::spot_balance::tests::attempt_borrow_with_massive_upnl
    math::lp::tests::calculate_lp_shares_to_burn_for_risk_reduction::custom_margin_ratio
    math::lp::tests::calculate_lp_shares_to_burn_for_risk_reduction::test
    math::margin::tests::calculate_margin_requirement_and_total_collateral::sol_deposit_and_5x_sol_ask
    math::margin::tests::calculate_margin_requirement_and_total_collateral::strict_maintenance
    math::margin::tests::calculate_margin_requirement_and_total_collateral::usdc_deposit_and_5x_sol_ask
    math::margin::tests::calculate_margin_requirement_and_total_collateral::usdc_deposit_and_5x_sol_bid
    math::margin::tests::calculate_margin_requirement_and_total_collateral::user_custom_margin_ratio
    math::margin::tests::calculate_margin_requirement_and_total_collateral::user_dust_borrow
    math::margin::tests::calculate_margin_requirement_and_total_collateral::user_dust_deposit
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::isolated_contract_tier_count_and_check
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::no_perp_position_but_trigger_order
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::no_spot_position_but_trigger_order
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::usdc_less_than_1_with_deposit
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::usdc_more_than_1_with_borrow
    math::margin::tests::calculate_margin_requirement_and_total_collateral_and_liability_info::usdc_not_1_with_perp_position
    math::margin::tests::calculate_max_withdrawable_amount::sol_dust_withdraw
    math::margin::tests::calculate_max_withdrawable_amount::sol_withdraw
    math::margin::tests::calculate_max_withdrawable_amount::usdc_withdraw
    math::margin::tests::calculate_user_equity::usdc_deposit_negative_perp_pnl
    math::margin::tests::calculate_user_equity::usdc_deposit_positive_perp_pnl
    math::margin::tests::calculate_user_equity::usdc_deposit_sol_borrow
    math::margin::tests::validate_spot_margin_trading::attempt_enable_margin_trading_with_isolated_perp
    math::margin::tests::validate_spot_margin_trading::sol_ask_larger_than_deposit
    math::margin::tests::validate_spot_margin_trading::sol_ask_smaller_than_deposit
    math::margin::tests::validate_spot_margin_trading::sol_ask_with_borrow
    math::margin::tests::validate_spot_margin_trading::sol_bids_value_larger_than_usdc_deposit
    math::margin::tests::validate_spot_margin_trading::sol_bids_value_smaller_than_usdc_deposit
    math::margin::tests::validate_spot_margin_trading::sol_bids_with_usdc_borrow
    math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_ask_with_imf
    math::orders::tests::calculate_max_perp_order_size::sol_perp_10x_bid_with_imf
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_custom_margin_ratio
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_ask_when_long_5x
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_custom_margin_ratio
    math::orders::tests::calculate_max_perp_order_size::sol_perp_5x_bid_when_short_5x
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_ask_with_imf
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_already_short
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_bid_with_imf
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_5x_sol_sell_already_long
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_bid_custom_margin_ratio
    math::orders::tests::calculate_max_spot_order_size::usdc_deposit_and_max_sol_sell_custom_margin_ratio
    state::oracle::tests::switchboard_on_demand
    state::order_params::tests::get_close_perp_params::btc
    state::order_params::tests::get_close_perp_params::doge
    state::order_params::tests::get_close_perp_params::test_default_starts_on_perp_markets
    state::traits::tests::market_index_offset::perp_market
    state::traits::tests::market_index_offset::spot_market
    state::traits::tests::size::perp_market
    state::traits::tests::size::spot_market
    state::traits::tests::size::state

test result: FAILED. 463 passed; 199 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.53s

error: test failed, to rerun pass `-p drift --lib`
@wphan
Copy link
Member

wphan commented Oct 10, 2024

build should work with the version in the ci: https://github.com/drift-labs/protocol-v2/blob/master/.github/workflows/main.yml#L15-L17.

for m1 mac you'll need x86 toolchain: rustup override set 1.70.0-x86_64-apple-darwin

@Jovonni
Copy link
Author

Jovonni commented Oct 10, 2024

that worked! 🚀

very grateful @wphan @jordy25519!

@Jovonni Jovonni closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants