Recap | How IRITA Hub Interchain Services Run on the BSN
On October 31,2020, the Blockchain-based Service Network (BSN) and Bianjie announced that the IRITA interchain service, IRITA Hub, has been officially launched at the BSN’s Interchain Communications Hub (ICH). Currently, IRITA Hub has been integrated into the BSN Testnet, and the commercialization of the interchain services will start on April 30th, 2021.
On March 5, 2021, Bill Shi from BSN and Evie Xu from Bianjie sat down together to have a discussion and demonstration of BSN interchain services supported by IRITA Hub.
The following is the full transcript:
Bill: Hello everyone, welcome to the BSN & IRITA Interchain Service webinar. Today we are going to talk about both BSN and IRITA and how IRITA supports BSN’s interoperability. We will also discuss the advantages of IRITA towards other cross-chain protocols and the importance of interoperability for both BSN and IRITA. Lastly, I will run a demonstration of the IRITA-based service on BSN Testnet.
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 our guest Evie Xu, communication manager of Bianjie. Welcome, Ms. Xu!
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. IRITA is the first cross-chain protocol announced to be integrated in the BSN interchain services, and we know it is developed by Bianjie. Could you please introduce a little bit about Bianjie to us?
Evie: Bianjie is a high-tech startup founded in 2016. By leveraging advanced blockchain and big data technologies, Bianjie focused on blockchain innovative products and solutions for financial, healthcare and many other industries. Bianjie is the Core team behind the development of IRISnet — an interchain service hub for next-generation distributed applications, and is also one of the open-source early contributors of the Cosmos network project. The team developed an enterprise product, a consortium blockchain called IRITA, which uses IRISnet iService as well as privacy computing technology. Through IRITA, Bianjie is serving important customers in China, including provincial/state level blockchain platforms such as BSN, leading Internet healthcare service providers, and leading insurance service providers.
Discussion
Q1: For 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 and capabilities, 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 to the PCN and deploy their smart contract. They need to access to the BSN portal and purchase BSN cloud resources and to 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 multiply 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, Irisnet, 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.
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. At the end of this month, BSN interchain services will be commercialized and more feature will be presented to the public.
Q2: Can you tell us more about IRITA Hub and what kind of interoperability it supports?
Evie: IRITA Hub is an enterprise interchain service product in IRITA consortium blockchain product family developed by Bianjie. IRITA builds upon the Cosmos/IRISnet tech stack, and its interoperability is supported by the communication layer of IBC protocol as well as application level iService protocol. To make it easy to understand, compared with the TCP/IP model, IBC is a TCP type of protocol and iService is a HTTP-like application level protocol. IRITA Hub can support the cross-chain interoperability among different consortium blockchains, between consortium blockchains and public chains, and off-chain and on-chain.
The whole suite of IRITA Hub includes 3 components: Hub, relayer and iService Extension. The Hub is working to verify the messages of the connected chains, and relayer is for the cross-chain information transfer between the Hub and the connected chains, and finally the iService Extension is deployed on different connected chains, so that the smart-contracts or dApps on these chains could interact with other blockchains through iService protocol.
So with this framework, the smart contract cross-chain invocations among multiple heterogeneous blockchains can be achieved through iService. For example, the requester can call the iService smart contract for the services provided on another chain. In order to complete this process, relayer will monitor and send the service request to the Hub, and the Hub needs to verify that the cross-chain data is trustworthy, only the verified request will then be sent to the destination blockchain where service is provided. The service results will be relayed back to the Hub, and then to the requester chain when the service processing is complete,.
Right now through working with collaborators including Red Date Tech. iService is supported on main stream constortium blockchains including Hyperledger Fabric, FISCO BCOS, etc. Demos are also built to illustrate how IRITA Hub can interact with public chains such as Ethereum and IRISnet. IRITA Hub also supports off-chain trusted data provided by distributed oracle network, such as Chainlink.
Q3: For both of you, why interoperability is important, and now with IRITA landed on BSN, what does it mean to the market?
Evie: The blockchain is regarded as the next-generation Internet of Value, but as the blockchain projects gradually increase, the information isolated island becomes the issue. Due to the difference of the underlying technologies, the interconnection issue natively exists among the blockchain systems, which runs in the opposite direction against the aim of the Internet of Blockchains. Therefore, the interchain technology is the key to achieve the data transfer as well as the value circulation among blockchains, and even between blockchain and off-chain real world. This is why the interoperability is so important.
IRITA Hub can make reliable communications between blockchains in the BSN environment and external networks and markets. In the future, IRITA Hub will integrate more consortium blockchains and also public chains through relayers, further making the interchain service support more blockchain systems. In this way, Service Providers are able to easily deploy the dApps accordingly. No matter which blockchain environment the service is deployed in, services can be easily called in the low-cost, convenient and reliable manner through IRITA Hub. This innovation will change the current isolation issue in the blockchain industry, and lay the foundation for supporting the distributed business 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 service provider to build your own private chain, it will cost you a fortune. This is not welcome 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 IRITA, the realization of interoperability in the BSN will be easier and better.
Demonstration
Bill: Hopefully now our audiences could have a good idea about the BSN and IRITA. Now, I’d like to run a demo to show exactly how users can use IRITA to make cross-chain calls in the BSN.
In this demonstration, I will make a cross-chain call based on IRITA protocol in the BSN Testnet. The smart contract of the source chain is deployed on Fabric, and the smart contract of the target chain is deployed on Ethereum Ropsten Network. Developers can follow this guidance and have free trials.
Firstly, log in to the BSN International portal. On the left side panel, click Permissioned Services -> Testnet Services. Currently, IRITA protocol is integrated into the BSN Testnet, and on April 30th 2021, we will commercialize it in the production environment.
Click Create a Test Service button, to input the Service Name, and click Upload Chaincode Package to upload the smart contract. Here we use Golang language to write the smart contract. The smart contract package we use here is from github.com/BSNDA. From ICH category, and download the zip file.
Open the zip file, and you can see IRITA folder. As we are using Fabric as the source chain to initiate a cross-chain call, we here choose consumers folder, Fabric. Here we can see the fabric.zip has already been provided, so that we can simply extract that and upload to the testnet. Here we should acquire the main path from main.go file, copy and paste it here.
Now we can start deploying the smart contract.
If you would like to know more about how to correctly package the smart contract and successfully deploy it here, you can click 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 get information generated by the BSN, and input it to your off-BSN system to make the cross-chain call. 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. I use the official BSN Java SDK to demonstrate as the off-BSN system. You can also find it from github, PCNGateway-Java-SDK here.
Click and download the certificate, copy and paste parameters including Access URL, UserCode, APPCode 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. Here are the paths of both the private key and gateway public key files. Replace the keys here.
Now, I’d like to configure some parameters before invoking the smart contract. We have deployed a smart contract on the Ethereum Ropsten Network in advance. We use this input structure, including the target chain’s address, amount to mint, meta id, set price and is for sale. Another parameter along with input is chaincode deployment name from here. The method to call across the chain is “callnft”, and here we also need to fill in the chaincode deployment name.
For more information about this configuration, please go to the BSN User Manual, chapter 7.3.3.1 Interchain Application Contract based on Fabric.
Now we can invoke the smart contract and initiate the cross-chain call. There you go. Now we can see the message from the source chain has been successfully transferred out.
The next step is to check from the receiver’s end whether the cross-chain call has been made successfully. Here we open an Ethereum Ropsten network browser, and paste the address of the target chain that we have input in the SDK.
Here is the cross-chain call we’ve just made and click here to check transaction details. Copy the input data and convert it from hexadecimal to string, and we can see “BSN IRITA TEST” here, which matches exactly the same input value in the SDK here.
So now, the cross-chain call is successful!
SUMMARY
OK, so this is all about today’s topic. If you have any questions or suggestions or would like to learn more about the latest news of the BSN and IRITA, please kindly find the contact information here to reach us.
Thank you for your watching and also thanks for Evie’s sharing, see you next time! Bye-bye!