Skip to content

feat(tpu-v2): provide swap protocol versioning#2324

Merged
shamardy merged 16 commits intodevfrom
fix-tpu-v2-wait-for-payment-spend-swap-version
Feb 12, 2025
Merged

feat(tpu-v2): provide swap protocol versioning#2324
shamardy merged 16 commits intodevfrom
fix-tpu-v2-wait-for-payment-spend-swap-version

Conversation

@laruh
Copy link
Copy Markdown

@laruh laruh commented Jan 17, 2025

ref issue #2337

ordermatch structs which got swap_version field:

  • TakerOrderBuilder
  • MakerOrderBuilder
  • MakerOrder
  • MakerReserved
  • TakerRequest

swap structs. if swap started swap_version will be saved in db:

  • MySwapForRpc
  • TakerSwapStateMachine
  • MakerSwapStateMachine
  • TakerSwapDbRepr
  • MakerSwapDbRepr

swap version 2 is tpu v2 protocol
legacy swap protocol is 1 version

When Taker or Maker build order, the value const SWAP_VERSION: u32 = 2; is used for order Builder.
However in create_maker_order/lp_auto_buy if user didnt use ctx.use_trading_proto_v2() in config we set legacy protocol version to the order.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: high Important tasks that need attention soon. status: pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants