23rd Sep 2020
6 min read

ARK Core v2.7 is Now Live — New Entity Declaration Transaction Type

While the ARK Development team has been hard at work preparing for the beta versions of the Deployer , MarketSquare and the new ARK Desktop Wallet, they have also been paving the way for ARK Core v3.0. ARK Core v2.7 is the last major Core upgrade before 3.0 and introduces the new transaction type — Entity Declaration. Let’s dive in and find out how this new transaction type works and how it lays the groundwork and foundation for MarketSquare.

The Entity Declaration Transaction Type

The Entity Declaration transaction is being added to Core v2.7 based on the acceptance of ARK Improvement Proposal 36 (AIP 36 ). AIP36 proposed the Entity Declaration transaction type as a way to simplify how different entities can declare themselves and register on ARK’s public blockchain.

Prior to the Entity Declaration transaction, someone would most likely use a Business or Bridgechain transaction type (Magistrate 1.0 types) to register their business or project on the blockchain. However, in practice, we found that this design was inherently flawed and did not provide the level of simplicity and expandability that was needed.

The Entity Declaration transaction is much more flexible and makes the ARK Public Network (APN) more future-proof as we expand the capabilities of MarketSquare and our other offerings. This update allows entities to register on-chain and introduces a simple key-value pair with generic data that will run against a validation schema based on the type of entity that is registering, making ARK more robust and extensible without requiring the network to hard fork for future updates.

In order to get a clearer picture of this in action, it’s worth exploring what makes up an Entity Declaration transaction.

The Parts of an Entity Declaration Transaction

The Entity Declaration Transaction is made up of four different properties: Type, Subtype, Action and Data. Let’s break them down below and see how it all works!

Type

The type property identifies the type of entity that is registering, updating or resigning on the blockchain. Below is the current set of type definitions.

Initial AIP36 types are as follows:

Note: With the new entity declaration updates in AIP36, we now have a total of 256 types, each with 256 possible subtypes available for future use cases and expansion.

 Business = 0,
 Product = 1,
 Plugin = 2,
 Module = 3,
 Delegate = 4,

Subtype

The subtype property gives us more details about the type of entity that is registering, updating or resigning on-chain. This subtype allows for additional classification within each type.

Action

The action property works within this framework by sending a valid action to the blockchain such as register, resign or update.

Data

The data property contains all of the information pertaining to the entity. We save all of the data to IPFS to give added redundancy and decentralization, making the data easily accessible for any application to use. By having the entity data on IPFS, we can update and refine what data we store over time without requiring changes to the APN(ARK Public Network) for each update. This also means that an entity registering their data on the APN can use our robust APIs to allow other products and services to integrate their stored data.

Let’s look at how the initial Data will be constructed and what each entity can add when registering:

{
    "sourceControl":[
        {
            "type":"bitbucket",
            "value":"https://bitbucket.org/"
        },
        {
            "type":"github",
            "value":"https://github.com/"
        },
        {
            "type":"gitlab",
            "value":"https://gitlab.com/"
        },
        {
            "type":"npm",
            "value":"https://npmjs.com/"
        }
    ],
    "socialMedia":[
        {
            "type":"discord",
            "value":"https://discord.com/"
        },
        {
            "type":"facebook",
            "value":"https://facebook.com/"
        },
        {
            "type":"instagram",
            "value":"https://instagram.com/"
        },
        {
            "type":"linkedin",
            "value":"https://linkedin.com/"
        },
        {
            "type":"medium",
            "value":"https://medium.com/"
        },
        {
            "type":"reddit",
            "value":"https://reddit.com/"
        },
        {
            "type":"slack",
            "value":"https://slack.com/"
        },
        {
            "type":"telegram",
            "value":"https://telegram.org/"
        },
        {
            "type":"twitter",
            "value":"https://twitter.com/"
        },
        {
            "type":"wechat",
            "value":"https://wechat.com/"
        },
        {
            "type":"youtube",
            "value":"https://youtube.com/"
        }
    ],
    "meta":{
        "displayName":"Example",
        "description":"Example Description",
        "website":"www.example.com"
    }
}

As you can see there are numerous options to add for your entity while registering. Once submitted through the ARK Desktop Wallet, the registration process will upload the data to IPFS and provide a hash of the associated file. This IPFS Hash contains all of the data mentioned above and saves it to the IPFS cluster. Concerning the data above, the only thing being saved to the blockchain is the IPFS data hash, which allows us to ensure the data we receive is the correct data for the entity while optimizing the amount of data stored on the blockchain.

If we want to add additional options to the data structure we can simply do so without compromising our ARK data schema validation. This allows the upgrade to be made without requiring a hard fork of the network, making the process much more seamless for users.

If an entity wishes to add additional data or update their previous entry, they will simply update their data via the Desktop Wallet and broadcast an update entity transaction, which will replace its IPFS hash data field with a new and updated hash.

To help demonstrate how the process works in execution, here is a quick example.

John is the owner of a blockchain news site and would like to register his business on-chain. John downloads the ARK Desktop Wallet and has some ARK tokens sent to him. Within the wallet, John takes the following steps:

  • John opens his ARK Desktop Wallet and selects his address.
  • He then chooses the Entity Declaration Transaction Type.
  • Next, John selects the “Business” type for his entity with a subtype of “News”.
  • From there he chooses the “Register” option as this is his first time registering.
  • After that, John adds all of the additional information for his entity (description, website URL, social media links, …).
  • Lastly, John signs and broadcasts the transaction on the network to finalize the process.

It is important to note that the data schema for his entity will include the name of his entity but will also contain an IPFS hash for all the metadata relating to his entity.

Just like that, John now has a registered his Business News on the APN and is listed in MarketSquare.

Working With MarketSquare

Thanks to the new Entity Declaration transaction type, we have created a system that will work in tandem with MarketSquare and simplify the listing process. On-chain types and subtypes are number values. On MarketSquare they are tied into labels that are used to describe different entities.

Best of all the entire system is future-proof. The type property allows up to 256 different types to be added. Breaking it down further, the subtype for each type will also allow up to 256 subtypes. This gives us a system that can be continually added upon over time.

We can’t wait to open the doors to MarketSquare and start registering your entities. If you think we missed an important data field or if there is something else you would like to see in the information, join our slack and let us know!

Share:

Get in Touch!

Whether you want to learn more about ARK Ecosystem, want to apply for developer bounty, become our partner or just want to say Hello, get in touch and we will get back to you.



An Ecosystem of Developers

Join us on our journey to create the future of Web3.