You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
We have a situation in Testnet 2.0 when an addition of a NodeAdmin account was stuck even if a quorum of trustee approvals has been received (7 approvals from 10 trustees).
Possible reason:
This issue seems to be related to the revocation of trustee accounts while there are pending accounts to be approved.
Example:
There are 10 trustees in the network
Account "A" is proposed to be added (requires at least 7 approvals. 2/3 of trustees)
Account "A" receives 6 approvals (one more approval is required)
Meanwhile 1 trustee account has been revoked and there are 9 trustees in the network
Account "A" is still in pending approvals, even if it has 6 approvals which are enough after the revocation of a trustee
Account "A" receives one more approval and now it has 7 approvals. The account has not been added even if it has more than the required number of approvals (6 required)
The DCL logic checks whether an account has enough approvals in the following way:
// check if pending account has enough approvals
if len(pendAcc.Approvals) == k.AccountApprovalsCount(ctx)
which is a problem because it checks whether the number of approvals is exactly equal to the required number. k.AccountApprovalsCount(ctx) calculates the required number of approvals based on the number of trustees at the moment of execution. In our particular case k.AccountApprovalsCount(ctx) returns 6, but pendAcc.Approvals is already 7. So this account will never be added unless the number of trustees increases.
Possible solutions:
Change the logic for checking whether an account has required approvals:
// check if pending account has enough approvals
if len(pendAcc.Approvals) >= k.AccountApprovalsCount(ctx)
so that whenever the number of approvals exceeds the required number an account is added.
Whenever a trustee account is revoked, all pending accounts should be checked whether they have enough approvals. If so, accounts are added automatically.
The text was updated successfully, but these errors were encountered:
I think both items need to be implemented, but Item 2 doesn't look like a must have for 1.0, and can be considered as an additional feature.
Let's do Item 1 only (change == to >=) in the scope of this task, and create a separate task for Item 2, see #358.
Problem:
We have a situation in Testnet 2.0 when an addition of a NodeAdmin account was stuck even if a quorum of trustee approvals has been received (7 approvals from 10 trustees).
Possible reason:
This issue seems to be related to the revocation of trustee accounts while there are pending accounts to be approved.
Example:
k.AccountApprovalsCount(ctx)
calculates the required number of approvals based on the number of trustees at the moment of execution. In our particular casek.AccountApprovalsCount(ctx)
returns 6, butpendAcc.Approvals
is already 7. So this account will never be added unless the number of trustees increases.Possible solutions:
The text was updated successfully, but these errors were encountered: