AIP: *103* Title: *Marketplace Transaction Types* Authors: *ARK.io Team * Status: *Draft | Active* Discussions-To: https://github.com/arkecosystem/AIPS/issues/103 Type: *Standards* Category: Core | Network | Protocol Created: 2019-06-27 Last Update: 2019-08-31 Requires: AIP-29
A team or a company will be able to issue a business/bridgechain registration transaction in the same way a delegate registration transaction is issued. The proposed fee for this transaction should be in the level of delegate registration ARK as it relates to a similar process, however as this introduces more data being stored on mainnet, we should take spam protection into consideration (fees, rules). We will also add ability to terminate business or bridgechain via a special transaction type (reason: for new projects or companies to use the non-claimed chain ticker, business name).
AIP-29.
Size limitations related to size of specifics fields, that can go into the additional assets. We must be careful and limit every incoming field to avoid simple and cheap attack issues on the mainnet - which would result in size/spam increase.
- Strict schema validation
- Ensure checks on transaction pool and protocol level (see specs for each transaction type)
Check below for specification of new transaction types. We are introducing the following transaction types:
- BusinessRegistration
- BusinessResignation
- BusinessUpdate
- BridgeChainRegistration
- BridgeChainResignation
- BridgechainUpdate
Name: BusinessRegistration
A issuer can register its own business.
Field | Size(bytes) | Requires |
---|---|---|
name | 40 | Y |
website | 50 | Y |
vat | 15 | N |
repository | 50 | N |
export const businessSchema = {
name: {
$ref: "genericName",
},
website: {
$ref: "uri",
},
vat: {
type: "string",
minLength: 8,
maxLength: 15,
$ref: "alphanumeric",
},
repository: {
$ref: "uri",
},
};
export interface IBusinessRegistrationAsset {
name: string;
website: string;
vat?: string;
repository?: string;
}
Add BusinessInformation to wallets, so we can identify them and access the latest data.
- All normal rules from GTI handlers (signature, serde process, pool security,...)
- Size limitations of specific fields
- Schema validation of some fields
- add state to wallet (Business)
- If business is already registered
- If business is resigned
- We MUST enforce a high static fee ~ 50 ARK
Name: BusinessResignation
A Business can terminate its registration, if it’s no longer operational or working.
- All normal rules from GTI handlers (signature, serde process, pool security,...)
- Only a registered business can issue this transaction type.
- Add state to wallet (
resigned
) - All bridgechains are resigned
- If wallet doesn't have business state
- If business has been already resigned
- Normal transfer fee
A Business can update its business asset stored in wallet.
Field | Size(bytes) | Requires |
---|---|---|
name | 40 | N |
website | 50 | N |
vat | 15 | N |
repository | 50 | N |
export interface IBusinessUpdateAsset {
name?: string;
website?: string;
vat?: string;
repository?: string;
}
- All normal rules from GTI handlers (signature, serde process, pool security,...)
- Only a registered business can issue this transaction type.
- Allowed fields are updated during the apply logic
- If business doesn't have business state
- If business has been resigned
- We enforce static fee of 50 ARK
Name: BridgeChainRegistration
Only a registered business can issue a bridgechain registration transaction.
Field | Size(bytes) | Requires |
---|---|---|
name | 40 | Y |
seedNodes | 400 | Y |
genesisHash | 33 | Y |
bridgechainRepository | 50 | Y |
bridgechainAssetRepository | 90 | N |
ports | 4 | Y |
export interface IBridgechainRegistrationAsset {
name: string;
seedNodes: string[];
genesisHash: string;
bridgechainRepository: string;
bridgechainAssetRepository?: string;
ports: IBridgechainPorts;
}
export interface IBridgechainWalletAttributes {
bridgechainAsset: Interfaces.IBridgechainRegistrationAsset;
resigned?: boolean;
}
properties: {
name: {
$ref: "genericName",
},
seedNodes: {
type: "array",
minItems: 1,
maxItems: 10,
uniqueItems: true,
items: {
type: "string",
format: "peer",
},
},
genesisHash: {
$ref: "transactionId",
},
bridgechainRepository: {
$ref: "uri",
},
bridgechainAssetRepository: {
$ref: "uri",
},
ports:{
type: "object",
maxProperties: 1,
minProperties: 1,
required: ["@arkecosystem/core-api"],
additionalProperties: false,
properties: {
"@arkecosystem/core-api": {
type: "integer",
minimum: 0,
maximum: 65535,
},
},
}
};
- All normal rules from GTI handlers (signature, serde process, pool security,...)
- Only a registered business can issue this transaction type. If address has not issued a BusinessTransaction yet, it should be rejected.
- Size limitations of specific fields
- Max number of input seeds (~10)
- Add bridgechain details to BusinessRegistered wallets (core-state), so we can list them and access the latest data specified data
- Bridgechain nonce introduction - we apply a bridgechain nonce to every registered bridgechain. The bridgechain nonce will at a later point be used as a
chainId
to enable cross-chain operations.
- If wallet doesn't have business state
- If wallet has resigned as a business
- We MUST enforce a high static fee ~ 50 ARK
- Expand the protocol, so that only static fee is accepted
A Business can terminate one of its bridgechain registrations. The bridgechain nonce (or also called bridgechain id) needs to be provided for the exact bridgechain that is resigning.
Name: BridgeChainResignation
Field | Size(bytes) | Requires |
---|---|---|
bridgechainId | 8 | Y |
export interface IBridgechainResignationAsset {
bridgechainId: string;
}
- All normal rules from GTI handlers (signature, serde process, pool security,...)
- Only a registered business can issue this transaction type
- We need to define the ID of bridgechain we are resigning
- Add
resigned
flag to wallet
- If specified bridgechain is already resigned
- If wallet is not a business
- If wallet has resigned as a business
- Normal dynamic transfer fee
A Business can update bridgechain registrations (if it is the same owning wallet). During the update process we can only update/add additional seedNodes to the process.
Field | Size(bytes) | Requires |
---|---|---|
bridgechainId | 8 | Y |
seedNodes | array[] | N |
ports | 4 | N |
bridgechainRepository | 80 | N |
bridgechainAssetRepository | 80 | N |
export interface IBridgechainUpdateAsset {
bridgechainId: string;
seedNodes?: string[];
ports?: IBridgechainPorts;
bridgechainRepository?: string;
bridgechainAssetRepository?: string;
}
- Schema validation
- Fields are updated during the apply logic
- If specified birdgechain is already resigned
- If wallet is not a business
- If wallet has resigned as a business
- We MUST enforce a high static fee ~ 50 ARK
Final decision and specifics will be adjusted by project lead and aligned during actual implementation.
Implementation can be found here: ArkEcosystem/core#2858