automation: Peerplays Account to Hive deposit address 1:1 Mapping - Add #254

Closed
opened 2022-01-17 11:36:17 +00:00 by pavel.baykov · 8 comments
pavel.baykov commented 2022-01-17 11:36:17 +00:00 (Migrated from gitlab.com)

Connect to CLI Wallet for Peerplays node and create new account <peerplays_account>

Connect to CLI Wallet for Hive node, and create new account <hive_account>

Add sidechain address. Note that Hive does not use key pairs for identifying account, but account name. We will use account name for all fields in add_sidechain_command

add_sidechain_address <peerplays_account> hive <hive_account> <hive_account> <hive_account> <hive_account> true

Connect to CLI Wallet for Peerplays node and create new account <peerplays_account_2>
Add same sidechain address for <peerplays_account_2>

add_sidechain_address <peerplays_account_2> hive <hive_account> <hive_account> <hive_account> <hive_account> true

To check the linked Hive account, run the below command.

get_sidechain_addresses_by_account <peerplays_account>

Connect to CLI Wallet for Peerplays node and create new account <peerplays_account> Connect to CLI Wallet for Hive node, and create new account <hive_account> Add sidechain address. Note that Hive does not use key pairs for identifying account, but account name. We will use account name for all fields in add_sidechain_command add_sidechain_address <peerplays_account> hive <hive_account> <hive_account> <hive_account> <hive_account> true Connect to CLI Wallet for Peerplays node and create new account <peerplays_account_2> Add same sidechain address for <peerplays_account_2> add_sidechain_address <peerplays_account_2> hive <hive_account> <hive_account> <hive_account> <hive_account> true To check the linked Hive account, run the below command. get_sidechain_addresses_by_account <peerplays_account>
pavel.baykov commented 2022-01-17 11:36:17 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
pavel.baykov commented 2022-01-21 09:08:48 +00:00 (Migrated from gitlab.com)

to test:
pytest -s -v test_Peerplays_Account_To_Hive_Deposit_Mapping

to test: pytest -s -v test_Peerplays_Account_To_Hive_Deposit_Mapping
serkixenos commented 2022-01-31 03:29:06 +00:00 (Migrated from gitlab.com)
test.py::test_Peerplays_Account_To_Hive_Deposit_Mapping 1. brain_key = OFFCOME BROCK NICK SERRY PYRITIC WAUL DEROUT BAILIE GUTTY WASEL SORAL TONE MISOBEY INWORK FURY POUCER
2. create_new_account with brain_key for account: peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd
create_account_with_brain_key "OFFCOME BROCK NICK SERRY PYRITIC WAUL DEROUT BAILIE GUTTY WASEL SORAL TONE MISOBEY INWORK FURY POUCER" peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd nathan nathan true
Assert during create_new_account: 0 exception: unspecified
Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): 
    {"error":"Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{"id":2449,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"account_evaluator.cpp","line":137,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{}},{"context":{"level":"warn","file":"account_evaluator.cpp","line":141,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"op":{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}}},{"context":{"level":"warn","file":"evaluator.cpp","line":51,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"op":[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"trx":{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"trx":{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}]]}}]}}}}
    th_a  state.cpp:38 handle_reply

    {"account_name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","registrar_account":"nathan","referrer_account":"nathan","broadcast":true}
    th_a  wallet.cpp:1565 create_account_with_private_key

    {"account_name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","registrar_account":"nathan","referrer_account":"nathan"}
    th_a  wallet.cpp:1579 create_account_with_brain_key

FAILED
``` test.py::test_Peerplays_Account_To_Hive_Deposit_Mapping 1. brain_key = OFFCOME BROCK NICK SERRY PYRITIC WAUL DEROUT BAILIE GUTTY WASEL SORAL TONE MISOBEY INWORK FURY POUCER 2. create_new_account with brain_key for account: peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd create_account_with_brain_key "OFFCOME BROCK NICK SERRY PYRITIC WAUL DEROUT BAILIE GUTTY WASEL SORAL TONE MISOBEY INWORK FURY POUCER" peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd nathan nathan true Assert during create_new_account: 0 exception: unspecified Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): {"error":"Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{"id":2449,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"account_evaluator.cpp","line":137,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"current_account_itr == acnt_indx.indices().get<by_name>().end(): ","data":{}},{"context":{"level":"warn","file":"account_evaluator.cpp","line":141,"method":"do_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"op":{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}}},{"context":{"level":"warn","file":"evaluator.cpp","line":51,"method":"start_evaluate","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":876,"method":"apply_operation","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"op":[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]}},{"context":{"level":"warn","file":"db_block.cpp","line":862,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"trx":{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":379,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"trx":{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}}},{"context":{"level":"warn","file":"websocket_api.cpp","line":128,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2022-01-31T03:19:17"},"format":"","data":{"call.method":"call","call.params":[4,"broadcast_transaction",[{"ref_block_num":4253,"ref_block_prefix":1761393828,"expiration":"2022-01-31T03:19:45","operations":[[5,{"fee":{"amount":517968,"asset_id":"1.3.0"},"registrar":"1.2.18","referrer":"1.2.18","referrer_percent":0,"name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST4uoVbuLjF4frguMhjVCqV71i6DiUBLXDpZmVg1uFw5nz5AVg6H",1]],"address_auths":[]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["TEST552GVBDxnEx7dQqTHu3X3R8EdVpiV2QrnfetAACAmXxpbkhMdC",1]],"address_auths":[]},"options":{"memo_key":"TEST6UUoX16zj8brfHioAFpohtDNU7gGP3Zgqh4ajcECz8EBwsgVab","voting_account":"1.2.5","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"extensions":{}}]],"extensions":[],"signatures":["20211e067f94b42a6366ce969a47b30e3fc66313ac76ee68983727d666f88823fa47a9a0bfc4b7c61d238a6aff8b8b9b43f9cc63a53d8598ba2f64504f5d1aea22"]}]]}}]}}}} th_a state.cpp:38 handle_reply {"account_name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","registrar_account":"nathan","referrer_account":"nathan","broadcast":true} th_a wallet.cpp:1565 create_account_with_private_key {"account_name":"peerplays607c996b-74ea-47ac-8a90-f9bd73a43fcd","registrar_account":"nathan","referrer_account":"nathan"} th_a wallet.cpp:1579 create_account_with_brain_key FAILED ```
pavel.baykov commented 2022-02-01 13:29:50 +00:00 (Migrated from gitlab.com)

this test need to be executed as a part of a test suite because according to test case it have pre-req

this test need to be executed as a part of a test suite because according to test case it have pre-req
pavel.baykov commented 2022-02-21 13:24:17 +00:00 (Migrated from gitlab.com)

this test have depends, correct execution
pytest -s -v test.py::test_Create_Son_With_Btc_Address test.py::test_Peerplays_Account_To_Hive_Deposit_Mapping

this test have depends, correct execution pytest -s -v test.py::test_Create_Son_With_Btc_Address test.py::test_Peerplays_Account_To_Hive_Deposit_Mapping
serkixenos commented 2022-03-10 22:53:18 +00:00 (Migrated from gitlab.com)

===================================================================================== 2 passed in 1367.05s (0:22:47) ======================================================================================

===================================================================================== 2 passed in 1367.05s (0:22:47) ======================================================================================
serkixenos (Migrated from gitlab.com) closed this issue 2022-03-10 22:53:30 +00:00
pavel.baykov commented 2022-03-16 12:05:41 +00:00 (Migrated from gitlab.com)

added:

initialization from init-network.sh

flush hive_cli_wallet buffers at the end of the test

added: initialization from init-network.sh flush hive_cli_wallet buffers at the end of the test
pavel.baykov commented 2022-03-16 12:06:08 +00:00 (Migrated from gitlab.com)

added 6h of time spent

added 6h of time spent
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#254
No description provided.