X-CASH-official / xcash-core

📦 First Cryptonote coin with public & private transactions, custom DPOS consensus
https://xcash.foundation
Other
66 stars 20 forks source link

std future wrong status for boost asio #4

Closed zachhildreth closed 5 years ago

zachhildreth commented 5 years ago

Bug / Optimization for XCASH_DPOPS

In std::string send_and_receive_data(std::string IP_address,std::string data2) function, that is located in the following files:

src/simplewallet/simplewallet.cpp src/cryptonote_core/blockchain.cpp src/wallet/wallet_rpc_server.cpp src/daemon/rpc_command_executor.cpp

When checking the return status of the std::future after the timeout period if (status == std::future_status::timeout) etc

It will always return std::future_status::deferred instead of the correct status

Result of this bug

It causes the new XCASH_DPOPS commands

vote
delegate_register
delegate_update
delegate_remove

To take the full timeout time, even if it connects to most of the block verifiers resulting in a wait time of around 2 minutes per call.

Status of bug

I will take a look at this bug towards the end, If there is no solutions from the community

Bug / Optimization is acknowledged by the team and is the only currently known XCASH_DPOPS bug.

We will welcome any Pull request that follows the XCASH_DPOPS bug bounty guidelines

Since this bug is already publically disclosed by the team, it will need a working code pull request to be eligible for the XCASH_DPOPS bug bounty

zachhildreth commented 5 years ago

Fixed in #9

This RFC was stated on discord that it would be worth $30.00 USD and does not have a CVSS score since its an RFC

Please post a X-CASH Wallet address in the comments, and we will send the payment in a public transaction, post the transaction hash and then close the issue.

Thank you for helping out the DPOPS by contributing in this RFC

picatextra commented 5 years ago

XCA1ka4bXH1bnvdT8vti1S12PfyH8fJ5XDUXyNRusyMRTBfFCawywJyCV5vvG38h71GAv77WotbmwbmbJen5bQpC7GeVx8gSws

zachhildreth commented 5 years ago

Bounty Paid ✅

Date: 2019-10-23 Amount (USD): $30 Amount (XCASH): 933269.49 XCASH Spot Price: 0.0000321450563020242 USD/XCASH XCASH Address: XCA1ka4bXH1bnvdT8vti1S12PfyH8fJ5XDUXyNRusyMRTBfFCawywJyCV5vvG38h71GAv77WotbmwbmbJen5bQpC7GeVx8gSws Tx Hash: c7001bb9c53b99f00ad111d73cafeef3e8ba60e180e9281e2e942b2dbb08aedb Link: https://explorer.x-cash.org/Transaction?data=c7001bb9c53b99f00ad111d73cafeef3e8ba60e180e9281e2e942b2dbb08aedb