Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove call_price field from get_call_orders() #1973

Open
1 of 17 tasks
bitphage opened this issue Sep 3, 2019 · 1 comment
Open
1 of 17 tasks

Remove call_price field from get_call_orders() #1973

bitphage opened this issue Sep 3, 2019 · 1 comment

Comments

@bitphage
Copy link

bitphage commented Sep 3, 2019

Bug Description

get_call_orders() response contains call_price field which is always 1:1

[{'id': '1.8.88448',
  'borrower': '1.2.415609',
  'collateral': '86439389367',
  'debt': 1306857052,
  'call_price': {'base': {'amount': 1, 'asset_id': '1.3.0'},
   'quote': {'amount': 1, 'asset_id': '1.3.113'}},
  'target_collateral_ratio': 1610}]

Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Expected Behavior

call_price field should be properly calculated or should not present at all (field removed from response).

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@abitmore abitmore added this to the 4.1.0 - Feature Release milestone Sep 3, 2019
@abitmore
Copy link
Member

abitmore commented Sep 3, 2019

Note that call_price is a field in call_order_object, because the field is still in use in consensus (see #1669), we can't remove the field from call_order_object. Even after it's no longer used in consensus, a big code refactory is needed to remove it from the object.

For this issue, technically we can change the return type of get_call_orders API to exclude that field. However, please be aware that before the field is removed from the object, get_objects API will still return the field, and the field will still appear in notifications after subscribed.

Another concern is this change will probably break some client applications. For example, due to historical reasons, some applications may still try to read the field even if it's no longer used.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants