automation for: Create Son with btc address #244

Closed
opened 2022-01-13 13:02:37 +00:00 by pavel.baykov · 5 comments
pavel.baykov commented 2022-01-13 13:02:37 +00:00 (Migrated from gitlab.com)

create_son is the command required and used for creating sidechain operating node (SON)

test procedure from:
https://peerplays.atlassian.net/browse/SON-294

create_son is the command required and used for creating sidechain operating node (SON) test procedure from: https://peerplays.atlassian.net/browse/SON-294
pavel.baykov commented 2022-01-13 13:02:37 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
pavel.baykov commented 2022-01-14 12:55:15 +00:00 (Migrated from gitlab.com)
  1. Create a peerplays account using below command:
    create_account_with_brain_key <<brain_priv_key>> <<account_name>> nathan nathan true
    Ex:
    create_account_with_brain_key "CHOROGI EERIE RETUCK PRAECOX MUDDLER LITERAL ACRON CARBRO BABBY AGAZED UNBOLT ABASED HALA TEMBLOR EMANATE HEMIPIC" test1 nathan nathan true

note:
brain key can be generated using suggest_brain_key command

  1. transfer 20000 TEST to the new account created
    command:
    transfer nathan <<account_name>> 20000 TEST "" true

  2. Upgrade the account using below command

upgrade_account <<account_name>> true

  1. Create SON vesting balance
    using below command

create_vesting_balance <<account_name>> 50 TEST son true
Example:
create_vesting_balance test1 50 TEST son true

  1. Create Normal vesting balance
    using below command

create_vesting_balance <<account_name>> 50 TEST normal true
Example:
create_vesting_balance test1 50 TEST normal true

  1. create_son <<account_name>> <> <<son_vb_id>> <> bitcoin, <<Public_Key>> true

E.g:

create_son test1 "http://test1.com" 1.13.78 1.13.79 bitcoin, 02dc48559898ff3d0f3900a1c947736b4183ea4e60b3cd1594733c7719323b9300 true

  1. Verify the status of newly created account is Inactive

get_son <<account_name>>

1. Create a peerplays account using below command: create_account_with_brain_key <<brain_priv_key>> <<account_name>> nathan nathan true Ex: create_account_with_brain_key "CHOROGI EERIE RETUCK PRAECOX MUDDLER LITERAL ACRON CARBRO BABBY AGAZED UNBOLT ABASED HALA TEMBLOR EMANATE HEMIPIC" test1 nathan nathan true note: brain key can be generated using suggest_brain_key command 2. transfer 20000 TEST to the new account created command: transfer nathan <<account_name>> 20000 TEST "" true 3. Upgrade the account using below command upgrade_account <<account_name>> true 4. Create SON vesting balance using below command create_vesting_balance <<account_name>> 50 TEST son true Example: create_vesting_balance test1 50 TEST son true 5. Create Normal vesting balance using below command create_vesting_balance <<account_name>> 50 TEST normal true Example: create_vesting_balance test1 50 TEST normal true 6. create_son <<account_name>> <<url>> <<son_vb_id>> <<normal vb id>> [[bitcoin, <<Public_Key>>]] true E.g: create_son test1 "http://test1.com" 1.13.78 1.13.79 [[bitcoin, 02dc48559898ff3d0f3900a1c947736b4183ea4e60b3cd1594733c7719323b9300]] true 7. Verify the status of newly created account is Inactive get_son <<account_name>>
pavel.baykov commented 2022-01-14 12:55:42 +00:00 (Migrated from gitlab.com)

changed health status to on track

changed health status to **on track**
pavel.baykov commented 2022-01-21 09:22:15 +00:00 (Migrated from gitlab.com)

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

to test: pytest -s -v test.py::test_Create_Son_With_Btc_Address
serkixenos commented 2022-01-31 03:26:10 +00:00 (Migrated from gitlab.com)
test.py::test_Create_Son_With_Btc_Address 1. Create a peerplays account
create_account_with_brain_key "STACK MERIAH BRABANT FLUKING DEMIDOG SHOOK SAWMONT COCKADE TOPROPE LAKELET SAVABLE REOPEN WUSSER GUAPENA WIELD UNEATEN" sonaccount8caa420d-e4fc-4961-adc8-a093f574224a nathan nathan true
{
  "ref_block_num": 4249,
  "ref_block_prefix": 31536823,
  "expiration": "2022-01-31T03:19:33",
  "operations": [[
      5,{
        "fee": {
          "amount": 518066,
          "asset_id": "1.3.0"
        },
        "registrar": "1.2.18",
        "referrer": "1.2.18",
        "referrer_percent": 0,
        "name": "sonaccount8caa420d-e4fc-4961-adc8-a093f574224a",
        "owner": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "TEST7NGs1F5LVbrrc4qzL4AXHNiyTmrLRmB8AAfLC8LB6XLua4QYic",
              1
            ]
          ],
          "address_auths": []
        },
        "active": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "TEST8BskfPdJ9VTdzhhn18tUwe4sSBMp3xzuSCwxbS7597RAjvd5kH",
              1
            ]
          ],
          "address_auths": []
        },
        "options": {
          "memo_key": "TEST82sGhQRA8NuripL8q8FiW4CkSqvusXgD6dyVFx7NNN9Af5Kdq6",
          "voting_account": "1.2.5",
          "num_witness": 0,
          "num_committee": 0,
          "votes": [],
          "extensions": []
        },
        "extensions": {}
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f75145e4feabb89b4e944e7946894686b7808594ba2ac79426eac5a821674906c364d6b9ae1ff082c5c55c7806f68ecf4bc79bc4ce101357df0aefe1db4078bbc"
  ]
}

2. transfer 20000 TEST to the new account created
transfer nathan sonaccount8caa420d-e4fc-4961-adc8-a093f574224a 20000 TEST "Wellcome payment" true
3. Upgrade the account using below command upgrade_account sonaccount8caa420d-e4fc-4961-adc8-a093f574224a true
upgrade_account:  sonaccount8caa420d-e4fc-4961-adc8-a093f574224a
4. Create SON vesting balance using below command create_vesting_balance sonaccount8caa420d-e4fc-4961-adc8-a093f574224a 50 TEST son true
{
  "ref_block_num": 4251,
  "ref_block_prefix": 2199210564,
  "expiration": "2022-01-31T03:19:39",
  "operations": [[
      32,{
        "fee": {
          "amount": 100000,
          "asset_id": "1.3.0"
        },
        "creator": "1.2.70",
        "owner": "1.2.70",
        "amount": {
          "amount": 5000000,
          "asset_id": "1.3.0"
        },
        "policy": [
          2,{}
        ],
        "balance_type": "son"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "202ff2f90c90ed32e1b6065fad775cd7ab8b8940a18baafc96f625869ff16a3b3a03c5e0ab88b0ebedb1bedbe93f146b016bf4f5a82a3127e87a45c26499565fbf"
  ]
}

5. Create Normal vesting balance using below command
{
  "ref_block_num": 4252,
  "ref_block_prefix": 3430107779,
  "expiration": "2022-01-31T03:19:42",
  "operations": [[
      32,{
        "fee": {
          "amount": 100000,
          "asset_id": "1.3.0"
        },
        "creator": "1.2.70",
        "owner": "1.2.70",
        "amount": {
          "amount": 5000000,
          "asset_id": "1.3.0"
        },
        "policy": [
          0,{
            "begin_timestamp": "1970-01-01T00:00:00",
            "vesting_cliff_seconds": 0,
            "vesting_duration_seconds": 0
          }
        ],
        "balance_type": "normal"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "205310235c23e3541b7b177ca0e79087705877321266b50500d3eb6045320d48ba1607f47f496cd8e89572343f45a58b8ec8ab45bb06f40f2a28f6c839889560d4"
  ]
}

6. try_create_son...
try_create_son sonaccount8caa420d-e4fc-4961-adc8-a093f574224a http://sonaddreess8caa420d-e4fc-4961-adc8-a093f574224a.com [[bitcoin, 037500441cfb4484da377073459511823b344f1ef0d46bac1efd4c7c466746f666], [peerplays, TEST68bX5bB16GkEAig6w2WTh9NbM9nHa66CemnDRx2njRY9bbWXhU], [hive, sonaccount8caa420d-e4fc-4961-adc8-a093f574224a]] true
{
  "ref_block_num": 4252,
  "ref_block_prefix": 3430107779,
  "expiration": "2022-01-31T03:19:42",
  "operations": [[
      101,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "owner_account": "1.2.70",
        "url": "http://sonaddreess8caa420d-e4fc-4961-adc8-a093f574224a.com",
        "deposit": "1.13.79",
        "signing_key": "TEST8BskfPdJ9VTdzhhn18tUwe4sSBMp3xzuSCwxbS7597RAjvd5kH",
        "sidechain_public_keys": [[
            "bitcoin",
            "037500441cfb4484da377073459511823b344f1ef0d46bac1efd4c7c466746f666"
          ],[
            "peerplays",
            "TEST68bX5bB16GkEAig6w2WTh9NbM9nHa66CemnDRx2njRY9bbWXhU"
          ],[
            "hive",
            "sonaccount8caa420d-e4fc-4961-adc8-a093f574224a"
          ]
        ],
        "pay_vb": "1.13.80"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f0956e33e474adcff5095846e238d0b5971bce7c0b0d834a4ab1ad64c6e58e30b79ac3d0adae8823a7b0ee1cf5c2660e6002bf4afc2e7910cd19cca368db785ec"
  ]
}

7. Verify the status of newly created account is Inactive
Test_Create_Son_With_Btc_Address PASSED
PASSED
``` test.py::test_Create_Son_With_Btc_Address 1. Create a peerplays account create_account_with_brain_key "STACK MERIAH BRABANT FLUKING DEMIDOG SHOOK SAWMONT COCKADE TOPROPE LAKELET SAVABLE REOPEN WUSSER GUAPENA WIELD UNEATEN" sonaccount8caa420d-e4fc-4961-adc8-a093f574224a nathan nathan true { "ref_block_num": 4249, "ref_block_prefix": 31536823, "expiration": "2022-01-31T03:19:33", "operations": [[ 5,{ "fee": { "amount": 518066, "asset_id": "1.3.0" }, "registrar": "1.2.18", "referrer": "1.2.18", "referrer_percent": 0, "name": "sonaccount8caa420d-e4fc-4961-adc8-a093f574224a", "owner": { "weight_threshold": 1, "account_auths": [], "key_auths": [[ "TEST7NGs1F5LVbrrc4qzL4AXHNiyTmrLRmB8AAfLC8LB6XLua4QYic", 1 ] ], "address_auths": [] }, "active": { "weight_threshold": 1, "account_auths": [], "key_auths": [[ "TEST8BskfPdJ9VTdzhhn18tUwe4sSBMp3xzuSCwxbS7597RAjvd5kH", 1 ] ], "address_auths": [] }, "options": { "memo_key": "TEST82sGhQRA8NuripL8q8FiW4CkSqvusXgD6dyVFx7NNN9Af5Kdq6", "voting_account": "1.2.5", "num_witness": 0, "num_committee": 0, "votes": [], "extensions": [] }, "extensions": {} } ] ], "extensions": [], "signatures": [ "1f75145e4feabb89b4e944e7946894686b7808594ba2ac79426eac5a821674906c364d6b9ae1ff082c5c55c7806f68ecf4bc79bc4ce101357df0aefe1db4078bbc" ] } 2. transfer 20000 TEST to the new account created transfer nathan sonaccount8caa420d-e4fc-4961-adc8-a093f574224a 20000 TEST "Wellcome payment" true 3. Upgrade the account using below command upgrade_account sonaccount8caa420d-e4fc-4961-adc8-a093f574224a true upgrade_account: sonaccount8caa420d-e4fc-4961-adc8-a093f574224a 4. Create SON vesting balance using below command create_vesting_balance sonaccount8caa420d-e4fc-4961-adc8-a093f574224a 50 TEST son true { "ref_block_num": 4251, "ref_block_prefix": 2199210564, "expiration": "2022-01-31T03:19:39", "operations": [[ 32,{ "fee": { "amount": 100000, "asset_id": "1.3.0" }, "creator": "1.2.70", "owner": "1.2.70", "amount": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 2,{} ], "balance_type": "son" } ] ], "extensions": [], "signatures": [ "202ff2f90c90ed32e1b6065fad775cd7ab8b8940a18baafc96f625869ff16a3b3a03c5e0ab88b0ebedb1bedbe93f146b016bf4f5a82a3127e87a45c26499565fbf" ] } 5. Create Normal vesting balance using below command { "ref_block_num": 4252, "ref_block_prefix": 3430107779, "expiration": "2022-01-31T03:19:42", "operations": [[ 32,{ "fee": { "amount": 100000, "asset_id": "1.3.0" }, "creator": "1.2.70", "owner": "1.2.70", "amount": { "amount": 5000000, "asset_id": "1.3.0" }, "policy": [ 0,{ "begin_timestamp": "1970-01-01T00:00:00", "vesting_cliff_seconds": 0, "vesting_duration_seconds": 0 } ], "balance_type": "normal" } ] ], "extensions": [], "signatures": [ "205310235c23e3541b7b177ca0e79087705877321266b50500d3eb6045320d48ba1607f47f496cd8e89572343f45a58b8ec8ab45bb06f40f2a28f6c839889560d4" ] } 6. try_create_son... try_create_son sonaccount8caa420d-e4fc-4961-adc8-a093f574224a http://sonaddreess8caa420d-e4fc-4961-adc8-a093f574224a.com [[bitcoin, 037500441cfb4484da377073459511823b344f1ef0d46bac1efd4c7c466746f666], [peerplays, TEST68bX5bB16GkEAig6w2WTh9NbM9nHa66CemnDRx2njRY9bbWXhU], [hive, sonaccount8caa420d-e4fc-4961-adc8-a093f574224a]] true { "ref_block_num": 4252, "ref_block_prefix": 3430107779, "expiration": "2022-01-31T03:19:42", "operations": [[ 101,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "owner_account": "1.2.70", "url": "http://sonaddreess8caa420d-e4fc-4961-adc8-a093f574224a.com", "deposit": "1.13.79", "signing_key": "TEST8BskfPdJ9VTdzhhn18tUwe4sSBMp3xzuSCwxbS7597RAjvd5kH", "sidechain_public_keys": [[ "bitcoin", "037500441cfb4484da377073459511823b344f1ef0d46bac1efd4c7c466746f666" ],[ "peerplays", "TEST68bX5bB16GkEAig6w2WTh9NbM9nHa66CemnDRx2njRY9bbWXhU" ],[ "hive", "sonaccount8caa420d-e4fc-4961-adc8-a093f574224a" ] ], "pay_vb": "1.13.80" } ] ], "extensions": [], "signatures": [ "1f0956e33e474adcff5095846e238d0b5971bce7c0b0d834a4ab1ad64c6e58e30b79ac3d0adae8823a7b0ee1cf5c2660e6002bf4afc2e7910cd19cca368db785ec" ] } 7. Verify the status of newly created account is Inactive Test_Create_Son_With_Btc_Address PASSED PASSED ```
serkixenos (Migrated from gitlab.com) closed this issue 2022-01-31 03:26:11 +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#244
No description provided.