Verify SON reported transactions metrics #240

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

automation for Verify SON reported transactions metrics:

Active sons reports deposit and withdraw transactions occurred on the network. It is tracked on son statistics object. For example:

unlocked >>> get_object 2.24.0
get_object 2.24.0
[{
"id": "2.24.0",
"owner": "1.27.0",
"total_txs_signed": 0,
"txs_signed": 219,
"total_downtime": 0,
"current_interval_downtime": 0,
"last_down_timestamp": "1970-01-01T00:00:00",
"last_active_timestamp": "2020-03-24T19:17:43",
"total_sidechain_txs_reported": 3,
"sidechain_txs_reported": 3
}
]

Ideally, both sidechain_txs_reported and total_sidechain_txs_reported should be same. If son, for some reason, does not report transaction (eg, his bitcoin node is down), only total_sidechain_txs_reported will be updated by other sons. so at any time point of time, son’s sidechain_txs_reported is less than or equal to total_sidechain_txs_reported .

Pre-requisite:

list of active sons

an inactive son

automation for Verify SON reported transactions metrics: Active sons reports deposit and withdraw transactions occurred on the network. It is tracked on son statistics object. For example: unlocked >>> get_object 2.24.0 get_object 2.24.0 [{ "id": "2.24.0", "owner": "1.27.0", "total_txs_signed": 0, "txs_signed": 219, "total_downtime": 0, "current_interval_downtime": 0, "last_down_timestamp": "1970-01-01T00:00:00", "last_active_timestamp": "2020-03-24T19:17:43", "total_sidechain_txs_reported": 3, "sidechain_txs_reported": 3 } ] Ideally, both sidechain_txs_reported and total_sidechain_txs_reported should be same. If son, for some reason, does not report transaction (eg, his bitcoin node is down), only total_sidechain_txs_reported will be updated by other sons. so at any time point of time, son’s sidechain_txs_reported is less than or equal to total_sidechain_txs_reported . Pre-requisite: list of active sons an inactive son
pavel.baykov commented 2022-01-12 11:01:55 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
pavel.baykov commented 2022-01-12 11:06:59 +00:00 (Migrated from gitlab.com)

test procedure available at:
https://peerplays.atlassian.net/browse/SON-303

test procedure available at: https://peerplays.atlassian.net/browse/SON-303
pavel.baykov commented 2022-01-14 13:09:22 +00:00 (Migrated from gitlab.com)
  1. Get all the active sons list using list_active_sons command and get the statistics object data of all the active sons using command get_object <<statistic_object_id>>

Ex:unlocked >>> get_son sonaccount01
get_son sonaccount01
{
"id": "1.27.0",
"son_account": "1.2.36",
"vote_id": "3:38",
"total_votes": "4999156923430",
"url": "http://sonaddreess01.com",
"deposit": "1.13.1",
"signing_key": "TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL",
"pay_vb": "1.13.2",
"statistics": "2.24.0",
"status": "active",
"sidechain_public_keys": [[
"bitcoin",
"03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275"
]
]
}
unlocked >>> get_object 2.24.0
get_object 2.24.0
[{
"id": "2.24.0",
"owner": "1.27.0",
"total_txs_signed": 0,
"txs_signed": 219,
"total_downtime": 0,
"current_interval_downtime": 0,
"last_down_timestamp": "1970-01-01T00:00:00",
"last_active_timestamp": "2020-03-24T19:17:43",
"total_sidechain_txs_reported": 3,
"sidechain_txs_reported": 3
}
]

  1. Get statistics object data of any inactive son and deleted/deregistered son

  2. Consider an account say account01 which has btc deposit and withdraw address mapped.

deposit BTC to btc deposit address of account01.
Ex:
bitcoin-core.cli -rpcuser=1 -rpcpassword=1 -rpcwallet="" sendtoaddress 2N5aFW5WFaYZLuJWx9RGziHBdEMj9Zf8s3J 5 "" "" false

  1. Wait for 10 minutes/bitcoin node to generate next block

  2. Get statistics object data of all the active sons

  3. Get statistics object data of the inactive son

  4. Withdraw bitcoin for the user account01 and wait for 10 mins

command: transfer account01 son-account 5 pBTC "" true

  1. Get statistics object data of all the active sons

  2. Get statistics object data of the inactive son

  3. stop one of the son say sonaccount10 and make a deposit transaction

  4. Wait for 10 minutes/bitcoin node to generate next block

  5. Get statistics object data of all the active sons

1. Get all the active sons list using list_active_sons command and get the statistics object data of all the active sons using command get_object <<statistic_object_id>> Ex:unlocked >>> get_son sonaccount01 get_son sonaccount01 { "id": "1.27.0", "son_account": "1.2.36", "vote_id": "3:38", "total_votes": "4999156923430", "url": "http://sonaddreess01.com", "deposit": "1.13.1", "signing_key": "TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL", "pay_vb": "1.13.2", "statistics": "2.24.0", "status": "active", "sidechain_public_keys": [[ "bitcoin", "03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275" ] ] } unlocked >>> get_object 2.24.0 get_object 2.24.0 [{ "id": "2.24.0", "owner": "1.27.0", "total_txs_signed": 0, "txs_signed": 219, "total_downtime": 0, "current_interval_downtime": 0, "last_down_timestamp": "1970-01-01T00:00:00", "last_active_timestamp": "2020-03-24T19:17:43", "total_sidechain_txs_reported": 3, "sidechain_txs_reported": 3 } ] 2. Get statistics object data of any inactive son and deleted/deregistered son 3. Consider an account say account01 which has btc deposit and withdraw address mapped. deposit BTC to btc deposit address of account01. Ex: bitcoin-core.cli -rpcuser=1 -rpcpassword=1 -rpcwallet="" sendtoaddress 2N5aFW5WFaYZLuJWx9RGziHBdEMj9Zf8s3J 5 "" "" false 4. Wait for 10 minutes/bitcoin node to generate next block 5. Get statistics object data of all the active sons 6. Get statistics object data of the inactive son 7. Withdraw bitcoin for the user account01 and wait for 10 mins command: transfer account01 son-account 5 pBTC "" true 8. Get statistics object data of all the active sons 9. Get statistics object data of the inactive son 10. stop one of the son say sonaccount10 and make a deposit transaction 11. Wait for 10 minutes/bitcoin node to generate next block 12. Get statistics object data of all the active sons
pavel.baykov commented 2022-01-17 17:46:39 +00:00 (Migrated from gitlab.com)

"total_sidechain_txs_reported": [],
"sidechain_txs_reported": []

it's empty on all steps

"total_sidechain_txs_reported": [], "sidechain_txs_reported": [] it's empty on all steps
pavel.baykov commented 2022-01-17 17:47:43 +00:00 (Migrated from gitlab.com)

step 7 should be changed to:
command: transfer account01 son-account 5 PBTC "" true
case-sensitive

step 7 should be changed to: command: transfer account01 son-account 5 PBTC "" true case-sensitive
pavel.baykov commented 2022-01-21 09:21:41 +00:00 (Migrated from gitlab.com)

to test:
pytest -s -v test.py::test_Verify_SON_reported_transactions_metrics

to test: pytest -s -v test.py::test_Verify_SON_reported_transactions_metrics
serkixenos (Migrated from gitlab.com) closed this issue 2022-01-29 04:57:12 +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#240
No description provided.