Try โ€‚โ€‰HackMD

Demo of Cross chain transfer [Peerplays TESTNET โ€“ Hive MAINNET]

Objective

Demonstrate Peerplays's SONs technology integrated to work with Hive Blockchain. The Sidechain Operator Nodes (SON) is a decentralized, oracle system operated by elected nodes on the Peerplays blockchain. In this scenario, we are demonstrating Hive-SONs the implementation specific for the Hive blockchain. This is the first of multiple features for Hive blockchain integrations that we are working on along with SPK Network.

Overview

A TESTNET of Peerplays comprising of witness nodes and SONs will be created. This network will be called as #YMIR and will comprise of Peerplays's current son-for-hive branch running in a single server using dockers.

Procedure :

  • #YMIR will be configured and brought up by Peerplays developers
  • Few test transactions will be performed using HIVE and HBD to ensure the performance of the integration
  • If the first few tests works fine, the network will be left alone for 3 days
  • Upon completion of the 3 days, the connection details for others to join the network will be shared
  • The network will be made available and open for 15 days for others to join and test
  • We welcome feedback and also poke at the multi-signature wallet created on the Hive blockchain

Detailed Procedure

  • Setup a Peerplays testnet (using docker) with Hive SONs & Bitcoin SONs
  • We should be using 7 Sidechain Operator Nodes for simplicity
  • Create SON multi-signature wallet account, say: son\_account on the Hive blockchain's MAINNET (note, mainnet and not the testnet.)
  • On the Peerplays TESTNET the SON accounts should be: son1-ppy, son2-ppy, son3-ppy, son4-ppy, son5-ppy,son6-ppy,son7-ppy
  • On the Hive MAINNET the SON accounts should be: son1-hive,son2-hive, son3-hive, son4-hive,son5-hive, son6-hive, son7-hive`
  • Make sure that son\_account account has enough funds and Resource Credits to perform transaction
  • Send HIVE from account bobinson on Hive blockchain to spk-ppy on the testnet created earlier (deposit)
  • Withdraw pHIVE from spk\_ppy to bobinson

Needs help with the following

  • Inspect the settings of the SON accounts on the Hive blockchain (son1-hive to son7-hive)
  • Review the multisignature wallet creation ([son-account](https://hiveblocks.com/@son-account))

SON accounts

There are 7 accounts as of now and they are son1-hive .. son7-hive. For now they are created and no changes are made to Recovery accounts, withdraw routes or keys are default.

Multi-signature Wallet

Hive blockchian supports creation of multisignature wallets. Due to the fact that Hive has unique human readable addresses, they are always mapped with an address.

A multi signature wallet is created during the initialization of the sidechain network. In simple terms, there are 7 Hive Blockchain accounts who collectively create a wallet where the funds are locked during the cross chain transfer.

All 7 accounts needs to authorize the movements on funds and this is handled programmatically.

Behind the screens an equivalent of the following set of commands is used to create the weighted multi-signature wallet.

Connecting to YMIR via cli_wallet

At this stage, only connecting and checking stats is provided on purpose. A UI to create to accounts will be provided in the coming days so that anyone can test the transactions.

**Getting the prebuild ****cli\_wallet**:

On a Ubuntu GNU/Linux box:

In general, get the latest from https://gitlab.com/PBSA/peerplays/-/pipelines

Connecting to YMIR

sample cli_wallet commands:

set\_password a-super-secret-password unlock a-super-secret-password list\_account\_balances spk-ppy list\_active\_sons list\_accounts s 10 #lists 10 accounts with letter s in the account name

Example transfers

DEPOSIT: sending funds to Peerplays TESTNET (YMIR) from Hive MAINET

Account on Peerplays (TESTNET), spk-ppy has the following balance at first:

The cross chain withdrawal, aka sending of HIVE/HBD to a Peerplays account can be done as follows

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

In the above

  • A Hive account bobinson is sending 0.001 HIVE to a Peerplays TESTNET account called spk-ppy
  • To achieve the same, simply send funds to son-account on Hive with the receipient account name as memo

Once the above transaction is done, the account balance of spk-account can be checked again

HBD transfer to Peerplays

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

WITHDRAW: sending funds to Hive MAINET from PEERPLAYS TESTNET (YMIR)

Thats it !

If anyone is interested in testing, please message me on discord and I can provide with sample accounts.