BitShares Forum

Main => General Discussion => Topic started by: bitcrab on January 03, 2016, 07:00:16 pm

Title: Big bug in GUI asset update?
Post by: bitcrab on January 03, 2016, 07:00:16 pm
I believe there is big bug in the GUI asset update page.
today I found that 2 parameters of TCNY have been changed:

issuer_permissions: old:511 new:79
flag:old:128 new:0

after some checking I found what make this happen, in 23th Dec, I operate in GUI to change the owner of TCNY, after doing that, the unexpected change happened.

this can be proved with a test with no confirmation on TUSD, after changing the description and clicking update asset, below pop up:

(http://i4.tietuku.com/fe91489c3303c566.png)

issuer_permissions and flag are changed to 79 and 0.

this is big bug and may cause big issue, hope everyone be aware of this and this can be fixed asap.

now seems TCNY get unexpected change:

disabled force setting
disabled global force setting by issuer.
disabled confidential transactions
not allow witness/committee members to provide feeds

the worst is that all these features can not be enabled once disabled.

this is really a tragedy for TCNY. :'( , I need to consider how to handle it.
any suggestions?
Title: Re: Big bug in GUI asset update?
Post by: xeroc on January 03, 2016, 07:09:10 pm
@svk @valzav
Title: Re: Big bug in GUI asset update?
Post by: abit on January 03, 2016, 07:47:19 pm
I believe there is big bug in the GUI asset update page.
today I found that 2 parameters of TCNY have been changed:

issuer_permissions: old:511 new:79
flag:old:128 new:0

after some checking I found what make this happen, in 23th Dec, I operate in GUI to change the owner of TCNY, after doing that, the unexpected change happened.

this can be proved with a test with no confirmation on TUSD, after changing the description and clicking update asset, below pop up:

(http://i4.tietuku.com/fe91489c3303c566.png)

issuer_permissions and flag are changed to 79 and 0.

this is big bug and may cause big issue, hope everyone be aware of this and this can be fixed asap.

now seems TCNY get unexpected change:

disabled force setting
disabled global force setting by issuer.
disabled confidential transactions
not allow witness/committee members to provide feeds

the worst is that all these features can not be enabled once disabled.

this is really a tragedy for TCNY. :'( , I need to consider how to handle it.
any suggestions?

A temporary solution for the price feeding issue would be manually white-list the ones who you want to have permissions to provide price feeds from the cli wallet for example:
Code: [Select]
update_asset_feed_producers TCNY [in.abit,dele-puppy] true

Perhaps here is another bug: nobody is in the white list now, but some witnesses are able to feed prices for TCNY but others not. Why?
Title: Re: Big bug in GUI asset update?
Post by: svk on January 03, 2016, 08:17:34 pm
The asset update in the GUI was never tested using bit assets since I have no idea what bits are used to create one, so most likely this is related to that.

I did try to ensure old flags and permissions were kept, but probably your asset had bits that the GUI ignored and so they were overwritten.

Whitelists are another matter, they are always empty as far as I can tell, it's a witness node bug, unrelated to the GUI.
Title: Re: Big bug in GUI asset update?
Post by: clayop on January 05, 2016, 04:25:44 am
Bump...
So how can resolve this problem?
Title: Re: Big bug in GUI asset update?
Post by: bitcrab on January 05, 2016, 04:53:49 am
I have tested and found that now the force settlement feature is actually enabled for TCNY.

according to the design, force settlement/allow witness to provide feed features should both be disabled because of the change but actually not, this is another bug and when in the future the bug be fixed these features will be actually disabled for TCNY, right?

so I wonder whether there are ways to reserve these features for TCNY, as they are important for a smartcoin.




Title: Re: Big bug in GUI asset update?
Post by: merivercap on January 05, 2016, 05:08:44 am
I have tested and found that now the force settlement feature is actually enabled for TCNY.

according to the design, force settlement/allow witness to provide feed features should both be disabled because of the change but actually not, this is another bug and when in the future the bug be fixed these features will be actually disabled for TCNY, right?

so I wonder whether there are ways to reserve these features for TCNY, as they are important for a smartcoin.

Yeah I agree.   The features should be consistent with regular smartcoins.  (Although I'd probably want to disable forced settlement or make it 90%.)

So do these bugs just occur in the GUI and will CLI changes work fine?
Title: Re: Big bug in GUI asset update?
Post by: abit on January 05, 2016, 06:37:05 am
I have tested and found that now the force settlement feature is actually enabled for TCNY.

according to the design, force settlement/allow witness to provide feed features should both be disabled because of the change but actually not, this is another bug and when in the future the bug be fixed these features will be actually disabled for TCNY, right?

so I wonder whether there are ways to reserve these features for TCNY, as they are important for a smartcoin.

Yeah I agree.   The features should be consistent with regular smartcoins.  (Although I'd probably want to disable forced settlement or make it 90%.)

So do these bugs just occur in the GUI and will CLI changes work fine?
It depends on how you use CLI, E.G. what command, what parameters, afaik some commands are fine but others are not.
Title: Re: Big bug in GUI asset update?
Post by: abit on January 05, 2016, 06:41:13 am
I have tested and found that now the force settlement feature is actually enabled for TCNY.

according to the design, force settlement/allow witness to provide feed features should both be disabled because of the change but actually not, this is another bug and when in the future the bug be fixed these features will be actually disabled for TCNY, right?
Lack of detailed document of "feature description" or "feature requirement" yet. "We" need to make one, otherwise the code is correct in any case.

Quote
so I wonder whether there are ways to reserve these features for TCNY, as they are important for a smartcoin.
To "reserve these features" it may need a hard fork.
Title: Re: Big bug in GUI asset update?
Post by: merivercap on January 05, 2016, 07:54:33 am
I have tested and found that now the force settlement feature is actually enabled for TCNY.

according to the design, force settlement/allow witness to provide feed features should both be disabled because of the change but actually not, this is another bug and when in the future the bug be fixed these features will be actually disabled for TCNY, right?

so I wonder whether there are ways to reserve these features for TCNY, as they are important for a smartcoin.

Yeah I agree.   The features should be consistent with regular smartcoins.  (Although I'd probably want to disable forced settlement or make it 90%.)

So do these bugs just occur in the GUI and will CLI changes work fine?
It depends on how you use CLI, E.G. what command, what parameters, afaik some commands are fine but others are not.

Thx it would be good to know 1) which parameters we can change now 2) which ones we have to wait on a hard fork for 3) what day fixes are planned to be made 4) if this requires a worker proposal. 
Title: Re: Big bug in GUI asset update?
Post by: bitcrab on January 05, 2016, 03:47:31 pm
this is an accident, I think there should be a solution to enable the issuer_permissions and flags for TCNY.
 @bytemaster @xeroc @svk @valzav
Title: Re: Big bug in GUI asset update?
Post by: sudo on January 06, 2016, 03:18:23 pm
bad bugs!!!!!!!!
Title: Re: Big bug in GUI asset update?
Post by: svk on January 06, 2016, 08:05:58 pm
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.

Title: Re: Big bug in GUI asset update?
Post by: Thom on January 06, 2016, 08:16:00 pm
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.

This is what ad hoc engineering gets you (no design spec or explicit definitions of what the code needs to implement).

Welcome to BitShares!
Title: Re: Big bug in GUI asset update?
Post by: xeroc on January 07, 2016, 11:06:12 am
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.
https://github.com/cryptonomex/graphene/blob/master/libraries/wallet/wallet.cpp#L2319-L2336
It seems all that is needed is another 'bitasset"-specific json object:
https://github.com/cryptonomex/graphene/blob/master/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp#L87-L110
Title: Re: Big bug in GUI asset update?
Post by: bitcrab on January 07, 2016, 12:22:02 pm
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.
https://github.com/cryptonomex/graphene/blob/master/libraries/wallet/wallet.cpp#L2319-L2336
It seems all that is needed is another 'bitasset"-specific json object:
https://github.com/cryptonomex/graphene/blob/master/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp#L87-L110

do you mean the only way is to create another privatized smartcoin to replace TCNY, if need to get the initial issuer permissions and flags?
Title: Re: Big bug in GUI asset update?
Post by: abit on January 07, 2016, 12:24:26 pm
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.
https://github.com/cryptonomex/graphene/blob/master/libraries/wallet/wallet.cpp#L2319-L2336
It seems all that is needed is another 'bitasset"-specific json object:
https://github.com/cryptonomex/graphene/blob/master/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp#L87-L110

do you mean the only way is to create another privatized smartcoin to replace TCNY, if need to get the initial issuer permissions and flags?
I guess he mean the attributes which svk didn't find are in another object, the "bitasset" object, not the "asset" object.
Title: Re: Big bug in GUI asset update?
Post by: bitcrab on January 07, 2016, 12:27:55 pm
Unless @theoreticalbts or @bytemaster can explain the "missing" permissions that relate to bit assets I can't do much about this.

I say "missing" because they're not part of the definitions here: https://github.com/cryptonomex/graphene/blob/62c22fbf18d748531c468e0d7a88d08eddbd6f20/libraries/chain/include/graphene/chain/protocol/types.hpp#L84

and I've tried searching through the code but I can't find anything explaining how bit asset permissions.
https://github.com/cryptonomex/graphene/blob/master/libraries/wallet/wallet.cpp#L2319-L2336
It seems all that is needed is another 'bitasset"-specific json object:
https://github.com/cryptonomex/graphene/blob/master/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp#L87-L110

do you mean the only way is to create another privatized smartcoin to replace TCNY, if need to get the initial issuer permissions and flags?
I guess he mean the attributes which svk didn't find are in another object, the "bitasset" object, not the "asset" object.
got it.
Title: Re: Big bug in GUI asset update?
Post by: Musewhale on January 07, 2016, 02:57:26 pm
+5% +5% +5%, great, good idea, i like it, just do it!
Title: Re: Big bug in GUI asset update?
Post by: puppies on January 12, 2016, 06:41:49 pm
bitcrab have you tried

Code: [Select]
update_asset TCNY null {  "id": "1.3.734",  "symbol": "TCNY",  "precision": 4,  "issuer": "1.2.121",  "options": {    "max_supply": "1000000000000000",    "market_fee_percent": 0,    "max_market_fee": "1000000000000000",    "issuer_permissions": 511,    "flags": 128,    "core_exchange_rate": {      "base": {        "amount": 103,        "asset_id": "1.3.734"      },      "quote": {        "amount": 46825,        "asset_id": "1.3.0"      }    },    "whitelist_authorities": [],    "blacklist_authorities": [],    "whitelist_markets": [],    "blacklist_markets": [],    "description": "smartcoin defined by transwiser",    "extensions": []  } true
 
That should set your permissions and your flags back to where they were. 
Title: Re: Big bug in GUI asset update?
Post by: xeroc on January 12, 2016, 07:25:33 pm
permissions cannot be re-enabled once the have been disabled ..
Title: Re: Big bug in GUI asset update?
Post by: puppies on January 12, 2016, 07:28:48 pm
permissions cannot be re-enabled once the have been disabled ..

That sucks.