# Blockchain Config

This configuration mainly takes care of the blockchain settings across the network of nodes and needs to be consistent with other nodes. An example is shown below:

{
    "blockLimit": {
        "maxEntriesPerTransaction": 100,
        "maxTransactionByteSize": 1000000
    },
    "byzentineAssumption": true,
    "consensusCredentials": {
        "members": [
        "026beca06739461a20249fd4b24cf27542013624d18710bc418e8de10d6ef68568",
        "02fce59e2dd0015bbb34da445f6c3a4ac2254a1b90ffa9c66fbd8621bf0c1a6deb"
        ],
        "quorumCredentials": null
    },
    "consensusCredentialsAdmin": {
        "admins": [
        "02556b8f72dcf64b99a4c5daab87a9af5bd9d3e8922e0373eab8471521178e53f2",
        "0368c948e1aebfc264fcb1f0e0e600b9e7264ccb38be00fd3770e6e9df3d075db8",
        "029203d09335e102c6c5fd871fc478d1291c62b2722b822dcb81d4e487605c69d3"
        ],
        "percent": 0.3
    },
    "emptyBlocks": false,
    "evidenceValidatorType": "StandardEvidenceValidator",
    "extensions": [
        {
            "name": "Miyabi.BLS"
        },
        {
            "name": "Miyabi.Binary"
        },
        {
            "name": "Miyabi.Asset"
        },
        {
            "name": "Miyabi.Entity"
        },
        {
            "name": "Miyabi.Contract"
        },
        {
            "name": "Miyabi.NFT"
        },
        {
            "name": "Miyabi.PrivateData"
        }
    ],
    "initScript": "[{\"type\": \"CreateAssetTable\", \"name\": \"TestInitAssetTable\", \"tracked\": \"false\", \"supportProofs\": \"false\", \"tableAcl\": {\"tableOwners\": [\"03b25c2a2e3793e14797dd100b668da2023e2bb03cf7b9a25d0b1f28487b856054\"]}, \"isReadRestricted\": \"false\", \"permissionModel\": \"CheckRowOnly\", \"tokenAdmins\": [\"03b25c2a2e3793e14797dd100b668da2023e2bb03cf7b9a25d0b1f28487b856054\"]}, {\"type\": \"ContractInitialize\", \"contractAdmins\": [\"0315ebc05445e3f9936732210aefb03781fe38558582666082571d4d6901c18cb9\",\"02284ecf010803f287dee92b8403ab6bdba590dcb0e5434b97fb3dcecfbab6ca34\",\"039dd634a89c706057df02b2491257d542970ac0776b58d9881dffd3af88004106\"], \"contractDebug\": true}]",
    "maxClockDrift": "00:00:10",
    "maxtpb": 2000,
    "networkName": "MIYABI_NETWORK",
    "tableAdmin": {
        "admins": [
        "02e3c13b6862eda179ac49d03b334ef17cf654c05bd3fa6dc0cf6078fefe82aea2",
        "0315c61ea29a55a6db92b35daabca2bc10bcb6966b4157687b4c3ce859be107fd2",
        "0375471bcec5058f8df8ee6373f58a32aaf5b7f8dd6f54edc28f4dd6fea679eff1"
    ],
        "quorum": 1
    },
    "transactionLifetime": "01:00:00",
    "worldAdmin": {
        "admins": [
        "03b25c2a2e3793e14797dd100b668da2023e2bb03cf7b9a25d0b1f28487b856054",
        "02bdaaf326614139712f95975ff0c6d376c9a2f3891381134880b84915199b6175",
        "03f256db66485c4a93c66cbdb5c81930efcbbd3b23298c99760f71a45ac9ca1479"
    ],
        "quorum": 1
    }
}

The following table describes each configuration field:

Field Description
ConsensusCredentials Credentials used to create a block. A quorum of these credentials must witness a block in order for it to be accepted.
QuorumCredentials QuorumCredentials can represent the credentials of the quorum itself. These are the subset credentials (quorum), denoted as k out of n consensus participants.
WorldAdmin Permission (public key) required to initialize the node in general. They have the Root world permission by default.
TableAdmin Permission (public key) required to create a new table.
ConsensusCredentialsAdmin Permission (public key) required for the consensus members to participate in consensus process. They are also required for modifying the consensus membership.
Quorum The quorum of admins needed to accept an action.
Percent The quorum in percentage point needed to accept an action. Allowed range (0, 1]
MaximumTransactionsPerBlock (Optional, default to 2000) Maximum allowed number of transactions in a block. Allowed range [1, 100000].
EmptyBlocks (Optional, default to true) Allow empty block proposals with no transactions.
TransactionLifetime (Optional, default to 01:00:00) The maximum time period during which a transaction is considered valid to process from memory pool. A transaction older than the max lifetime is rejected by miyabi. Allowed range [00:10:00, 1.00:00:00].
ByzantineAssumption (Optional, default to true) Specify whether the blockchain operates in Byzantine or non-Byzantine mode, the quorum for the consensus algorithm is 2N/3 in Byzantine mode and N/2 in non-Byzantine mode, where N represents the number of consensus nodes.
EvidanceValidatorType (Optional, default to StandardEvidenceValidator) Specify the type of evidence validator. Miyabi can optionally operate with the BLSSharedSecretEvidenceValidator type as well.
MaxClockDrift (Optional, default to 00:00:10) Maximum amount of time drift allowed for the clock. It is Useful when comparing various timestamps that are generated by different machines in the network. Allowed range [00:00:01, 01:00:00].
NetworkName (Optional, default to an empty string) Name of the blockchain network. Allowed network name length [0, 100].
InitScript (Optional, default to an empty string) Specify the initial script that runs when the miyabi node starts for the first time. It includes initial transactions used to initialize the miyabi blockchain.
Extensions (Optional) Specify miyabi extensions to extend the functionality of a miyabi node.
BlockLimit (Optional) Parameter for specifying various block related limits.
MaxEntriesPerTransaction (Optional, default to 100) Maximum allowed number of entries per transaction. Transactions exceeding this limit will be rejected. Allowed range [1, 100000].
MaxTransactionByteSize (Optional, default to 1000000) Maximum allowed byte size of a transaction. Transactions exceeding this limit will be rejected. Allowed range [3000, INT_MAX].