Home | Blog | ARK Messenger Tutorial — Part Three
Ray Alvarez
Blockchain
Reading time: 5 min
Date: 31st Mar 2020

ARK Messenger Tutorial — Part Three

Welcome everyone to the final part in our series of tutorials based on the ARK Messenger Proof-of-Concept (PoC). During Part One , we set up a development environment and deployed our own custom bridgechain. During Part Two , we created a custom transaction and tested it. This series was created in-part with documentation provided by Delegate Lemii as part of his ARK Messenger Proof-of-Concept which was funded by the ARK Grants Program .

Now that we have reached the conclusion of this series, it is time to finally launch the Proof-of-Concept. After launching the PoC we will highlight the unique ways in which building on ARK made the ARK Messenger PoC possible.

Launching the PoC

The bridgechain that supports the ARK Messenger was launched using the ARK Deployer. From a development standpoint, ARK Deployer is one of the easiest ways to launch a blockchain for your project. However, to build the ARK Messenger PoC, some configurations were made so that each consequent cloning of the repository would include the aforementioned changes. The changes outlined below show just how easy it is to build and modify your blockchain on ARK.

Including the custom transaction

  • The files pertaining to the custom transaction we created were placed in the /plugins/ folder.
  • The custom transaction was added as a plugin to the bridgechain by inserting “message-transaction”: {}, at the end of the plugins.js file.

Disabling API caching

By default, the API caches results that are returned to the user. While this is usually a very nice feature to have, for a chat application where responsiveness is important, it is not the behavior that we want. Therefore, API caching was disabled in the plugins.js file:

“@arkecosystem/core-api”: {  
cache: { enabled: false },  
… 
},

Disabling count estimates

By default, the API returns estimates of the total count. For ARK Messenger, we prefer to use accurate numbers, and therefore force this setting in an environment variable that is used in the configuration:

CORE_API_NO_ESTIMATED_TOTAL_COUNT=true

Setting a minimum network reach

Since ARK Messenger is launched as a PoC, it is being run on a Testnet. In this network, no other nodes are connected to the network. To make sure that the forger process does not refuse to forge blocks due to not adhering to the minimum network reach, we configure it to be 0 in the plugins.js file:

“@arkecosystem/core-p2p”: {  
server: {  
…  
minimumNetworkReach: 0,}  
,

Once the above changes have been made, you are ready to launch the Proof-of-Concept! The ARK Messenger is meant to be a community initiative where everyone can get involved. If you would like to contribute, feel free to submit your issues/pull requests to the Messenger Client and Core repositories.

Building with ARK

As the ARK team continues to make improvements to our wide suite of products, we want to continue to make the ARK platform one of the best and most reliable places to build your blockchain solutions.

Throughout this series, we have seen several ways that building on ARK adapted to the needs of this particular PoC. As we wrap up our series, let us highlight a few of them now.

Custom Transactions

In order to create the transactions that would become the basis of ARK Messenger, modifications needed to be made to some of the existing transaction types within ARK Core. For this purpose, ARK has made it easy to make these changes through our Generic Transaction Interface (GTI). The purpose of GTI is to give developers an easy way to implement and include new transaction types in the ARK Core without having to modify large parts of the ARK Core.

If you would like to learn more about developing Custom Transaction Types with GTI, then read here.

ARK Deployer

By using the ARK Deployer, the ARK Messenger’s stand-along blockchain was created in a quick and efficient manner. The blockchain created was also adapted to meet the needs of this specific PoC. The ARK Deployer allows anyone to be able to prepare, customize and deploy their blockchain in just a few simple steps.

If you would like to take a closer look at how this is all possible, please feel free to read the documentation regarding the ARK Deployer here.

Funded by ARK Grants

In case you haven’t heard, the ARK Messenger PoC was fully funded by the ARK Grants program. ARK Grants is a developer incentive program aimed at our growing community of developers. Developers can receive funding for building ARK-based PoC’s, plugins and full production-ready applications. The program is being backed by 1 million ARK and currently accepting applications!

Learn about the ARK Grants guidelines and application process at http://ark.io/grants

Thank you for joining us in this series! If you have any questions make sure to consult our documents on the Learn ARK hub. In addition, our team and community developers are active on Slack so do not hesitate to reach out!

ARK Messenger Tutorial Series

If you have missed other ARK Messenger Tutorial blog posts, you can read them by following the links below:

2020 © ARK.io | All rights reserved An ARK.io Product