1 PTS Per Unique Bug Identified - BitShares X Testing

Started by bytemaster, January 20, 2014, 06:19:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bytemaster

Quote from: CrazyBit on January 22, 2014, 03:12:33 PM
Quote from: bytemaster on January 21, 2014, 03:39:21 PM
Quote from: CrazyBit on January 21, 2014, 03:08:52 PM

Quote from: JeffreyLee on January 21, 2014, 12:57:15 AM
I have a advice,Hope to add a command,print a list old wallet address.
for example,command name is showaddres.
I have implemented this feature,I can raise a pull request if Dan confirmed this feature is required.


Sent from my iPhone using Tapatalk

Would be nice.
pull request raised(https://github.com/InvictusInnovations/BitShares/pull/23 ),pls review.


Sent from my iPhone using Tapatalk

10 PTS tip sent your way!   
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

crazybit

#21
Quote from: bytemaster on January 21, 2014, 03:39:21 PM
Quote from: CrazyBit on January 21, 2014, 03:08:52 PM

Quote from: JeffreyLee on January 21, 2014, 12:57:15 AM
I have a advice,Hope to add a command,print a list old wallet address.
for example,command name is showaddres.
I have implemented this feature,I can raise a pull request if Dan confirmed this feature is required.


Sent from my iPhone using Tapatalk

Would be nice.
pull request raised(https://github.com/InvictusInnovations/BitShares/pull/23 ),pls review.


Sent from my iPhone using Tapatalk

bytemaster

This bounty is put on hold until I resolve issues found thus far.   The market is hung because it generated a transaction that failed validation. 

I will let you know when you can resume testing.
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

bytemaster

Quote from: CrazyBit on January 21, 2014, 03:08:52 PM

Quote from: JeffreyLee on January 21, 2014, 12:57:15 AM
I have a advice,Hope to add a command,print a list old wallet address.
for example,command name is showaddres.
I have implemented this feature,I can raise a pull request if Dan confirmed this feature is required.


Sent from my iPhone using Tapatalk

Would be nice. 
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

crazybit

#18

Quote from: JeffreyLee on January 21, 2014, 12:57:15 AM
I have a advice,Hope to add a command,print a list old wallet address.
for example,command name is showaddres.
I have implemented this feature,I can raise a pull request if Dan confirmed this feature is required.


Sent from my iPhone using Tapatalk

HackFisher

Quote from: bytemaster on January 21, 2014, 05:45:22 AM
Send me a PTS address and I will send you 1 PTS for finding the bug and 5 PTS for fixing it with a pull request!

Thanks! PM'd to you, yo can also find that in my signature:  PdhV9ithAGJsgzR95UdjeS6ihqPqkuz9Cy
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

HackFisher

#16
Quote from: HackFisher on January 21, 2014, 02:40:48 AM
I opened some short on usd and buy usd, the match order of market is not working when the bids price is higher then ask price, here is the screenshot.



and the chain html snapshot:

https://dl.dropboxusercontent.com/u/5037011/bts_bug_001.html

I have updated the bug description here, supposed to be the same issue:

probable steps to reproduce:
buy 5 usd
price per usd: 0.02 bts

https://bitsharestalk.org/index.php?topic=1890.msg30821#msg30821
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

bytemaster

Quote from: HackFisher on January 21, 2014, 04:48:28 AM
here is the pull request, tested, pls review it.
https://github.com/InvictusInnovations/BitShares/pull/20

Quote from: bytemaster on January 21, 2014, 04:25:08 AM
Quote from: HackFisher on January 21, 2014, 03:45:34 AM
To report a bug, can not transfer usd. Check the source code, it may due to the different unit between total_in (default bts) and itr->second.get_amount() (here is usd)
I might try to provide pull request if I can fix it.

console:
>>> transfer 3 usd to MpeitToLdKLLnee9iBKnU7enQ6z
assert
unit == o.unit:
    {}
    th_a  asset.cpp:110 bts::blockchain::asset::operator +=
3.00000000 usd to MpeitToLdKLLnee9iBKnU7enQ6z
    {"amnt":"3.00000000 usd","to":"MpeitToLdKLLnee9iBKnU7enQ6z"}
    th_a  blockchain_wallet.cpp:324 bts::blockchain::wallet::transfer

log.txt: (stop when iterate to first usd unspend)

2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":3},{"amount":100000000,"unit":"bts","claim_func":"claim_by_cover","claim_data":{"payoff_unit":"usd","payoff_amount":500000000,"owner":"Kjis77t43i41LmrUJ7rWeJrdwwe"}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"4b008fb75fb67eaa59b3c1393ca2e187487123a0","output_idx":0},{"amount":50000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"SJyXwKU2Mmy3Z7Fxw5ia8VLYxre","ask_price":"0.5000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"60ab5e3d73f9d31b5b9e49fadaf3f383663cff89","output_idx":0},{"amount":100000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"MiJq5cKVpwcjAb1DMhihaDEsyP8","ask_price":"50.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"5d617e24a41aca2401d28ea85ec3f4f9ae6e120b","output_idx":0},{"amount":10000000,"unit":"bts","claim_func":"claim_by_bid","claim_data":{"pay_address":"RQQgPKGEGzzL6izqPKcWzdvbuFu","ask_price":"80.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":2},{"amount":50000000,"unit":"bts","claim_func":"claim_by_long","claim_data":{"pay_address":"Kjis77t43i41LmrUJ7rWeJrdwwe","ask_price":"10.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"55a250e2e249107583085457b5e7d2bebe5b7531","output_idx":1},{"amount":1000000000,"unit":"usd","claim_func":"claim_by_signature","claim_data":{"owner":"Jvo7Xfow3xVToALbVHKPa3UVYRw"}}]         blockchain_wallet.cpp:84

This is clearly a blockchain bug and not merely cosmetic, I will look into this next.

Send me a PTS address and I will send you 1 PTS for finding the bug and 5 PTS for fixing it with a pull request!
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

HackFisher

#14
here is the pull request, tested, pls review it.
https://github.com/InvictusInnovations/BitShares/pull/20

Quote from: bytemaster on January 21, 2014, 04:25:08 AM
Quote from: HackFisher on January 21, 2014, 03:45:34 AM
To report a bug, can not transfer usd. Check the source code, it may due to the different unit between total_in (default bts) and itr->second.get_amount() (here is usd)
I might try to provide pull request if I can fix it.

console:
>>> transfer 3 usd to MpeitToLdKLLnee9iBKnU7enQ6z
assert
unit == o.unit:
    {}
    th_a  asset.cpp:110 bts::blockchain::asset::operator +=
3.00000000 usd to MpeitToLdKLLnee9iBKnU7enQ6z
    {"amnt":"3.00000000 usd","to":"MpeitToLdKLLnee9iBKnU7enQ6z"}
    th_a  blockchain_wallet.cpp:324 bts::blockchain::wallet::transfer

log.txt: (stop when iterate to first usd unspend)

2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":3},{"amount":100000000,"unit":"bts","claim_func":"claim_by_cover","claim_data":{"payoff_unit":"usd","payoff_amount":500000000,"owner":"Kjis77t43i41LmrUJ7rWeJrdwwe"}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"4b008fb75fb67eaa59b3c1393ca2e187487123a0","output_idx":0},{"amount":50000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"SJyXwKU2Mmy3Z7Fxw5ia8VLYxre","ask_price":"0.5000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"60ab5e3d73f9d31b5b9e49fadaf3f383663cff89","output_idx":0},{"amount":100000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"MiJq5cKVpwcjAb1DMhihaDEsyP8","ask_price":"50.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"5d617e24a41aca2401d28ea85ec3f4f9ae6e120b","output_idx":0},{"amount":10000000,"unit":"bts","claim_func":"claim_by_bid","claim_data":{"pay_address":"RQQgPKGEGzzL6izqPKcWzdvbuFu","ask_price":"80.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":2},{"amount":50000000,"unit":"bts","claim_func":"claim_by_long","claim_data":{"pay_address":"Kjis77t43i41LmrUJ7rWeJrdwwe","ask_price":"10.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"55a250e2e249107583085457b5e7d2bebe5b7531","output_idx":1},{"amount":1000000000,"unit":"usd","claim_func":"claim_by_signature","claim_data":{"owner":"Jvo7Xfow3xVToALbVHKPa3UVYRw"}}]         blockchain_wallet.cpp:84

This is clearly a blockchain bug and not merely cosmetic, I will look into this next.
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

bytemaster

Quote from: HackFisher on January 21, 2014, 03:45:34 AM
To report a bug, can not transfer usd. Check the source code, it may due to the different unit between total_in (default bts) and itr->second.get_amount() (here is usd)
I might try to provide pull request if I can fix it.

console:
>>> transfer 3 usd to MpeitToLdKLLnee9iBKnU7enQ6z
assert
unit == o.unit:
    {}
    th_a  asset.cpp:110 bts::blockchain::asset::operator +=
3.00000000 usd to MpeitToLdKLLnee9iBKnU7enQ6z
    {"amnt":"3.00000000 usd","to":"MpeitToLdKLLnee9iBKnU7enQ6z"}
    th_a  blockchain_wallet.cpp:324 bts::blockchain::wallet::transfer

log.txt: (stop when iterate to first usd unspend)

2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":3},{"amount":100000000,"unit":"bts","claim_func":"claim_by_cover","claim_data":{"payoff_unit":"usd","payoff_amount":500000000,"owner":"Kjis77t43i41LmrUJ7rWeJrdwwe"}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"4b008fb75fb67eaa59b3c1393ca2e187487123a0","output_idx":0},{"amount":50000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"SJyXwKU2Mmy3Z7Fxw5ia8VLYxre","ask_price":"0.5000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"60ab5e3d73f9d31b5b9e49fadaf3f383663cff89","output_idx":0},{"amount":100000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"MiJq5cKVpwcjAb1DMhihaDEsyP8","ask_price":"50.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"5d617e24a41aca2401d28ea85ec3f4f9ae6e120b","output_idx":0},{"amount":10000000,"unit":"bts","claim_func":"claim_by_bid","claim_data":{"pay_address":"RQQgPKGEGzzL6izqPKcWzdvbuFu","ask_price":"80.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":2},{"amount":50000000,"unit":"bts","claim_func":"claim_by_long","claim_data":{"pay_address":"Kjis77t43i41LmrUJ7rWeJrdwwe","ask_price":"10.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"55a250e2e249107583085457b5e7d2bebe5b7531","output_idx":1},{"amount":1000000000,"unit":"usd","claim_func":"claim_by_signature","claim_data":{"owner":"Jvo7Xfow3xVToALbVHKPa3UVYRw"}}]         blockchain_wallet.cpp:84

This is clearly a blockchain bug and not merely cosmetic, I will look into this next.
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

bytemaster

Quote from: JeffreyLee on January 21, 2014, 02:56:33 AM
bug:show orders command can not show my orders.

>>> show orders usd bts
>>> market usd bts
                                      BIDS               |                                      ASKS               |
---------------------------------------------------------|---------------------------------------------------------|
           0.50000000 bts      -10.0000000000000 usd/bts |          10.00000000 bts     200.0000000000000 usd/bts  |
           1.00000000 bts        1.0000000000000 usd/bts |          10.00000000 bts     250.0000000000000 usd/bts  |
           1.00000000 bts        0.5000000000000 usd/bts |                                                         |
                                                         |                                                         |
>>>

Yes, that is a bug in the help menu, if you display your balance it does both your orders and your balances.
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

bytemaster

Quote from: JeffreyLee on January 21, 2014, 03:12:12 AM
relogin ,my balance is come back . This is a bug.

Quote from: HackFisher on January 21, 2014, 03:01:22 AM
Try quit and open/login again? or copy wallet.bts and bts_wallet to another folder?

Quote from: JeffreyLee on January 21, 2014, 02:49:00 AM
My balance become 0bts after I had submit a order.

>>> sell 1 bts
current balance: 100.00000000 bts
price per bts (ie: 1 usd): 30 usd
Expected Proceeds: 30.00000000 usd
submit order? (y|n): y
order submitted
>>> balance
0.00000000 bts
0.00000000 usd

Margin Positions
0.00000000 usd  total collateral: 0.00000000 bts  avg call price: 0.0000000000000 usd/bts
===========================================================
Unspent Outputs:

Open Bids:

Open Short Sells:

Open Margin Positions:
===========================================================
>>>

This may be an issue until the next block is produced because you consumed your only input to create the bid.  I need to add support for displaying 'unconfirmed' inputs. 
For the latest updates checkout my blog: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

HackFisher

To report a bug, can not transfer usd. Check the source code, it may due to the different unit between total_in (default bts) and itr->second.get_amount() (here is usd)
I might try to provide pull request if I can fix it.

console:
>>> transfer 3 usd to MpeitToLdKLLnee9iBKnU7enQ6z
assert
unit == o.unit:
    {}
    th_a  asset.cpp:110 bts::blockchain::asset::operator +=
3.00000000 usd to MpeitToLdKLLnee9iBKnU7enQ6z
    {"amnt":"3.00000000 usd","to":"MpeitToLdKLLnee9iBKnU7enQ6z"}
    th_a  blockchain_wallet.cpp:324 bts::blockchain::wallet::transfer

log.txt: (stop when iterate to first usd unspend)

2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":3},{"amount":100000000,"unit":"bts","claim_func":"claim_by_cover","claim_data":{"payoff_unit":"usd","payoff_amount":500000000,"owner":"Kjis77t43i41LmrUJ7rWeJrdwwe"}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"4b008fb75fb67eaa59b3c1393ca2e187487123a0","output_idx":0},{"amount":50000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"SJyXwKU2Mmy3Z7Fxw5ia8VLYxre","ask_price":"0.5000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"60ab5e3d73f9d31b5b9e49fadaf3f383663cff89","output_idx":0},{"amount":100000000,"unit":"usd","claim_func":"claim_by_bid","claim_data":{"pay_address":"MiJq5cKVpwcjAb1DMhihaDEsyP8","ask_price":"50.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"5d617e24a41aca2401d28ea85ec3f4f9ae6e120b","output_idx":0},{"amount":10000000,"unit":"bts","claim_func":"claim_by_bid","claim_data":{"pay_address":"RQQgPKGEGzzL6izqPKcWzdvbuFu","ask_price":"80.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"6e737d784bd476afc4fda36b9cda4b44ff34d41a","output_idx":2},{"amount":50000000,"unit":"bts","claim_func":"claim_by_long","claim_data":{"pay_address":"Kjis77t43i41LmrUJ7rWeJrdwwe","ask_price":"10.0000000000000 usd/bts","min_trade":0}}]         blockchain_wallet.cpp:84
2212718ms       th_a       collect_inputs ] unspent outputs [{"trx_hash":"55a250e2e249107583085457b5e7d2bebe5b7531","output_idx":1},{"amount":1000000000,"unit":"usd","claim_func":"claim_by_signature","claim_data":{"owner":"Jvo7Xfow3xVToALbVHKPa3UVYRw"}}]         blockchain_wallet.cpp:84
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

JeffreyLee

relogin ,my balance is come back . This is a bug.

Quote from: HackFisher on January 21, 2014, 03:01:22 AM
Try quit and open/login again? or copy wallet.bts and bts_wallet to another folder?

Quote from: JeffreyLee on January 21, 2014, 02:49:00 AM
My balance become 0bts after I had submit a order.

>>> sell 1 bts
current balance: 100.00000000 bts
price per bts (ie: 1 usd): 30 usd
Expected Proceeds: 30.00000000 usd
submit order? (y|n): y
order submitted
>>> balance
0.00000000 bts
0.00000000 usd

Margin Positions
0.00000000 usd  total collateral: 0.00000000 bts  avg call price: 0.0000000000000 usd/bts
===========================================================
Unspent Outputs:

Open Bids:

Open Short Sells:

Open Margin Positions:
===========================================================
>>>
BitShares-PTS:Pop8mPCmtzSLc1NXaJLSnE2gpvDvCZJgMd
Please give me a vote:wallet_approve_delegate sunshine.clerk 1

HackFisher

#8
Try quit and open/login again? or copy wallet.bts and bts_wallet to another folder?

Quote from: JeffreyLee on January 21, 2014, 02:49:00 AM
My balance become 0bts after I had submit a order.

>>> sell 1 bts
current balance: 100.00000000 bts
price per bts (ie: 1 usd): 30 usd
Expected Proceeds: 30.00000000 usd
submit order? (y|n): y
order submitted
>>> balance
0.00000000 bts
0.00000000 usd

Margin Positions
0.00000000 usd  total collateral: 0.00000000 bts  avg call price: 0.0000000000000 usd/bts
===========================================================
Unspent Outputs:

Open Bids:

Open Short Sells:

Open Margin Positions:
===========================================================
>>>
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.