-
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
BSIP65: Fix Locked Accounts #149
base: master
Are you sure you want to change the base?
BSIP65: Fix Locked Accounts #149
Conversation
merge latest changes to openledger bsips repository Dec 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this BSIP draft is lacking. It does not meet the expectations defined in BSIP1 - BSIP Purpose and Guidelines. As a Community Member I am unable to understand from this proposal what the problem statement is and what the proposed solution(s) will do to remedy it. This needs much more definition in all sections.
bsip-0061.md
Outdated
To avoid any misunderstanding of existing authorization mechanism we propose to reuse actual code of sign_state::check_authority(). Make template class traverse_authorities_state and parametrize it with approve() method. By default approve = signed_by(), an existing method of sign_state class. We add keys_available() method to resolve signing path. So, check_authority() returns true, if signing path fully ends with existing keys. | ||
|
||
## Fix locked accounts | ||
There are two approaches here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is:
-
- Resolving the locked accounts is unconditional for the impacted accounts (no fees, no ability to opt-out).
-
- The hardfork will revert the most recent account update operation by performing a new account update operation to set the the account authority to be in the previous (unlocked) state.
-
- The hardfork will also contain logic that prevents locked accounts in the future (to a depth TBD).
I don't see a need for the Manual (on-demand) section. I am open to further discussion/explanation of its utility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See details in updated version. You are welcome to discussion.
bsip-0061.md
Outdated
|
||
## Examples | ||
Account A has key. Account B delegates it's authority to A - ok. C -> B - ok. D -> C - fail. | ||
Transaction can never be signed by D. D exceed depth limit. Current depth limit in Bitshares = 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please demonstrate where this depth limit is defined in the code today. I assume something like GRAPHENE_MAX_AUTHORITY_DEPTH or something. Is this parameter allowed to be changed by the Committee at this time, or hard coded and would require a distinct BSIP to change?
The example is lacking clarity for me. We have to consider both Owner and Active authorities and how they may interact, at what depths. We need to provide and example of what we can unlock (and cannot, why) and what we can prevent from being locked (and cannot, why).
Please use valid formed account names such as "alice" "bob" "charlie" etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We offer to develop a solution for BitShares users. | ||
This solution allows unlocking accounts, which are locked by mistake. | ||
The most important goal is to return access to the wallets and unlock their money. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a cost/benefit discussion.
How many such locked accounts exist today, how much are the locked balances worth, and what would it cost to implement this proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cost/benefit discussion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please most specific what is required here - the cost/benefit? We have put the benefits previously. Finally, it does not matter how does it costs if it influences on the Bitshares major functionality and many users faced with this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How many such locked accounts exist today, how much are the locked balances worth, and what would it cost to implement this proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to change the search algorithm according to the comments - #94
As a result, the number of locked accounts has decreased.
List of the locked balances - https://docs.google.com/document/d/1Dmcr9QzSWnCbSKcpaN08iENJyn6AWogbKjZ_iHH4OM0/edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have summarised the most liquid currencies of locked accounts.
Here the list:
BTS - 1,641,712.7494
USD - 14,546.7176
BTC - 6.86072047
CNY - 16,396.3406
ETH - 0.278826
LTC - 8.60401198
DASH - 0.23722333
ICOO - 348.1812
OBITS - 3,102.1454
Total locked budget is 144,619.841 bitUSD
As you can see the total budget is huge. We offer to unlock these accounts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. That is indeed significant.
How about taking 10% from each account as payment for the implementation? (Seriously. The accounts are locked which means a 100% loss for the owner. We're offering to return 90%.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about taking 10% from each account as payment for the implementation? (Seriously. The accounts are locked which means a 100% loss for the owner. We're offering to return 90%.)
It makes sense.
@pmconrad could you please share your idea of how this can be implemented in a technical way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At unlock time, walk through the account balances and auto-transfer 10% from each non-zero balance to a specific account, e. g. committee-account. That's pretty straightforward.
The non-technical side may be more tricky. :-/
- Push corresponding virtual account_update_operation. | ||
|
||
# Specifications | ||
## Prevent circular dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specification is incomplete. It does not specify the unlocking process.
Also, please keep in mind that the target audience of a BSIP consists largely of non-programmers. Code as specification is insufficient. Pseudocode is welcome for data structures etc., but logic should be describe in a human-readable way. (Some of the "Rationale" can be included in the specification.)
We need to determine the way how to fix locked accounts.
Let's decide it will be automatic or manual way. |
Due to the fact that the algorithm for finding and unlocking accounts is quite complex and will require significant costs, we suggest considering another opportunity to unlock in the near HF:
After HF, we check if there are still blocked accounts. They may appear after adding the unlock code, but before the HF. If there are any, then add them hardcoded to the next HF. |
IMO the algorithm for finding locked accounts is exactly as simple as detecting the lock in the first place.
|
The logic of finding a blocking operation is not as simple as determining whether an account has been blocked. In addition to the fact that the account is blocked, we must find the last operation in the chain of blocked accounts that led to this state. If you perform such calculations in bitshares-core in maintenance, then you should also take into account that the history plugin may be inactive and the nodes must come to consensus even without it. Without history plugin, this is problematic. You need to build a cache of recent authority change operations during replay, which will require a large amount of additional memory. |
Yes it is. An account that is blocked cannot be updated. So a blocking operation is an Note that it is not necessary to find the complete original |
@ryanRfox please assign BSIP number. |
Massive amount of hours went into this. What is the status @OpenLedgerApp ? |
For #94.