Check vesting balance properties before creating/updating SON #591

Merged
serkixenos merged 2 commits from hotfix/master-son-vb-checks into master 2021-02-09 03:43:43 +00:00
serkixenos commented 2021-02-04 13:14:22 +00:00 (Migrated from gitlab.com)
No description provided.
bobinson (Migrated from gitlab.com) approved these changes 2021-02-04 13:14:22 +00:00
serkixenos commented 2021-02-04 15:13:19 +00:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>73880526 - Add extra check for chain id</li></ul> [Compare with previous version](/PBSA/peerplays/-/merge_requests/11/diffs?diff_id=140842348&start_sha=4cb2c5eca023ee66cd6c6c43cd710612f543a9ea)
serkixenos commented 2021-02-04 21:13:07 +00:00 (Migrated from gitlab.com)

mentioned in issue #41

mentioned in issue #41
bobinson commented 2021-02-09 03:42:22 +00:00 (Migrated from gitlab.com)

approved this merge request

approved this merge request
bobinson commented 2021-02-09 03:43:43 +00:00 (Migrated from gitlab.com)

mentioned in commit bb4fc3c9c1

mentioned in commit bb4fc3c9c13cc3a12ec3969d31c72ac8db432851
bobinson (Migrated from gitlab.com) merged commit bb4fc3c9c1 into master 2021-02-09 03:43:43 +00:00
bobinson commented 2021-02-11 13:01:22 +00:00 (Migrated from gitlab.com)

@prandnum - need to review this. On MAINNET, we can look for version upgrade followed by the fixing commands executed by the witness houdini.

This particular user (houdini) should execute the following command from cli_wallet:
update_son_vesting_balances 1.2.14364 1.13.242 1.13.241

Also, note that this user created three vesting balances in total, and two of them are of type normal 240 and 241, so he can use any of these two

locked >>> get_vesting_balances 1.2.14364
get_vesting_balances 1.2.14364
[{
    "id": "1.13.240",
    "owner": "1.2.14364",
    "balance": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "policy": [
      0,{
        "begin_timestamp": "1970-01-01T00:00:00",
        "vesting_cliff_seconds": 0,
        "vesting_duration_seconds": 0,
        "begin_balance": 5000000
      }
    ],
    "balance_type": "normal",
    "allowed_withdraw": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2021-02-11T10:18:48"
  },{
    "id": "1.13.241",
    "owner": "1.2.14364",
    "balance": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "policy": [
      0,{
        "begin_timestamp": "1970-01-01T00:00:00",
        "vesting_cliff_seconds": 0,
        "vesting_duration_seconds": 0,
        "begin_balance": 5000000
      }
    ],
    "balance_type": "normal",
    "allowed_withdraw": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2021-02-11T10:18:48"
  },{
    "id": "1.13.242",
    "owner": "1.2.14364",
    "balance": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "policy": [
      2,{}
    ],
    "balance_type": "son",
    "allowed_withdraw": {
      "amount": 0,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2021-02-11T10:18:48"
  }
]
@prandnum - need to review this. On MAINNET, we can look for version upgrade followed by the fixing commands executed by the witness `houdini`. This particular user (houdini) should execute the following command from cli_wallet: `update_son_vesting_balances 1.2.14364 1.13.242 1.13.241` Also, note that this user created three vesting balances in total, and two of them are of type normal 240 and 241, so he can use any of these two ``` locked >>> get_vesting_balances 1.2.14364 get_vesting_balances 1.2.14364 [{ "id": "1.13.240", "owner": "1.2.14364", "balance": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 0,{ "begin_timestamp": "1970-01-01T00:00:00", "vesting_cliff_seconds": 0, "vesting_duration_seconds": 0, "begin_balance": 5000000 } ], "balance_type": "normal", "allowed_withdraw": { "amount": 5000000, "asset_id": "1.3.0" }, "allowed_withdraw_time": "2021-02-11T10:18:48" },{ "id": "1.13.241", "owner": "1.2.14364", "balance": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 0,{ "begin_timestamp": "1970-01-01T00:00:00", "vesting_cliff_seconds": 0, "vesting_duration_seconds": 0, "begin_balance": 5000000 } ], "balance_type": "normal", "allowed_withdraw": { "amount": 5000000, "asset_id": "1.3.0" }, "allowed_withdraw_time": "2021-02-11T10:18:48" },{ "id": "1.13.242", "owner": "1.2.14364", "balance": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 2,{} ], "balance_type": "son", "allowed_withdraw": { "amount": 0, "asset_id": "1.3.0" }, "allowed_withdraw_time": "2021-02-11T10:18:48" } ] ```
bobinson commented 2021-02-11 13:02:49 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#591
No description provided.