Poly Network
Published in

Poly Network

Poly Enterprise × BSN:How the Poly Enterprise-based Interchain Services Run on the BSN

On 28 January 2021, Mr. Zou Xueyan, one of the developers of Poly Network project, sat down with Bill Shi, a technical support staff of the Blockchain-based Service Network (hereinafter “BSN”) International, for an in-depth discussion and a demonstration of BSN interchain services supported by Poly Enterprise.

On 31 October 2020, Poly Enterprise- an enterprise-oriented version of the Poly Network, reached a strategic cooperation agreement with the BSN”. Currently, the Poly Enterprise-based interchain services are running on the BSN Testnet, supporting cross-chain calls between multiple permissioned and public blockchains, including Hyperledger Fabric and FISCO BCOS. The commercialization of the interchain services will start at the end of January 2021.

The following is the full transcript:

Bill: Hello everyone, welcome to the BSN & Poly Interchain Service webinar. Today we are going to talk about both BSN and Poly Enterprise and how Poly supports BSN’s interoperability. We will also discuss the advantages of Poly towards other cross-chain protocols and the importance of interoperability for both BSN and Poly. Lastly, I will run a demonstration of the BSN Interchain Services supported by Poly Enterprise.

Firstly, I’d like to introduce myself and the guest here today. My name is Bill Shi, and I am working as a technical support of BSN International. My work also includes BSN training, overseas promotion and international operation.

And this is Mr. Zou Xueyan, one of the developers of the Poly Network project, involved in the design of poly cross-chain protocols and the development of smart contracts. He is responsible for the development of Poly Enterprise. Welcome, Mr. Zou.

We know that on October 31, 2020, the BSN completed a quarterly update and launched BSN interchain services. As one of BSN’s core functions, interchain services support interoperability between two or more independent blockchains in the BSN. It enables the swap and transfer of data, assets, and information. Poly Enterprise is now one of the cross-chain protocols integrated with the BSN interchain services. Mr. Zou, could you briefly introduce Poly Enterprise to us?

Zou: Poly Enterprise, a heterogeneous interoperability protocol initiated by Onchain, is an enterprise-oriented version of the Poly Network which has been launched in August 2020. Poly Enterprise optimizes the scope of heterogeneous cross-chain transactions by enabling the transfer of not only assets, but also arbitrary information, and allow each heterogeneous consortium blockchain to work together seamlessly. Poly Enterprise has already supported Hyperledger Fabric and FISCO BCOS protocols through BSN — with plans to implement interoperability between more chains in order to build the next generation internet infrastructure.

DISCUSSION

Q1: For those who are not familiar with BSN, can you tell us more about BSN and BSN’s interchain services?

Bill: Blockchain-based Service Network or BSN, is a public infrastructure network for blockchain technology. The BSN consists of 4 parts, Public city nodes, BSN Portals, Frameworks, and NoC platform.

A Public city node or PCN is a basic operational element of the BSN. Public city node is not the blockchain peer node. Instead, it is rather a resource pool that provides system resources such as access control, transaction processing, data storage, and computing power for DApps.

The owners of each city node are cloud service providers or data centers. By installing the free public city node software in the cloud resources and linking to the network, they can create a city node in the BSN. In each PCN, there are several shared peer nodes and each peer node can run 40–60 DApps. By lowering the unnecessary waste capacities, the cost of running a DApp can be drastically reduced.

PCN is the actual place where the smart contract runs. However, users don’t directly access the PCN and deploy their smart contracts. They need to access the BSN portal and purchase BSN cloud resources and deploy and manage DApps.

A BSN portal can be the Blockchain-as-a-Service part of an existing website or a just standalone portal. Currently, there are multiple BSN portals in use, including BSN China portal and BSN International portal.

The BSN also integrates different kinds of frameworks, including permissioned frameworks, permissionless frameworks, and interchain frameworks. Users can choose the appropriate frameworks based on their actual needs. Currently, permissionless frameworks, such as Ethereum, EOS, NEO, can only be available in the BSN International portal.

The last part of the BSN is Network Operations Center, or NoC platform, all operations, such as smart contract deployment, peer node constructions, and some other maintenance work, should be done on this platform.

BSN is a cross-cloud, cross-portal, cross-framework global infrastructure network that enables developers to easily and affordably develop, deploy, and manage permissioned and permissionless blockchain applications (DApps).

Overall, BSN is a cross-cloud, cross-portal, cross-framework global infrastructure network that enables developers to easily and affordably develop, deploy, and manage permissioned and permissionless blockchain applications (DApps).

The BSN Interchain Communications Hub (ICH), the key part of interchain services, uses relay chains as cross-chain coordinators and heterogeneous chains as cross-chain transaction executors, and it acts as a relayer of cross-chain data.

A demo version of ICH is now live on the BSN Testnet, integrating two interchain solutions based on the relay chain mechanism: (1) Poly Enterprise developed by Onchain and (2) IRITA developed by Bianjie AI. At the end of this month, BSN interchain services will be commercialized and more features will be presented to the public.

Q2: Can you tell us more about Poly Enterprise and what kind of interoperability it supports?

Zou: Chains like Fabric or FISCO BCOS are seen as the side chains to the Poly chain (hereinafter “Poly”). The specific side chain can be crossed only after it has been registered on Poly, which can also be connected with other side chains through Poly after its registration. Every side chain has its relayer to relay messages between side chain and Poly. The correctness of the messages from the side chain can be verified in the smart contract. Above is the way how we build trust in chains.

By using cross-chain services, DApps will become more flexible and powerful. For example, A cross-chain DApp is made up of contracts on multiple chains.

Users of DApps can call smart contracts of another chain on one chain. After the user calls DApp, the relayer of chain A forwards the cross-chain message to Poly, while Poly’s smart contract will verify the correctness of this message. Then, a Message that has been verified will be forwarded to the next chain. Finally, the message triggers a smart contract call on the target chain.

In conclusion, based on Poly Enterprise, the trusted transmission of any message between chains can be realized.

Q3: For the both of you, why interoperability is important, and now with Poly landed on BSN, what does it mean to the market?

Zou: If we assume that each blockchain system is an isolated island in the ocean, Poly will be a shipping system between them. Poly Enterprise will work with BSN to help eliminate barriers of the blockchain technology by reducing the costs of cooperation between users.

Blockchain systems are destined to be linked, just like global trade. We always think about how for two organizations who have split blockchain systems to build trust when they try to establish a connection. Poly’s appearance makes the trusted cross-chain messaging service available.

Developers can build more flexible applications, which can call each other through Poly even they are based on different framework. This is really a great attempt for the market. The launch of cross-chain function will change the isolated paradigm of blockchain industry, and which will also change the standards for blockchain applications.

Bill: BSN is a big environment which integrates all kinds of blockchain technologies. As I have mentioned above, including the permissioned and the public frameworks, interchain capabilities and cloud resources. BSN has two major purposes. The first one is we want to make the access to blockchain technology much cheaper and easier. Because right now if you go to any cloud services provider to build your own private chain, it will cost you a fortune. This is not welcoming to small and medium companies, as well as individuals. Our second purpose is interoperability and we strongly believe this is where the innovation begins. By cooperating with Poly, the realization of interoperability in the BSN will be easier and better.

DEMO DEMONSTRATION

Bill: Hopefully now our audiences could have a good idea about the BSN and Poly. Now, I’d like to run a demo to show exactly how interchain services can be realized in the BSN.

In this demonstration, I will use the Fabric-based smart contract as the source chain to call the target chain which is based on FISCO BCOS.

Firstly, log in to the BSN International portal. From here you can see, Interchain Services. And click Testnet Entrance. Because currently, the BSN Interchain services are running on the BSN testnet.

Click Create a Test Service button, to input the Service Name, and click Upload Chaincode package to upload the smart contract package. Here we use Golang as the chaincode language. And in order to upload the smart contract package, here we use the BSN sample smart contract. You can search it at github.com/BSNDA. In ICH category, and download the zip file.

Open the zip file, and you can see Polychain folder. Now we need to extract both fabric-contract folder and fisco-contract folder. In the fabric-contract folder we choose testnet folder. Then we open main.go file, and copy and paste the main path here.

Then, the next step here is to zip the file and upload and click confirm. Now we can start deploying the smart contract. Also, for FISCO BCOS smart contract, we do the same procedure. We also need to follow the smart contract packaging requirement. Just remember to choose the correct platform. And deploy it as well. Refresh the page and you can see, both smart contracts are successfully deployed.

If you would like to know more about how to correctly package the smart contract and successfully deploy the smart contract here, you can click Create a Test Service, view packaging specifications button to open the BSN User Manual at chapter 5.4.2 BSN Smart Contract Package Requirements. Then you can see the detailed information of how to correctly package the smart contract.

The next step is to click Testnet Services, action, Click Details button to enter the information page. Here we need to copy and paste several parameters into the off-BSN systems. Here we choose the official BSN Java SDK. You can find it also from BSNDA, PCNGateway-Java-SDK here.

Click to download the certificate, copy and paste parameters including Access URL, UserCode, APPCode and Chaincode deployment name to the correct places. And here we can see the downloaded zip file. Open the file, we can see several folders, here we use UserAppCert folder, secp256r1. Because it matches the platform type as Fabric-1.4.3-secp256r1. Here we extract the private key file, and we need to copy and paste the content to the correct place. And also, we need to go to gatewayCert folder and extract gateway_public_cert_secp256r1 file and copy and paste the content. And also, the same situation happens to FISCO smart contract. And here we use the path of both private key and public key files. So, we find the correct path and paste the content there. Here we use Testnet, Fisco. And the platform type is secp256k1.

So now, we can make the cross-chain transaction call. So, from here, we can see several parameters we need to fill in, and we use “say” method to commit the cross-chain call. And we can find those parameters from the BSN User Manual, on chapter 7, Interchain Services, chapter 7.1.2 Interchain Services based on Hyperledger Fabric. And here are the four parameters that we need to fill in.

So, the first one here is the Chain ID. And here is the table on chapter 7.1. As the target chain is FISCO of international, so, we need to choose 7 as the Chain ID. The second parameter we need to fill is the target chain’s address. So here, PolyFabricToFisco, the FISCO chaincode is right here, the chaincode address. We need to directly copy and paste. Just remember to remove the prefix “0x”. and the third one here is the message that we would like to pass from the source chain to the target chain. And the last one here is the source chain’s chaincode deployment name. Here we should also fill in the chaincode deployment name and start the call.

And now as we can see, the message has been successfully passed. So, then we should go to FISCO BCOS smart contract to see whether we have received the information we passed from the source chain.

Before we start to check, we need to firstly register the user. And secondly, here, we need to fill in the user name and also the contract name. The contract name can be found here, and here we use “hearSomeThing”, we use this method to receive the message. So here is the result. queryInfo show the exact result of the information, but actually here we can see, it’s kinda a hexadecimal string. So, we need to convert it to the real string.

Copy the result and open a hex to string website, paste the result and remember to remove the prefix “0x”. Click convert, and here is the result: FabricToFiscoByPoly, which matches exactly the message that we sent out. So now, the cross-chain transaction call is successful!

SUMMARY

Above is all about today’s topic. If you have any questions or suggestions or would like to learn more about the latest news of Poly Enterprise and the BSN, please kindly find the contact information of Poly Enterprise here to reach us.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Poly Network

Poly Network

Enhancing connections between ledgers by providing interoperability in Web 3.0.