Implement HTTPS client for HIVE #405

Closed
opened 2022-07-22 12:06:04 +00:00 by hirunda · 4 comments
hirunda commented 2022-07-22 12:06:04 +00:00 (Migrated from gitlab.com)

Implement HTTPS for HIVE based on boost beast library

Implement HTTP**S** for HIVE based on boost beast library
hirunda commented 2022-07-22 12:06:05 +00:00 (Migrated from gitlab.com)

assigned to @hirunda

assigned to @hirunda
hirunda commented 2022-07-26 17:55:21 +00:00 (Migrated from gitlab.com)

Please run the witness node with the following command:

./witness_node --hive-node-rpc-url=https://51.79.10.214:443 --debug-rpc-calls=true

IP is one of the HIVE public nodes that uses HTTPS. The full list could be found here: https://developers.hive.io/quickstart/

Watch in the log for successful established RPC communication with external HIVE node (There will be a lot of rpc messages such as):

3239774ms th_a rpc_client.cpp:221 send_post_request ] ### Request URL: https://51.79.10.214:443 3239775ms th_a rpc_client.cpp:222 send_post_request ] ### Request: { "jsonrpc": "2.0", "id": 3, "method": "database_api.get_dynamic_global_properties" } 3239775ms th_a rpc_client.cpp:223 send_post_request ] ### Response: {"id":3,"jsonrpc":"2.0","result":{"id":0,"head_block_number":66471253,"head_block_id":"03f645552221d81a9012889ee680fc573b433410","time":"2022-07-26T17:53:57","current_witness":"therealwolf","total_pow":514415,"num_pow_witnesses":172,"virtual_supply":{"amount":"444096578327","precision":3,"nai":"@@000000021"},"current_supply":{"amount":"386571528334","precision":3,"nai":"@@000000021"},"init_hbd_supply":{"amount":"0","precision":3,"nai":"@@000000013"},"current_hbd_supply":{"amount":"26691623197","precision":3,"nai":"@@000000013"},"total_vesting_fund_hive":{"amount":"161233187966","precision":3,"nai":"@@000000021"},"total_vesting_shares":{"amount":"293389195931760626","precision":6,"nai":"@@000000037"},"total_reward_fund_hive":{"amount":"0","precision":3,"nai":"@@000000021"},"total_reward_shares2":"0","pending_rewarded_vesting_shares":{"amount":"772541954205053","precision":6,"nai":"@@000000037"},"pending_rewarded_vesting_hive":{"amount":"399348830","precision":3,"nai":"@@000000021"},"hbd_interest_rate":2000,"hbd_print_rate":10000,"maximum_block_size":65536,"required_actions_partition_percent":0,"current_aslot":66674279,"recent_slots_filled":"340282366920938463463374607431768211455","participation_count":128,"last_irreversible_block_num":66471238,"vote_power_reserve_rate":10,"delegation_return_period":432000,"reverse_auction_seconds":0,"available_account_subsidies":11578804,"hbd_stop_percent":1000,"hbd_start_percent":900,"next_maintenance_time":"2022-07-26T18:34:48","last_budget_time":"2022-07-26T17:34:48","next_daily_maintenance_time":"2022-07-26T19:31:30","content_reward_percent":6500,"vesting_reward_percent":1500,"sps_fund_percent":1000,"sps_interval_ledger":{"amount":"53237","precision":3,"nai":"@@000000013"},"downvote_pool_percent":2500,"current_remove_threshold":200,"early_voting_seconds":86400,"mid_voting_seconds":172800,"max_consecutive_recurrent_transfer_failures":10,"max_recurrent_transfer_end_date":730,"min_recurrent_transfers_recurrence":24,"max_open_recurrent_transfers":255}}

Observe that communication is still active after 10~20 minutes.

Please run the witness node with the following command: ./witness_node --hive-node-rpc-url=https://51.79.10.214:443 --debug-rpc-calls=true IP is one of the HIVE public nodes that uses HTTPS. The full list could be found here: https://developers.hive.io/quickstart/ Watch in the log for successful established RPC communication with external HIVE node (There will be a lot of rpc messages such as): `3239774ms th_a rpc_client.cpp:221 send_post_request ] ### Request URL: https://51.79.10.214:443 3239775ms th_a rpc_client.cpp:222 send_post_request ] ### Request: { "jsonrpc": "2.0", "id": 3, "method": "database_api.get_dynamic_global_properties" } 3239775ms th_a rpc_client.cpp:223 send_post_request ] ### Response: {"id":3,"jsonrpc":"2.0","result":{"id":0,"head_block_number":66471253,"head_block_id":"03f645552221d81a9012889ee680fc573b433410","time":"2022-07-26T17:53:57","current_witness":"therealwolf","total_pow":514415,"num_pow_witnesses":172,"virtual_supply":{"amount":"444096578327","precision":3,"nai":"@@000000021"},"current_supply":{"amount":"386571528334","precision":3,"nai":"@@000000021"},"init_hbd_supply":{"amount":"0","precision":3,"nai":"@@000000013"},"current_hbd_supply":{"amount":"26691623197","precision":3,"nai":"@@000000013"},"total_vesting_fund_hive":{"amount":"161233187966","precision":3,"nai":"@@000000021"},"total_vesting_shares":{"amount":"293389195931760626","precision":6,"nai":"@@000000037"},"total_reward_fund_hive":{"amount":"0","precision":3,"nai":"@@000000021"},"total_reward_shares2":"0","pending_rewarded_vesting_shares":{"amount":"772541954205053","precision":6,"nai":"@@000000037"},"pending_rewarded_vesting_hive":{"amount":"399348830","precision":3,"nai":"@@000000021"},"hbd_interest_rate":2000,"hbd_print_rate":10000,"maximum_block_size":65536,"required_actions_partition_percent":0,"current_aslot":66674279,"recent_slots_filled":"340282366920938463463374607431768211455","participation_count":128,"last_irreversible_block_num":66471238,"vote_power_reserve_rate":10,"delegation_return_period":432000,"reverse_auction_seconds":0,"available_account_subsidies":11578804,"hbd_stop_percent":1000,"hbd_start_percent":900,"next_maintenance_time":"2022-07-26T18:34:48","last_budget_time":"2022-07-26T17:34:48","next_daily_maintenance_time":"2022-07-26T19:31:30","content_reward_percent":6500,"vesting_reward_percent":1500,"sps_fund_percent":1000,"sps_interval_ledger":{"amount":"53237","precision":3,"nai":"@@000000013"},"downvote_pool_percent":2500,"current_remove_threshold":200,"early_voting_seconds":86400,"mid_voting_seconds":172800,"max_consecutive_recurrent_transfer_failures":10,"max_recurrent_transfer_end_date":730,"min_recurrent_transfers_recurrence":24,"max_open_recurrent_transfers":255}} ` Observe that communication is still active after 10~20 minutes.
prandnum commented 2022-08-01 16:30:50 +00:00 (Migrated from gitlab.com)

mentioned in issue #409

mentioned in issue #409
prandnum commented 2022-08-03 15:12:01 +00:00 (Migrated from gitlab.com)

attaching logs. closing the ticket.
405-docker.log

attaching logs. closing the ticket. [405-docker.log](/uploads/179716f8ee2916f673844a5dd048b2f5/405-docker.log)
prandnum (Migrated from gitlab.com) closed this issue 2022-08-03 15:12:02 +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#405
No description provided.