ability to resign as a SON and recover my tokens #55

Closed
opened 2021-03-18 18:03:35 +00:00 by prandnum · 17 comments
prandnum commented 2021-03-18 18:03:35 +00:00 (Migrated from gitlab.com)

Today we can become a SON with the following steps

  1. create SON vesting balance
  2. create a normal vesting balance
  3. upgrade account to lifetime member
  4. set the account as SON

Now there is no way to recover my tokens if I choose to quit as a SON. In order to remove we do the steps in reverse
Note: The operations available in blockchain are withdraw_GPOS_vesting_balance AND withdraw_vesting

  1. remove the account as SON
  2. remove normal vesting balance
  3. remove SON vesting balance

This will help the user to recover his tokens when he chooses to rather than sending them into a black hole :)

Today we can become a SON with the following steps 1. create SON vesting balance 2. create a normal vesting balance 3. upgrade account to lifetime member 4. set the account as SON Now there is no way to recover my tokens if I choose to quit as a SON. In order to remove we do the steps in reverse Note: The operations available in blockchain are withdraw_GPOS_vesting_balance AND withdraw_vesting 1. remove the account as SON 2. remove normal vesting balance 3. remove SON vesting balance This will help the user to recover his tokens when he chooses to rather than sending them into a black hole :)
prandnum commented 2021-03-18 18:03:54 +00:00 (Migrated from gitlab.com)

changed title from ability to resign as a SON to ability to resign as a SON{+ and recover my tokens+}

changed title from **ability to resign as a SON** to **ability to resign as a SON{+ and recover my tokens+}**
prandnum commented 2021-03-18 18:04:28 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos @sierra19XX

CC: @colinijebor

@bobinson @serkixenos @sierra19XX CC: @colinijebor
bobinson commented 2021-03-18 18:10:44 +00:00 (Migrated from gitlab.com)

assigned to @bobinson

assigned to @bobinson
serkixenos commented 2021-03-24 17:57:05 +00:00 (Migrated from gitlab.com)

SON deletion is removed in the following PR, due to crashing when using list_active_sons.
https://github.com/peerplays-network/peerplays/pull/359

Another solution might be to enable user to withdraw SON vesting balance without deleting SON, but the question is when we want to allow that (eg only when deactivated), to avoid user registering as a SON and then immediately withdrawing his vesting balance.

SON deletion is removed in the following PR, due to crashing when using list_active_sons. https://github.com/peerplays-network/peerplays/pull/359 Another solution might be to enable user to withdraw SON vesting balance without deleting SON, but the question is when we want to allow that (eg only when deactivated), to avoid user registering as a SON and then immediately withdrawing his vesting balance.
prandnum commented 2021-04-19 21:23:49 +00:00 (Migrated from gitlab.com)

I was able to recover the token from a deregistered SON. Starting the account(sonaccount14) had 40+ TEST tokens

unlocked >>>

unlocked >>> list_account_balances sonaccount14
list_account_balances sonaccount14
90.88394 TEST

unlocked >>>

unlocked >>> get_vesting_balances sonaccount14
get_vesting_balances sonaccount14
[{
    "id": "1.13.93",
    "owner": "1.2.2387",
    "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-04-19T21:04:42"
  },{
    "id": "1.13.96",
    "owner": "1.2.2387",
    "balance": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "policy": [
      0,{
        "begin_timestamp": "2021-04-14T07:35:39",
        "vesting_cliff_seconds": 172800,
        "vesting_duration_seconds": 0,
        "begin_balance": 5000000
      }
    ],
    "balance_type": "son",
    "allowed_withdraw": {
      "amount": 5000000,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2021-04-16T07:35:39"
  }
]

unlocked >>> withdraw_vesting "1.13.96" 50 TEST true
withdraw_vesting "1.13.96" 50 TEST true
{
  "ref_block_num": 31518,
  "ref_block_prefix": 2553855624,
  "expiration": "2021-04-19T21:12:51",
  "operations": [[
      33,{
        "fee": {
          "amount": 1000,
          "asset_id": "1.3.0"
        },
        "vesting_balance": "1.13.96",
        "owner": "1.2.2387",
        "amount": {
          "amount": 5000000,
          "asset_id": "1.3.0"
        }
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f5f22c29429d15a14896892089c8d18013065341f482a25f039ad2a5f2000a60270c1c7ac2ef2ba83a6bdc0f8b63c7c47cbe41b76f653839d3e6c2b4a4320a0e3"
  ]
}
unlocked >>> get_vesting_balances sonaccount14
get_vesting_balances sonaccount14
[{
    "id": "1.13.93",
    "owner": "1.2.2387",
    "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-04-19T21:14:36"
  }
]
unlocked >>>

unlocked >>>

unlocked >>> list_account_balances sonaccount14
list_account_balances sonaccount14
90.88394 TEST

unlocked >>>

I was able to recover the token from a deregistered SON. Starting the account(sonaccount14) had 40+ TEST tokens ``` unlocked >>> unlocked >>> list_account_balances sonaccount14 list_account_balances sonaccount14 90.88394 TEST unlocked >>> unlocked >>> get_vesting_balances sonaccount14 get_vesting_balances sonaccount14 [{ "id": "1.13.93", "owner": "1.2.2387", "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-04-19T21:04:42" },{ "id": "1.13.96", "owner": "1.2.2387", "balance": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 0,{ "begin_timestamp": "2021-04-14T07:35:39", "vesting_cliff_seconds": 172800, "vesting_duration_seconds": 0, "begin_balance": 5000000 } ], "balance_type": "son", "allowed_withdraw": { "amount": 5000000, "asset_id": "1.3.0" }, "allowed_withdraw_time": "2021-04-16T07:35:39" } ] unlocked >>> withdraw_vesting "1.13.96" 50 TEST true withdraw_vesting "1.13.96" 50 TEST true { "ref_block_num": 31518, "ref_block_prefix": 2553855624, "expiration": "2021-04-19T21:12:51", "operations": [[ 33,{ "fee": { "amount": 1000, "asset_id": "1.3.0" }, "vesting_balance": "1.13.96", "owner": "1.2.2387", "amount": { "amount": 5000000, "asset_id": "1.3.0" } } ] ], "extensions": [], "signatures": [ "1f5f22c29429d15a14896892089c8d18013065341f482a25f039ad2a5f2000a60270c1c7ac2ef2ba83a6bdc0f8b63c7c47cbe41b76f653839d3e6c2b4a4320a0e3" ] } unlocked >>> get_vesting_balances sonaccount14 get_vesting_balances sonaccount14 [{ "id": "1.13.93", "owner": "1.2.2387", "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-04-19T21:14:36" } ] unlocked >>> unlocked >>> unlocked >>> list_account_balances sonaccount14 list_account_balances sonaccount14 90.88394 TEST unlocked >>> ```
yviter commented 2021-11-29 14:55:19 +00:00 (Migrated from gitlab.com)

assigned to @yviter

assigned to @yviter
serkixenos commented 2021-12-01 01:42:11 +00:00 (Migrated from gitlab.com)

mentioned in merge request !37

mentioned in merge request !37
serkixenos commented 2021-12-02 01:33:48 +00:00 (Migrated from gitlab.com)

https://gitlab.com/PBSA/peerplays/-/merge_requests/37

Vesting balances can be retrieved by withdraw_vesting and withdraw_GPOS_vesting_balance cli wallet commands.

https://gitlab.com/PBSA/peerplays/-/merge_requests/37 Vesting balances can be retrieved by withdraw_vesting and withdraw_GPOS_vesting_balance cli wallet commands.
serkixenos commented 2021-12-06 20:31:40 +00:00 (Migrated from gitlab.com)

assigned to @prandnum and unassigned @bobinson and @yviter

assigned to @prandnum and unassigned @bobinson and @yviter
serkixenos commented 2021-12-06 20:36:52 +00:00 (Migrated from gitlab.com)

@prandnum use full qa env.

  1. Bring any son to deregistered state (eg turn off the node where this son is running)
  2. Once deregistered, use cli wallet command activate_deregistered_son to activate it again
  3. After reactivation, son should be in inactive state (unless selected as an active son, then it will be active). Anyway, it will become operational again.
@prandnum use full qa env. 1. Bring any son to deregistered state (eg turn off the node where this son is running) 1. Once deregistered, use cli wallet command activate_deregistered_son to activate it again 1. After reactivation, son should be in inactive state (unless selected as an active son, then it will be active). Anyway, it will become operational again.
prandnum commented 2021-12-15 17:00:05 +00:00 (Migrated from gitlab.com)

@serkixenos validated the above-mentioned scenario but was unable to withdraw the vesting amount because

  1. son account transitioned from inactive to active and remained active
  2. "son_vesting_period": 172800" will rebuild the setup. But there is a chance if I only reduce this parameter it might misconfigure the chain? I plan to set it to 5mins(300) let me know if you have any concern.
@serkixenos validated the above-mentioned scenario but was unable to withdraw the vesting amount because 1. son account transitioned from inactive to active and remained active 2. "son_vesting_period": 172800" will rebuild the setup. But there is a chance if I only reduce this parameter it might misconfigure the chain? I plan to set it to 5mins(300) let me know if you have any concern.
prandnum commented 2021-12-15 19:22:27 +00:00 (Migrated from gitlab.com)

was able to recover the token from deregistered son but, not of inactive son

unlocked >>> get_dynamic_global_properties
get_dynamic_global_properties
{
  "id": "2.1.0",
  "head_block_number": 1531,
  "head_block_id": "000005fb2265eca3228c04ac37b8aebca00b1afd",
  "time": "2021-12-15T19:19:27",
  "current_witness": "1.6.6",
  "next_maintenance_time": "2021-12-15T19:20:00",
  "last_budget_time": "2021-12-15T19:10:00",
  "witness_budget": 14000000,
  "last_son_payout_time": "2021-12-15T19:10:00",
  "son_budget": 20000000,
  "accounts_registered_this_interval": 0,
  "recently_missed_count": 0,
  "current_aslot": 2805779,
  "recent_slots_filled": "340282366920938463463374607431768211455",
  "dynamic_flags": 0,
  "last_irreversible_block_num": 1524
}
unlocked >>> get_son sonaccount07
get_son sonaccount07
{
  "id": "1.33.6",
  "son_account": "1.2.42",
  "vote_id": "3:44",
  "total_votes": 0,
  "url": "http://sonaddreess07.com",
  "deposit": "1.13.14",
  "signing_key": "TEST7RMDnipLkFaQ4vtDyVvgyCedRoxyT9JWpAoM9mrE7rwVSyezoB",
  "pay_vb": "1.13.13",
  "statistics": "2.25.6",
  "status": "inactive",
  "sidechain_public_keys": [[
      "bitcoin",
      "0317941e4219548682fb8d8e172f0a8ce4d83ce21272435c85d598558c8e060b7f"
    ],[
      "peerplays",
      "TEST7RMDnipLkFaQ4vtDyVvgyCedRoxyT9JWpAoM9mrE7rwVSyezoB"
    ],[
      "hive",
      "sonaccount07"
    ]
  ]
}
unlocked >>> get_vesting_balances sonaccount07
get_vesting_balances sonaccount07
[{
    "id": "1.13.13",
    "owner": "1.2.42",
    "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-12-15T19:19:39"
  },{
    "id": "1.13.40",
    "owner": "1.2.42",
    "balance": {
      "amount": 2435742,
      "asset_id": "1.3.0"
    },
    "policy": [
      1,{
        "vesting_seconds": 31536000,
        "start_claim": "1970-01-01T00:00:00",
        "coin_seconds_earned": "76813559712000",
        "coin_seconds_earned_last_update": "2021-12-15T19:10:00"
      }
    ],
    "balance_type": "normal",
    "allowed_withdraw": {
      "amount": 2435742,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2021-12-15T19:19:39"
  },{
    "id": "1.13.77",
    "owner": "1.2.42",
    "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-12-15T19:19:39"
  }
]
unlocked >>> withdraw_vesting "1.13.77" 50 TEST true
withdraw_vesting "1.13.77" 50 TEST true
1202592ms th_a       wallet.cpp:3012               sign_transaction     ] Caught exception while broadcasting tx c112ab64cb8512c85599936f4800a78fa98a8c36:  0 exception: unspecified
Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw
    {"error":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"id":381,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"vesting_balance_evaluator.cpp","line":145,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient ${balance_type} Vested Balance to withdraw","data":{"balance_type":"SON","now":"2021-12-15T19:20:00","op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}},"vbo":{"id":"1.13.77","owner":"1.2.42","balance":{"amount":5000000,"asset_id":"1.3.0"},"policy":[2,{}],"balance_type":"son"}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":172,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":134,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}]]}}]}}}}
    th_a  state.cpp:38 handle_reply
0 exception: unspecified
Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw
    {"error":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"id":381,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"vesting_balance_evaluator.cpp","line":145,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient ${balance_type} Vested Balance to withdraw","data":{"balance_type":"SON","now":"2021-12-15T19:20:00","op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}},"vbo":{"id":"1.13.77","owner":"1.2.42","balance":{"amount":5000000,"asset_id":"1.3.0"},"policy":[2,{}],"balance_type":"son"}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":172,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":134,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}]]}}]}}}}
    th_a  state.cpp:38 handle_reply

    {"witness_name":"1.13.77","amount":"50"}
    th_a  wallet.cpp:2590 withdraw_vesting
unlocked >>> 
was able to recover the token from deregistered son but, not of inactive son ``` unlocked >>> get_dynamic_global_properties get_dynamic_global_properties { "id": "2.1.0", "head_block_number": 1531, "head_block_id": "000005fb2265eca3228c04ac37b8aebca00b1afd", "time": "2021-12-15T19:19:27", "current_witness": "1.6.6", "next_maintenance_time": "2021-12-15T19:20:00", "last_budget_time": "2021-12-15T19:10:00", "witness_budget": 14000000, "last_son_payout_time": "2021-12-15T19:10:00", "son_budget": 20000000, "accounts_registered_this_interval": 0, "recently_missed_count": 0, "current_aslot": 2805779, "recent_slots_filled": "340282366920938463463374607431768211455", "dynamic_flags": 0, "last_irreversible_block_num": 1524 } unlocked >>> get_son sonaccount07 get_son sonaccount07 { "id": "1.33.6", "son_account": "1.2.42", "vote_id": "3:44", "total_votes": 0, "url": "http://sonaddreess07.com", "deposit": "1.13.14", "signing_key": "TEST7RMDnipLkFaQ4vtDyVvgyCedRoxyT9JWpAoM9mrE7rwVSyezoB", "pay_vb": "1.13.13", "statistics": "2.25.6", "status": "inactive", "sidechain_public_keys": [[ "bitcoin", "0317941e4219548682fb8d8e172f0a8ce4d83ce21272435c85d598558c8e060b7f" ],[ "peerplays", "TEST7RMDnipLkFaQ4vtDyVvgyCedRoxyT9JWpAoM9mrE7rwVSyezoB" ],[ "hive", "sonaccount07" ] ] } unlocked >>> get_vesting_balances sonaccount07 get_vesting_balances sonaccount07 [{ "id": "1.13.13", "owner": "1.2.42", "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-12-15T19:19:39" },{ "id": "1.13.40", "owner": "1.2.42", "balance": { "amount": 2435742, "asset_id": "1.3.0" }, "policy": [ 1,{ "vesting_seconds": 31536000, "start_claim": "1970-01-01T00:00:00", "coin_seconds_earned": "76813559712000", "coin_seconds_earned_last_update": "2021-12-15T19:10:00" } ], "balance_type": "normal", "allowed_withdraw": { "amount": 2435742, "asset_id": "1.3.0" }, "allowed_withdraw_time": "2021-12-15T19:19:39" },{ "id": "1.13.77", "owner": "1.2.42", "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-12-15T19:19:39" } ] unlocked >>> withdraw_vesting "1.13.77" 50 TEST true withdraw_vesting "1.13.77" 50 TEST true 1202592ms th_a wallet.cpp:3012 sign_transaction ] Caught exception while broadcasting tx c112ab64cb8512c85599936f4800a78fa98a8c36: 0 exception: unspecified Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw {"error":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"id":381,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"vesting_balance_evaluator.cpp","line":145,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient ${balance_type} Vested Balance to withdraw","data":{"balance_type":"SON","now":"2021-12-15T19:20:00","op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}},"vbo":{"id":"1.13.77","owner":"1.2.42","balance":{"amount":5000000,"asset_id":"1.3.0"},"policy":[2,{}],"balance_type":"son"}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":172,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":134,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}]]}}]}}}} th_a state.cpp:38 handle_reply 0 exception: unspecified Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw {"error":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"id":381,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient SON Vested Balance to withdraw","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"vesting_balance_evaluator.cpp","line":145,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"vbo.is_withdraw_allowed( now, op.amount ): Account has insufficient ${balance_type} Vested Balance to withdraw","data":{"balance_type":"SON","now":"2021-12-15T19:20:00","op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}},"vbo":{"id":"1.13.77","owner":"1.2.42","balance":{"amount":5000000,"asset_id":"1.3.0"},"policy":[2,{}],"balance_type":"son"}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":172,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}}},{"context":{"level":"warn","file":"vesting_balance_evaluator.cpp","line":134,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"op":[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"trx":{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2021-12-15T19:20:02"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":1542,"ref_block_prefix":669877814,"expiration":"2021-12-15T19:20:30","operations":[[33,{"fee":{"amount":2000000,"asset_id":"1.3.0"},"vesting_balance":"1.13.77","owner":"1.2.42","amount":{"amount":5000000,"asset_id":"1.3.0"}}]],"extensions":[],"signatures":["1f41ef94c16fd256c106f931c1544588506c184e94b59bfccb470fc7f21e95c7243d11cb2712376231b4f6e1a1ab0e33d0fed8182df922800c3dad8abfbfd91bbe"]}]]}}]}}}} th_a state.cpp:38 handle_reply {"witness_name":"1.13.77","amount":"50"} th_a wallet.cpp:2590 withdraw_vesting unlocked >>> ```
serkixenos commented 2021-12-15 20:01:01 +00:00 (Migrated from gitlab.com)
   /**
    * @brief Cant withdraw anything while balance is in this policy.
    *
    * This policy is needed to register SON users where balance may be claimable only after
    * the SON object is deleted(plus a linear policy).
    * When deleting a SON member the dormant mode will be replaced by a linear policy.
    *
    * @note New funds may not be added to a dormant vesting balance.
    */
      struct dormant_vesting_policy
      {
         asset get_allowed_withdraw(const vesting_policy_context& ctx)const;
         bool is_deposit_allowed(const vesting_policy_context& ctx)const;
         bool is_deposit_vested_allowed(const vesting_policy_context&)const { return false; }
         bool is_withdraw_allowed(const vesting_policy_context& ctx)const;
         void on_deposit(const vesting_policy_context& ctx);
         void on_deposit_vested(const vesting_policy_context&)
         { FC_THROW( "May not deposit vested into a linear vesting balance." ); }
         void on_withdraw(const vesting_policy_context& ctx);
      };

SON vb is using dormant vesting policy. Designed behavior is to not allow withdrawal of SON vesting balance (but you can withdraw normal and gpos vbs). Now, we removed the delete option for SONs, due to problems this can cause.

Looks like we are not be able to provide this feature in wanted capacity.

``` /** * @brief Cant withdraw anything while balance is in this policy. * * This policy is needed to register SON users where balance may be claimable only after * the SON object is deleted(plus a linear policy). * When deleting a SON member the dormant mode will be replaced by a linear policy. * * @note New funds may not be added to a dormant vesting balance. */ struct dormant_vesting_policy { asset get_allowed_withdraw(const vesting_policy_context& ctx)const; bool is_deposit_allowed(const vesting_policy_context& ctx)const; bool is_deposit_vested_allowed(const vesting_policy_context&)const { return false; } bool is_withdraw_allowed(const vesting_policy_context& ctx)const; void on_deposit(const vesting_policy_context& ctx); void on_deposit_vested(const vesting_policy_context&) { FC_THROW( "May not deposit vested into a linear vesting balance." ); } void on_withdraw(const vesting_policy_context& ctx); }; ``` SON vb is using dormant vesting policy. Designed behavior is to not allow withdrawal of SON vesting balance (but you can withdraw normal and gpos vbs). Now, we removed the delete option for SONs, due to problems this can cause. Looks like we are not be able to provide this feature in wanted capacity.
prandnum commented 2021-12-16 16:17:23 +00:00 (Migrated from gitlab.com)

@bobinson should we close this as a limitation?

@bobinson should we close this as a limitation?
hbelakon commented 2022-01-07 04:12:41 +00:00 (Migrated from gitlab.com)

@serkixenos please estimate. I will put Weight 3 for now...

@serkixenos please estimate. I will put Weight 3 for now...
serkixenos commented 2022-01-17 20:59:06 +00:00 (Migrated from gitlab.com)

Closing, as it is a design limitation.

Closing, as it is a design limitation.
serkixenos (Migrated from gitlab.com) closed this issue 2022-01-17 20:59:06 +00:00
bobinson commented 2022-04-18 06:45:49 +00:00 (Migrated from gitlab.com)

made the issue visible to everyone

made the issue visible to everyone
Sign in to join this conversation.
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#55
No description provided.