-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSIP 65: fix locked accounts / recursive account permissions #94
Comments
What does it mean to identify? My account is "dayman32" - and I have all the keys to it. |
|
@pmconrad good points. This is an issue but not a formal BSIP document. What should we put in the BSIP is to be discussed. |
Would it make sense to start integrating the account recovery feature that steem has? |
When will this issue be solved to unblock accounts with our funds? |
I feel this Issue needs a BSIP drafted. It will be a consensus change, so December at the earliest for release (unlikely). Next opportunity would be June. Let's get an abstract defined here, then begin the specification within a PR. This BSIP drafting process is still TBD. |
My account is bycz2. I have the brain key and wallet backup. |
waiting for solutions. |
Possible approach for preventing future accidents:
|
An account_update operation with the account itself in authorities or with an impossible loop after updated will still pass current authorization check in bitshares-core, because authorization is only verified before applying the changes (bitshares/bitshares-core#1373 is related). Actually, I think it's possible to check whether an account is locked after applied the update. I think YOYOW has implemented it or almost there, related code is here. |
Do you guys recall the account recovery stuff in steem? |
IIRC there's a limit to how long you can claim back an account, so that wouldn't really help the locked accounts. |
Good point. |
Perhaps a way for current auth to sign intention to revoke legacy auths. This would make it incumbent on a new owner to perform this step as part of account transfer. In case the account is locked, a prior auth could request restoration (because current auth was unable to sign the revocation). |
IMHO how to recover stolen account is out of this issue's scope. @ryanRfox your proposal about "current auth to sign intention to revoke legacy auths" is exactly current behavior. If you changed authorities, new authorities would gain control, old authorities would lose control. For locked accounts, my proposal would be simply undo the last account_update operation with a hard fork, no exception, no request required. As mentioned above, likely we'll be able to detect and avoid further account locking up with a hard fork. So all will be settled. |
Adding to (next) Protocol Release for further research and discussion. Not clear where the best place to discuss this will be. It seems identifying the impacted accounts is required step. Shall we begin with an effort to do this? |
We agree with @abitmore:
Also, we offer to add functionality preventing create or update account authority with circular dependencies. The toolkit/script of identification of the impacted users should be elaborated before hard-fork. |
Yes, @OpenLedgerApp please do some research to identify the locked accounts. Suggesting from @oxarbitrage is to use elasticsearch plugin. Next, would be some effort to identify the accounts in a deterministic way. Please add an effort estimate in this Issue. Thanks |
actually in regards to elasticsearch what needed is the es_objects plugin. here are all the accounts created in bitshares: However, to get the locked accounts we need to among other things, do a query on top of that to compare if Unfortunately, it seems that this kind of checks cant be done by kibana(lucene syntax) but can be done by elasticsearch I dont want to go further into that as maybe @OpenLedgerApp already have its own way to identify them, can be also by done by the bitshares api with python or whatever by pulling all the accounts and make the checks there; 1,2 million accounts to check should not be a huge performance issue. |
Regarding the scope of this BSIP: Should we limit to only Are we interested to learn if any additional "locked accounts" exist because their authority references a locked account? This gets into recursion and I'm not suggesting we dig too deep. If the remedy is to unlock the parent account, the children will become unlocked without further action required by this BSIP. |
Inside Unsure if you can also block your own account with thoses but worth discussion. |
We have made research to identify the locked accounts: |
@OpenLedgerApp please create a PR with your findings thus far. It will be most beneficial if the ES queries and Python code can be posted for review and evaluation by other reviewers. We can use the results to continue refining a BSIP draft. |
By the way, the following url can be used to make direct queries to ES with es_objects data:
Also, the kibana url posted above changed to https://bitshares-kibana.info/ instead of www.bitshares-kibana.info:5601 |
We have created a branch with our results - https://github.com/openledger/bitshares-core/tree/94-fix-locked-accounts/tests/locked_accounts |
IMHO, we need consensus code (C++) in bitshares-core to avoid future circuits, so python scripts or ES queries which are only able to detect existing circuits (after damage has been done) are not enough, although they are indeed helpful for testing. We don't need to put the list of already locked accounts into the BSIP, although we can take some of them as examples. I may be able to write the C++ code, but I don't have time in the near future, if OpenLedgerDev can get it done, that's great. |
Of course identify them is not enough, i think it is just to do this part of the issue: My understanding is @OpenLedgerApp will do the c++ code as well. |
it's a good point and we understand it. We wanted to share our investigation results with the community and found out how many locked accounts there are. |
After internal discussions, we are seeing the solution of this issue into 2 steps: The second and final step, we can develop C++ code which will be executed in the maintenance interval. This C++ code will find all locked accounts with circular dependencies and undo the last account_update operation. However, this step in comparison with the first one should be discussed with community. Maybe we should publish such accounts and ask the approval for this step for every owner. What do you think? |
The same code that forbids circular dependencies after a hardfork can detect these before the hardfork and collect them for fixing them at maintenance after the hardfork. Both steps are a change of consensus and require specification in BSIP that is particularly specific on the detection logic. IMO owner approval from individual accounts is not needed. If someone did this on purpose to make their account unusable there are different ways to achieve this again. |
As discussed with Ryan we are developing additional functionality "avoid circular dependencies". Tomorrow we will provide the first result, so you can review our code. For step 2 we have been starting to create BSIP. We are going to finalize the spec for BSIP based on our existing code logic. We will provide our solution and describe potential risks for unlocking the accounts at the middle of next week. |
We have created a branch with our results - openledger/bitshares-core@d343200 The branch contains С++ code for additional functionality "Prevent to create cycled accounts". This functionality will prevent to create or update account authority with circular dependencies in the future. |
Your code is based on a wrong understanding of owner authorities: If Alice is listed as Bob's owner authority, then Alice's active authority is sufficient to approve key changes on Bob's account, for example. Please let's agree on a specification first, then you can implement what we have agreed upon. Also note @abitmore 's remark in bitshares/bitshares-core#269 (comment) :
|
@pmconrad, thank you for your comment. Could you explain several details to avoid our misunderstanding: At this moment Bitshares has the implementation: active authority can change the owner authority. Our solution based on documentation - https://bitshares.org/technology/dynamic-account-permissions Could you please explain how authority has to work? |
This is correct.
By including another account in the owner authority you delegate owner authority to that other account. Confirming actions on behalf of another account requires only active authority, even if that action requires owner authority itself (but in that case the delegation must come from owner authority, not from active!). In your specific example, Alice delegates her owner authority to active, which results in her active authority being sufficient to change owner keys. This is the way it is implemented and I believe this is intentionally so. |
@pmconrad, thank you for your comments. They're quite useful! So comes another use case. So, we see potential risk for Alice account. Could you please describe the expected results? |
The behaviour is as expected. Authority delegation is transitive, on purpose, for a limited number of levels. The limit is configurable by the committee. Delegating authority to someone else comes with a risk of course, especially in the case of owner authority. Alice should do that only if she trusts Jill. |
Why is this question not tagged with a hard fork? I have been waiting for a decision for more than 2 years. When will fix this bug? * When will hard fork? |
@dayman32 all discussions in this repository (BSIP) require hard fork so we don't tag individuals. We're now discussing the solution, when done and approved by stake holders via on-chain voting, there will be a hard fork. |
OpenLedger DEX has closed down…… |
No progress on this issue so far. This BSIP has not been merged into the repository, the solution is not finalized, no hard fork is scheduled for it. |
Another 1 year has passed. Anyone looking for a solution? |
I think that is a problem that the developer community should
acknowledge that is important.
Since one of the principles of blockchain technology is to able the users
to have full control of their assets, everytime.
And one blockchain that does not allow to fully restore the wallet with the
seed passphrase does not give full control to their users.
dayman32 <notifications@github.com> escreveu no dia terça, 23/06/2020 à(s)
15:10:
… Another 1 year has passed. Anyone looking for a solution?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#94 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUGYC44DRTJW6GHUE2UI6LRYCZVBANCNFSM4FO2G7UA>
.
--
Cumprimentos,
Rafael Mateus.
Telf. +351967008933
|
Still alive? @abitmore @pmconrad @xeroc @ryanRfox @oxarbitrage |
Earlier discussion is here: bitshares/bitshares-core#269
We do need to identify the locked accounts first.
After identified, an approach to fix them is reverting the last
account_update_operation
done in the accounts.The text was updated successfully, but these errors were encountered: