Skip to content

implemented HIVE->HBD conversion with immediate effect and deferred finalization

Andrzej Lisak requested to merge abw_collateralized_convert_operation into develop

Added new collateralized_convert_operation and related vop fill_collateralized_convert_request_operation (also in legacy version for APIs)

Added new state object (already using tiny_asset, id_ref and fully encapsulated): collateralized_convert_request_object

Existing convert_request_object changed to use tiny_asset, id_ref and encapsulation (slightly affects order in database_api::list_hbd_conversion_requests)

Added current_min_history/current_max_history to feed_history_object - used in pricing in new conversion

Added config constants: HIVE_COLLATERALIZED_CONVERSION_DELAY, HIVE_CONVERSION_COLLATERAL_RATIO, HIVE_COLLATERALIZED_CONVERSION_FEE

Added wallet_api/remote_node_api/condenser_api::get_collateralized_conversion_requests

Added database_api::list_collateralized_conversion_requests and database_api::find_collateralized_conversion_requests

Added wallet_api operations: convert_hive_with_collateral and estimate_hive_collateral

Added new vop system_warning_operation to be emitted instead of wlog in case of important consensus situations (hooked to history of initminer).

tiny_asset definition moved to asset.hpp to allow better interaction between the types (part of tiny_asset branch that was already needed)

[Fix]: 4 existing vops were missing from filter in account history

[Fix]: fixed exception formatting in asset * price operator

[Note]: order of the same existing vops in their legacy version is not correct (different than in regular operation definition)

[Note]: future consideration - database::clear_account asserts on new convert operation (so it will stop-the-world in case someone uses it incorrectly in the future)

[Note]: alternative global balance handling would be to burn collateral (affects cutoff limit) and then emit excess collateral when conversion is handled

[Note]: RC cost of new convert operation is a copy of regular convert operation

[Note]: new operation not handled in account_statistics nor blockchain_statistics legacy plugins

[Note]: no tests for new operation yet

Edited by Andrzej Lisak

Merge request reports