From b70fcb9c3e3cfc52470a0f5cc3b2da5a709c88a0 Mon Sep 17 00:00:00 2001 From: "levoncrypto1994@gmail.com" Date: Wed, 13 Mar 2024 18:13:16 +0400 Subject: [PATCH 1/5] Miner issues fix --- src/dashd_intf.py | 11 +++-------- src/hw_intf_trezor.py | 14 +------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/dashd_intf.py b/src/dashd_intf.py index df9869a6..728835f6 100644 --- a/src/dashd_intf.py +++ b/src/dashd_intf.py @@ -1436,19 +1436,14 @@ def decoderawtransaction(self, rawtx): else: raise Exception('Not connected') - @control_rpc_call(allow_switching_conns=False) + @control_rpc_call def sendrawtransaction(self, tx, use_instant_send): if self.open(): - ni = self.rpc_call(False, False, 'getnetworkinfo') - if ni.get('version', 180000) >= 180000: - fee = 0 - else: - fee = False - - return self.proxy.sendrawtransaction(tx, fee, use_instant_send) + return self.proxy.sendrawtransaction(tx, False) else: raise Exception('Not connected') + @control_rpc_call def getcurrentvotes(self, hash): if self.open(): diff --git a/src/hw_intf_trezor.py b/src/hw_intf_trezor.py index 405f127c..62d13253 100644 --- a/src/hw_intf_trezor.py +++ b/src/hw_intf_trezor.py @@ -24,6 +24,7 @@ from common import CancelException, HwNotInitialized from hw_common import ask_for_pass_callback, ask_for_pin_callback, \ ask_for_word_callback, HWSessionBase, HWType +from dash_tx import DashTxType, serialize_cbTx, serialize_Lelantus, serialize_Spark import logging import wallet_common from wnd_utils import WndUtils @@ -324,19 +325,6 @@ def json_to_tx(tx_json): t = btc.from_json(tx_json) dip2_type = tx_json.get("type", 0) - t.inputs =[] - for vin in tx_json["vin"]: - if "scriptSig" in vin and vin["scriptSig"]["hex"] == "c9": - i = messages.TxInputType() - i.prev_hash = b"\0" * 32 - i.prev_index = vin["sequence"] - i.script_sig = bytes.fromhex(vin["scriptSig"]["hex"]) - i.sequence = vin["sequence"] - t.inputs.append(i) - else: - t.inputs.append(_json_to_input(tx_json, vin)) - t.bin_outputs = [_json_to_bin_output(tx_json, vout) for vout in tx_json["vout"]] - if t.version == 3 and dip2_type != 0: if dip2_type == DashTxType.SPEC_CB_TX: tx_json["extraPayload"] = serialize_cbTx(tx_json) From 1c1c4982b0a6e65044e4b3a9f257c461038c00a5 Mon Sep 17 00:00:00 2001 From: "levoncrypto1994@gmail.com" Date: Thu, 14 Mar 2024 19:42:32 +0400 Subject: [PATCH 2/5] UI fix --- src/hw_intf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw_intf.py b/src/hw_intf.py index 57577fe8..57f88f1c 100644 --- a/src/hw_intf.py +++ b/src/hw_intf.py @@ -1166,7 +1166,7 @@ def connect_hardware_wallet_main_th(self, reload_devices: bool = False) -> Optio if not found_testnet_support: url = get_note_url('DMT0002') - msg = f'Your hardware wallet device does not support Dash TESTNET ' \ + msg = f'Your hardware wallet device does not support FIRO TESTNET ' \ f'(see details).' try: self.disconnect_hardware_wallet() From a2ecc429f20f0b0ac001b75468b900a45608e835 Mon Sep 17 00:00:00 2001 From: "levoncrypto1994@gmail.com" Date: Sat, 16 Mar 2024 23:07:52 +0400 Subject: [PATCH 3/5] UI minor fixes --- ansible/install-dash-node/install-dash-node-ubuntu.yml | 2 +- src/app_main_view_wdg.py | 2 +- src/dash_utils.py | 2 +- src/masternode_details_wdg.py | 2 -- src/reg_masternode_dlg.py | 4 +--- src/wallet_dlg.py | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ansible/install-dash-node/install-dash-node-ubuntu.yml b/ansible/install-dash-node/install-dash-node-ubuntu.yml index 51084955..fbc011ae 100644 --- a/ansible/install-dash-node/install-dash-node-ubuntu.yml +++ b/ansible/install-dash-node/install-dash-node-ubuntu.yml @@ -309,7 +309,7 @@ daemon=1 externalip={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} [test] - port=19999 + port=18168 when: dashnode_testnet become_user: "{{ dashuser }}" when: not dash_conf_exists.stat.exists diff --git a/src/app_main_view_wdg.py b/src/app_main_view_wdg.py index 6df7db04..88de3c7b 100644 --- a/src/app_main_view_wdg.py +++ b/src/app_main_view_wdg.py @@ -1185,7 +1185,7 @@ def mn_name_exists(name: str): mn_template = src_masternode.name + '-Clone' else: if self.app_config.is_testnet: - new_mn.tcp_port = 19999 + new_mn.tcp_port = 18186 mn_template = 'MN' force_append_numbers = True name_found = None diff --git a/src/dash_utils.py b/src/dash_utils.py index e6d48990..0fe0d977 100644 --- a/src/dash_utils.py +++ b/src/dash_utils.py @@ -31,7 +31,7 @@ DEFAULT_SENTINEL_VERSION = 0x010001 # sentinel version before implementation of nSentinelVersion in CMasternodePing DEFAULT_DAEMON_VERSION = 120200 # daemon version before implementation of nDaemonVersion in CMasternodePing -MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 15 +MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 2 DASH_PLATFORM_DEFAULT_P2P_PORT = 26656 DASH_PLATFORM_DEFAULT_HTTP_PORT = 443 diff --git a/src/masternode_details_wdg.py b/src/masternode_details_wdg.py index cdf1073a..ba068615 100644 --- a/src/masternode_details_wdg.py +++ b/src/masternode_details_wdg.py @@ -1388,8 +1388,6 @@ def apply_utxo(utxo): if self.masternode.masternode_type == MasternodeType.REGULAR: dash_value_to_find = 1000 - else: - dash_value_to_find = 4000 address = self.edtCollateralAddress.text() if self.edtCollateralTxHash.text(): diff --git a/src/reg_masternode_dlg.py b/src/reg_masternode_dlg.py index fb839c1d..38b1662a 100644 --- a/src/reg_masternode_dlg.py +++ b/src/reg_masternode_dlg.py @@ -505,8 +505,6 @@ def apply_utxo(utxo): if self.masternode_type == MasternodeType.REGULAR: dash_value_to_find = 1000 - else: - dash_value_to_find = 4000 if self.edtCollateralTx.text(): # If there is any value in the collateral tx edit box, don't automatically apply the possible @@ -1382,7 +1380,7 @@ def on_msg_link_activated(link: str): except Exception as e: res = self.query_dlg('Cannot verify the collateral transaction due to the following error: ' + str(e) + - '\n\nDo you rally want to continue?', + '\n\nDo you really want to continue?', buttons=QMessageBox.Yes | QMessageBox.Cancel, default_button=QMessageBox.Cancel, icon=QMessageBox.Warning) if res == QMessageBox.Cancel: diff --git a/src/wallet_dlg.py b/src/wallet_dlg.py index 6b269da3..85c61641 100644 --- a/src/wallet_dlg.py +++ b/src/wallet_dlg.py @@ -685,7 +685,7 @@ def on_btnSend_clicked(self): total_satoshis_inputs += utxo.satoshis if utxo.is_collateral: if self.query_dlg( - "Warning: you are going to transfer masternode's collateral (1000/4000 Dash) " + "Warning: you are going to transfer masternode's collateral (1000 Firo) " "transaction output. Proceeding will result in broken masternode.\n\n" "Do you really want to continue?", buttons=QMessageBox.Yes | QMessageBox.Cancel, From 68a39a1507eca08c081e62fea97176da9a74f35c Mon Sep 17 00:00:00 2001 From: "levoncrypto1994@gmail.com" Date: Sun, 17 Mar 2024 21:05:33 +0400 Subject: [PATCH 4/5] Min confirmations for testnet tx fix --- src/dash_utils.py | 2 +- src/reg_masternode_dlg.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dash_utils.py b/src/dash_utils.py index 0fe0d977..e6d48990 100644 --- a/src/dash_utils.py +++ b/src/dash_utils.py @@ -31,7 +31,7 @@ DEFAULT_SENTINEL_VERSION = 0x010001 # sentinel version before implementation of nSentinelVersion in CMasternodePing DEFAULT_DAEMON_VERSION = 120200 # daemon version before implementation of nDaemonVersion in CMasternodePing -MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 2 +MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 15 DASH_PLATFORM_DEFAULT_P2P_PORT = 26656 DASH_PLATFORM_DEFAULT_HTTP_PORT = 443 diff --git a/src/reg_masternode_dlg.py b/src/reg_masternode_dlg.py index 38b1662a..8d5b0352 100644 --- a/src/reg_masternode_dlg.py +++ b/src/reg_masternode_dlg.py @@ -1327,6 +1327,8 @@ def on_msg_link_activated(link: str): tx = self.dashd_intf.getrawtransaction(self.collateral_tx, 1, skip_cache=True) confirmations = tx.get('confirmations', 0) + if self.app_config.dash_network == "TESTNET": + MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 2 if confirmations < MASTERNODE_TX_MINIMUM_CONFIRMATIONS: raise Exception(f'The collateral transaction does not yet have ' f'the required number of {MASTERNODE_TX_MINIMUM_CONFIRMATIONS} confirmations. ' From 873cd6c7b9586760a3c1cfa22f1e3cb941dedec0 Mon Sep 17 00:00:00 2001 From: "levoncrypto1994@gmail.com" Date: Mon, 18 Mar 2024 00:07:44 +0400 Subject: [PATCH 5/5] Min confirmations fix --- src/dash_utils.py | 2 +- src/reg_masternode_dlg.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dash_utils.py b/src/dash_utils.py index e6d48990..0fe0d977 100644 --- a/src/dash_utils.py +++ b/src/dash_utils.py @@ -31,7 +31,7 @@ DEFAULT_SENTINEL_VERSION = 0x010001 # sentinel version before implementation of nSentinelVersion in CMasternodePing DEFAULT_DAEMON_VERSION = 120200 # daemon version before implementation of nDaemonVersion in CMasternodePing -MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 15 +MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 2 DASH_PLATFORM_DEFAULT_P2P_PORT = 26656 DASH_PLATFORM_DEFAULT_HTTP_PORT = 443 diff --git a/src/reg_masternode_dlg.py b/src/reg_masternode_dlg.py index 8d5b0352..38b1662a 100644 --- a/src/reg_masternode_dlg.py +++ b/src/reg_masternode_dlg.py @@ -1327,8 +1327,6 @@ def on_msg_link_activated(link: str): tx = self.dashd_intf.getrawtransaction(self.collateral_tx, 1, skip_cache=True) confirmations = tx.get('confirmations', 0) - if self.app_config.dash_network == "TESTNET": - MASTERNODE_TX_MINIMUM_CONFIRMATIONS = 2 if confirmations < MASTERNODE_TX_MINIMUM_CONFIRMATIONS: raise Exception(f'The collateral transaction does not yet have ' f'the required number of {MASTERNODE_TX_MINIMUM_CONFIRMATIONS} confirmations. '