automation for : Verify hive withdrawal #243

Closed
opened 2022-01-12 11:38:10 +00:00 by pavel.baykov · 4 comments
pavel.baykov commented 2022-01-12 11:38:10 +00:00 (Migrated from gitlab.com)

Consider an peerplays user account with hive deposit and withdraw address mapped, and some HIVE/HBD tokens in their balance

Get the balance of peerplays user account (from Peerplays cli wallet)

  • list_account_balances <<user_account>>

Get the balance of mapped Hive account (from Hive cli wallet)

  • get_account <hive_account>

Get the balance of Hive son-account account (from Hive cli wallet)

  • get_account son-account

Send some funds from peerplays account to son-account (from Peerplays cli wallet)

  • transfer <<user_account>> son-account 50 HIVE null true
  • transfer <<user_account>> son-account 100 HBD null true

Verify the log and SONs should detect the withdrawal
and equivalent peerplays token (HIVE/HBD) is removed from the peerplays account.

Note: check the log instantly or parallel with transaction

Verify the account balances after the transaction

Get the balance of peerplays user account

  • list_account_balances <<user_account>>

Get the balance of mapped Hive account

  • get_account <hive_account>

Get the balance of Hive son-account account

  • get_account son-account
Consider an peerplays user account with hive deposit and withdraw address mapped, and some HIVE/HBD tokens in their balance Get the balance of peerplays user account (from Peerplays cli wallet) - list_account_balances <<user_account>> Get the balance of mapped Hive account (from Hive cli wallet) - get_account <hive_account> Get the balance of Hive son-account account (from Hive cli wallet) - get_account son-account Send some funds from peerplays account to son-account (from Peerplays cli wallet) - transfer <<user_account>> son-account 50 HIVE null true - transfer <<user_account>> son-account 100 HBD null true Verify the log and SONs should detect the withdrawal and equivalent peerplays token (HIVE/HBD) is removed from the peerplays account. Note: check the log instantly or parallel with transaction Verify the account balances after the transaction Get the balance of peerplays user account - list_account_balances <<user_account>> Get the balance of mapped Hive account - get_account <hive_account> Get the balance of Hive son-account account - get_account son-account
pavel.baykov commented 2022-01-12 11:38:10 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
pavel.baykov commented 2022-01-26 16:23:31 +00:00 (Migrated from gitlab.com)

test itself is ready
however there is the same problem like we have in issue 253

test itself is ready however there is the same problem like we have in issue 253
serkixenos commented 2022-01-31 03:35:21 +00:00 (Migrated from gitlab.com)
test.py::test_Verify_Hive_Withdrawal Verify Hive Withdrawal
19858.89063 TEST


1157284ms websocket_api.cpp:102         on_message           ] message: {"jsonrpc":"2.0","result":[],"id":2} 
10 assert_exception: Assert Exception
!accounts.empty(): Unknown account
    {}
    wallet.cpp:356 get_account

1157341ms websocket_api.cpp:102         on_message           ] message: {"jsonrpc":"2.0","result":[{"id":7,"name":"sonaccount01","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST6WnsoE2Qrf4W6GEwUHjgt8yjFPVBtU41AZNEPqzQHXhUY31hBm",1]]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST7uyCVRCLgqEpVkGRn1MsZhYDyYprAbrDXWsMYTWfbVqpJrdpJi",1]]},"posting":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST5YaJZkXYQMjFQ2WhrVrkErjJvcRX2BiWQkSsKgfam9AtyWq9oA",1]]},"memo_key":"TST5pYaJTJJAdDHG3UGTsqZ8EWTqku1ouVd2tirmAsiQ7t5Uf1aP6","json_metadata":"","posting_json_metadata":"","proxy":"","last_owner_update":"1970-01-01T00:00:00","last_account_update":"1970-01-01T00:00:00","created":"2022-01-30T23:38:03","mined":false,"recovery_account":"initminer","last_account_recovery":"1970-01-01T00:00:00","reset_account":"null","comment_count":0,"lifetime_vote_count":0,"post_count":0,"can_vote":true,"voting_manabar":{"current_mana":"36777813585","last_update_time":1643586183},"downvote_manabar":{"current_mana":"9194453396","last_update_time":1643586183},"voting_power":0,"balance":"4000000.000 TESTS","savings_balance":"0.000 TESTS","hbd_balance":"200000.000 TBD","hbd_seconds":"0","hbd_seconds_last_update":"1970-01-01T00:00:00","hbd_last_interest_payment":"1970-01-01T00:00:00","savings_hbd_balance":"0.000 TBD","savings_hbd_seconds":"0","savings_hbd_seconds_last_update":"1970-01-01T00:00:00","savings_hbd_last_interest_payment":"1970-01-01T00:00:00","savings_withdraw_requests":0,"reward_hbd_balance":"0.000 TBD","reward_hive_balance":"0.000 TESTS","reward_vesting_balance":"0.000000 VESTS","reward_vesting_hive":"0.000 TESTS","vesting_shares":"36777.813585 VESTS","delegated_vesting_shares":"0.000000 VESTS","received_vesting_shares":"0.000000 VESTS","vesting_withdraw_rate":"0.000000 VESTS","post_voting_power":"36777.813585 VESTS","next_vesting_withdrawal":"1969-12-31T23:59:59","withdrawn":0,"to_withdraw":0,"withdraw_routes":0,"pending_transfers":0,"curation_rewards":0,"posting_rewards":0,"proxied_vsf_votes":[0,0,0,0],"witnesses_voted_for":0,"last_post":"1970-01-01T00:00:00","last_root_post":"1970-01-01T00:00:00","last_vote_time":"1970-01-01T00:00:00","post_bandwidth":0,"pending_claimed_accounts":0,"governance_vote_expiration_ts":"1969-12-31T23:59:59","delayed_votes":[{"time":"2022-01-30T23:43:03","val":"36777813585"}],"open_recurrent_transfers":0,"vesting_balance":"0.000 TESTS","reputation":0,"transfer_history":[],"market_history":[],"post_history":[],"vote_history":[],"other_history":[],"witness_votes":[],"tags_usage":[],"guest_bloggers":[]}],"id":3} 
{
  "id": 7,
  "name": "sonaccount01",
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [[
        "TST6WnsoE2Qrf4W6GEwUHjgt8yjFPVBtU41AZNEPqzQHXhUY31hBm",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [[
        "TST7uyCVRCLgqEpVkGRn1MsZhYDyYprAbrDXWsMYTWfbVqpJrdpJi",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [[
        "TST5YaJZkXYQMjFQ2WhrVrkErjJvcRX2BiWQkSsKgfam9AtyWq9oA",
        1
      ]
    ]
  },
  "memo_key": "TST5pYaJTJJAdDHG3UGTsqZ8EWTqku1ouVd2tirmAsiQ7t5Uf1aP6",
  "json_metadata": "",
  "posting_json_metadata": "",
  "proxy": "",
  "last_owner_update": "1970-01-01T00:00:00",
  "last_account_update": "1970-01-01T00:00:00",
  "created": "2022-01-30T23:38:03",
  "mined": false,
  "recovery_account": "initminer",
  "last_account_recovery": "1970-01-01T00:00:00",
  "reset_account": "null",
  "comment_count": 0,
  "lifetime_vote_count": 0,
  "post_count": 0,
  "can_vote": true,
  "voting_manabar": {
    "current_mana": "36777813585",
    "last_update_time": 1643586183
  },
  "downvote_manabar": {
    "current_mana": "9194453396",
    "last_update_time": 1643586183
  },
  "voting_power": 0,
  "balance": "4000000.000 TESTS",
  "savings_balance": "0.000 TESTS",
  "hbd_balance": "200000.000 TBD",
  "hbd_seconds": "0",
  "hbd_seconds_last_update": "1970-01-01T00:00:00",
  "hbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_hbd_balance": "0.000 TBD",
  "savings_hbd_seconds": "0",
  "savings_hbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_hbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "reward_hbd_balance": "0.000 TBD",
  "reward_hive_balance": "0.000 TESTS",
  "reward_vesting_balance": "0.000000 VESTS",
  "reward_vesting_hive": "0.000 TESTS",
  "vesting_shares": "36777.813585 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "0.000000 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "post_voting_power": "36777.813585 VESTS",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "withdrawn": 0,
  "to_withdraw": 0,
  "withdraw_routes": 0,
  "pending_transfers": 0,
  "curation_rewards": 0,
  "posting_rewards": 0,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "witnesses_voted_for": 0,
  "last_post": "1970-01-01T00:00:00",
  "last_root_post": "1970-01-01T00:00:00",
  "last_vote_time": "1970-01-01T00:00:00",
  "post_bandwidth": 0,
  "pending_claimed_accounts": 0,
  "governance_vote_expiration_ts": "1969-12-31T23:59:59",
  "delayed_votes": [{
      "time": "2022-01-30T23:43:03",
      "val": "36777813585"
    }
  ],
  "open_recurrent_transfers": 0
}

transfer peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd sonaccount01 50 TEST "Wellcome payment" true
transfer peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd sonaccount01 100 TBD "Wellcome payment" true
Assert during HBD transfer: 10 assert_exception: Assert Exception
opt: 
    {}
    th_a  wallet.cpp:817 get_asset

    {"from":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","to":"sonaccount01","amount":"100","asset_symbol":"TBD","memo":"Wellcome payment","broadcast":true}
    th_a  wallet.cpp:3189 transfer

FAILED
``` test.py::test_Verify_Hive_Withdrawal Verify Hive Withdrawal 19858.89063 TEST 1157284ms websocket_api.cpp:102 on_message ] message: {"jsonrpc":"2.0","result":[],"id":2} 10 assert_exception: Assert Exception !accounts.empty(): Unknown account {} wallet.cpp:356 get_account 1157341ms websocket_api.cpp:102 on_message ] message: {"jsonrpc":"2.0","result":[{"id":7,"name":"sonaccount01","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST6WnsoE2Qrf4W6GEwUHjgt8yjFPVBtU41AZNEPqzQHXhUY31hBm",1]]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST7uyCVRCLgqEpVkGRn1MsZhYDyYprAbrDXWsMYTWfbVqpJrdpJi",1]]},"posting":{"weight_threshold":1,"account_auths":[],"key_auths":[["TST5YaJZkXYQMjFQ2WhrVrkErjJvcRX2BiWQkSsKgfam9AtyWq9oA",1]]},"memo_key":"TST5pYaJTJJAdDHG3UGTsqZ8EWTqku1ouVd2tirmAsiQ7t5Uf1aP6","json_metadata":"","posting_json_metadata":"","proxy":"","last_owner_update":"1970-01-01T00:00:00","last_account_update":"1970-01-01T00:00:00","created":"2022-01-30T23:38:03","mined":false,"recovery_account":"initminer","last_account_recovery":"1970-01-01T00:00:00","reset_account":"null","comment_count":0,"lifetime_vote_count":0,"post_count":0,"can_vote":true,"voting_manabar":{"current_mana":"36777813585","last_update_time":1643586183},"downvote_manabar":{"current_mana":"9194453396","last_update_time":1643586183},"voting_power":0,"balance":"4000000.000 TESTS","savings_balance":"0.000 TESTS","hbd_balance":"200000.000 TBD","hbd_seconds":"0","hbd_seconds_last_update":"1970-01-01T00:00:00","hbd_last_interest_payment":"1970-01-01T00:00:00","savings_hbd_balance":"0.000 TBD","savings_hbd_seconds":"0","savings_hbd_seconds_last_update":"1970-01-01T00:00:00","savings_hbd_last_interest_payment":"1970-01-01T00:00:00","savings_withdraw_requests":0,"reward_hbd_balance":"0.000 TBD","reward_hive_balance":"0.000 TESTS","reward_vesting_balance":"0.000000 VESTS","reward_vesting_hive":"0.000 TESTS","vesting_shares":"36777.813585 VESTS","delegated_vesting_shares":"0.000000 VESTS","received_vesting_shares":"0.000000 VESTS","vesting_withdraw_rate":"0.000000 VESTS","post_voting_power":"36777.813585 VESTS","next_vesting_withdrawal":"1969-12-31T23:59:59","withdrawn":0,"to_withdraw":0,"withdraw_routes":0,"pending_transfers":0,"curation_rewards":0,"posting_rewards":0,"proxied_vsf_votes":[0,0,0,0],"witnesses_voted_for":0,"last_post":"1970-01-01T00:00:00","last_root_post":"1970-01-01T00:00:00","last_vote_time":"1970-01-01T00:00:00","post_bandwidth":0,"pending_claimed_accounts":0,"governance_vote_expiration_ts":"1969-12-31T23:59:59","delayed_votes":[{"time":"2022-01-30T23:43:03","val":"36777813585"}],"open_recurrent_transfers":0,"vesting_balance":"0.000 TESTS","reputation":0,"transfer_history":[],"market_history":[],"post_history":[],"vote_history":[],"other_history":[],"witness_votes":[],"tags_usage":[],"guest_bloggers":[]}],"id":3} { "id": 7, "name": "sonaccount01", "owner": { "weight_threshold": 1, "account_auths": [], "key_auths": [[ "TST6WnsoE2Qrf4W6GEwUHjgt8yjFPVBtU41AZNEPqzQHXhUY31hBm", 1 ] ] }, "active": { "weight_threshold": 1, "account_auths": [], "key_auths": [[ "TST7uyCVRCLgqEpVkGRn1MsZhYDyYprAbrDXWsMYTWfbVqpJrdpJi", 1 ] ] }, "posting": { "weight_threshold": 1, "account_auths": [], "key_auths": [[ "TST5YaJZkXYQMjFQ2WhrVrkErjJvcRX2BiWQkSsKgfam9AtyWq9oA", 1 ] ] }, "memo_key": "TST5pYaJTJJAdDHG3UGTsqZ8EWTqku1ouVd2tirmAsiQ7t5Uf1aP6", "json_metadata": "", "posting_json_metadata": "", "proxy": "", "last_owner_update": "1970-01-01T00:00:00", "last_account_update": "1970-01-01T00:00:00", "created": "2022-01-30T23:38:03", "mined": false, "recovery_account": "initminer", "last_account_recovery": "1970-01-01T00:00:00", "reset_account": "null", "comment_count": 0, "lifetime_vote_count": 0, "post_count": 0, "can_vote": true, "voting_manabar": { "current_mana": "36777813585", "last_update_time": 1643586183 }, "downvote_manabar": { "current_mana": "9194453396", "last_update_time": 1643586183 }, "voting_power": 0, "balance": "4000000.000 TESTS", "savings_balance": "0.000 TESTS", "hbd_balance": "200000.000 TBD", "hbd_seconds": "0", "hbd_seconds_last_update": "1970-01-01T00:00:00", "hbd_last_interest_payment": "1970-01-01T00:00:00", "savings_hbd_balance": "0.000 TBD", "savings_hbd_seconds": "0", "savings_hbd_seconds_last_update": "1970-01-01T00:00:00", "savings_hbd_last_interest_payment": "1970-01-01T00:00:00", "savings_withdraw_requests": 0, "reward_hbd_balance": "0.000 TBD", "reward_hive_balance": "0.000 TESTS", "reward_vesting_balance": "0.000000 VESTS", "reward_vesting_hive": "0.000 TESTS", "vesting_shares": "36777.813585 VESTS", "delegated_vesting_shares": "0.000000 VESTS", "received_vesting_shares": "0.000000 VESTS", "vesting_withdraw_rate": "0.000000 VESTS", "post_voting_power": "36777.813585 VESTS", "next_vesting_withdrawal": "1969-12-31T23:59:59", "withdrawn": 0, "to_withdraw": 0, "withdraw_routes": 0, "pending_transfers": 0, "curation_rewards": 0, "posting_rewards": 0, "proxied_vsf_votes": [ 0, 0, 0, 0 ], "witnesses_voted_for": 0, "last_post": "1970-01-01T00:00:00", "last_root_post": "1970-01-01T00:00:00", "last_vote_time": "1970-01-01T00:00:00", "post_bandwidth": 0, "pending_claimed_accounts": 0, "governance_vote_expiration_ts": "1969-12-31T23:59:59", "delayed_votes": [{ "time": "2022-01-30T23:43:03", "val": "36777813585" } ], "open_recurrent_transfers": 0 } transfer peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd sonaccount01 50 TEST "Wellcome payment" true transfer peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd sonaccount01 100 TBD "Wellcome payment" true Assert during HBD transfer: 10 assert_exception: Assert Exception opt: {} th_a wallet.cpp:817 get_asset {"from":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","to":"sonaccount01","amount":"100","asset_symbol":"TBD","memo":"Wellcome payment","broadcast":true} th_a wallet.cpp:3189 transfer FAILED ```
pavel.baykov commented 2022-03-15 11:05:13 +00:00 (Migrated from gitlab.com)

with latest commit works fine with account01 from init-network.sh
however with mapping test together does not work

with latest commit works fine with account01 from init-network.sh however with mapping test together does not work
serkixenos (Migrated from gitlab.com) closed this issue 2022-03-21 16:22:37 +00:00
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#243
No description provided.