From 9fac4c8f4941c8ac0538928c80dabb282ea8b428 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Tue, 13 Feb 2024 15:07:55 +0400 Subject: [PATCH] changing signature scheme for ado --- src/currency_core/currency_basic.h | 1 - src/currency_core/currency_format_utils.cpp | 3 +++ src/currency_core/currency_format_utils.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/currency_core/currency_basic.h b/src/currency_core/currency_basic.h index f0d35624..f677742b 100644 --- a/src/currency_core/currency_basic.h +++ b/src/currency_core/currency_basic.h @@ -775,7 +775,6 @@ namespace currency uint8_t operation_type = ASSET_DESCRIPTOR_OPERATION_UNDEFINED; asset_descriptor_base descriptor; crypto::public_key amount_commitment; // premultiplied by 1/8 - boost::optional opt_proof; // operation proof - for update/emit boost::optional opt_asset_id; // target asset_id - for update/emit uint8_t verion = ASSET_DESCRIPTOR_OPERATION_STRUCTURE_VER; diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index f91fbe5f..170aeacc 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -2248,6 +2248,8 @@ namespace currency } if (ftp.pevents_dispatcher) ftp.pevents_dispatcher->RAISE_DEBUG_EVENT(wde_construct_tx_handle_asset_descriptor_operation_before_seal{ &ado }); + ftp.need_to_generate_ado_proof = true; + /* //seal it with owners signature crypto::signature sig = currency::null_sig; crypto::hash h = get_signature_hash_for_asset_operation(ado) @@ -2264,6 +2266,7 @@ namespace currency crypto::generate_signature(h, pub_k, account_keys.spend_secret_key, sig); } ado.opt_proof = sig; + */ } return true; } diff --git a/src/currency_core/currency_format_utils.h b/src/currency_core/currency_format_utils.h index 41cda480..7bdcaa8c 100644 --- a/src/currency_core/currency_format_utils.h +++ b/src/currency_core/currency_format_utils.h @@ -168,6 +168,7 @@ namespace currency //crypto::secret_key asset_control_key = currency::null_skey; crypto::public_key ado_current_asset_owner = null_pkey; thirdparty_sign_handler* pthirdparty_sign_handler = nullptr; + bool need_to_generate_ado_proof = false; BEGIN_SERIALIZE_OBJECT() @@ -191,6 +192,7 @@ namespace currency FIELD(gen_context); } FIELD(ado_current_asset_owner) + FIELD(need_to_generate_ado_proof) END_SERIALIZE() };