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 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 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!
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,
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.
The action property works within this framework by sending a valid action to the blockchain such as register, resign or update.
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:
"description": "Example Description",
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.
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!