Module-level declarations

Common logic for directory chain

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val COMPRESSED_ROOTS_CONFIG_KEY: text = "compressed_roots"
Link copied to clipboard
val DIRECTORY_CHAIN_CONFIG_KEY: text = "directory_chain"
Link copied to clipboard
val invalid_entity_message: text = "Entity name can only contain letters, numerals, underscores and must start with either a letter or numeral. Maximum allowed length is 64 characters."

Functions

Link copied to clipboard
Link copied to clipboard
function _require_provider_quota(quota: integer, quota_type: provider_quota_type, count: integer)
Link copied to clipboard
function _setup_provider_quotas(actions_per_day: integer, max_containers: integer)
Link copied to clipboard
function add_blockchain(base_configuration: byte_array, signers: list<byte_array>, name: text, container: container, system: boolean, state: blockchain_state): blockchain
Link copied to clipboard
function add_dependencies(raw_config: byte_array, brid: byte_array, height: integer)
Link copied to clipboard
function add_node_internal(provider: provider, node_data: register_node_data, require_not_exists: boolean): node
Link copied to clipboard
function add_node_to_cluster_internal(provider: provider, node: node, cluster: cluster)

If a provider is part of that cluster, and if provider do not already have a node in this cluster, add node as block signer to this cluster. blockchain_configuration_signers update is included.

Link copied to clipboard
@extendable function after_cluster_creation(provider: provider, cluster: cluster)
Link copied to clipboard
@extendable function after_cluster_operational(cluster: cluster)
Link copied to clipboard
@extendable function after_cluster_subnode_image_added(cluster: cluster, subnode_image: subnode_image)
Link copied to clipboard
@extendable function after_cluster_subnode_image_removed(cluster: cluster, subnode_image: subnode_image)
Link copied to clipboard
@extendable function after_cluster_updated(cluster: cluster)
Link copied to clipboard
@extendable function after_node_added(node: node)
Link copied to clipboard
@extendable function after_node_added_to_cluster(node: node, cluster: cluster)
Link copied to clipboard
@extendable function after_node_removed_from_cluster(node: node, cluster: cluster?)
Link copied to clipboard
@extendable function after_node_updated(node: node)
Link copied to clipboard
@extendable function after_provider_registered(provider: provider, cluster: cluster?)
Link copied to clipboard
@extendable function after_provider_updated(provider: provider)
Link copied to clipboard
@extendable function after_replica_node_added_to_cluster(node: node, cluster: cluster)
Link copied to clipboard
@extendable function after_replica_node_removed_from_cluster(node: node, cluster: cluster?)
Link copied to clipboard
@extendable function after_subnode_image_creation(subnode_image: subnode_image)
Link copied to clipboard
@extendable function after_subnode_image_updated(subnode_image: subnode_image)
Link copied to clipboard
@extendable function before_cluster_removal(cluster: cluster)
Link copied to clipboard
@extendable function before_delete_blockchain(blockchain: blockchain)
Link copied to clipboard
@extendable function before_node_removal(node: node)
Link copied to clipboard
@extendable function before_remove_container(container: container)
Link copied to clipboard
@extendable function before_store_blockchain_configuration(blockchain: blockchain, config_map: map<text, gtv>)
Link copied to clipboard
@extendable function before_system_container_removal(cluster: cluster)
Link copied to clipboard
@extend(on_begin_block) function begin_block(height: integer)
Link copied to clipboard
Link copied to clipboard

When all providers have provided a node each, cluster goes operational and stays operational even if a new provider is added to the cluster or a provider disables its node (if it is not the last node of the cluster).

Link copied to clipboard
function compress_and_store_configuration(blockchain: blockchain, height: integer, configuration: byte_array, overwrite: boolean)
Link copied to clipboard
function compress_root(root: map<text, gtv>, path: list<text>, compressed_keys: list<compressed_key>): map<text, gtv>
Link copied to clipboard
function create_cluster_impl(me: provider, name: text, governor: voter_set, providers: list<byte_array>, cluster_creation_data: cluster_creation_data): cluster
Link copied to clipboard
function create_container_impl(me: provider, name: text, cluster: cluster, consensus_threshold: integer, deployers: list<byte_array>, container_units: integer, max_blockchains: integer, extra_storage: integer, extra_compute_requests: integer): container
Link copied to clipboard
function create_container_with_limits(me: provider, name: text, cluster: cluster, voter_set: voter_set, container_units: integer, max_blockchains: integer, extra_storage: integer, extra_compute_requests: integer): container
Link copied to clipboard
function create_system_container(me: provider, name: text, cluster: cluster, voter_set: voter_set): container
Link copied to clipboard
function current_provider_rate_limit(provider: provider, current_timestamp: integer): (current_points: integer, max_points: integer, update_time: integer)
Link copied to clipboard
Link copied to clipboard
function decompress_root(root: map<text, gtv>, path: list<text>, compressed_keys: list<compressed_key>): map<text, gtv>
Link copied to clipboard
function disable_provider(provider: provider)
Link copied to clipboard
function enable_provider(provider: provider)
Link copied to clipboard
function extract_config_delay(config_map: map<text, gtv>): integer?
Link copied to clipboard
@extend(after_node_added_to_cluster) function (node: node, cluster: cluster)
Link copied to clipboard
@extend(after_replica_node_added_to_cluster) function (node: node, cluster: cluster)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function get_blockchain_configuration(blockchain_rid: byte_array, height: integer): (base_config: byte_array, signers: list<byte_array>, config_hash: byte_array)?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function get_cluster_for_blockchain(blockchain_rid: byte_array): cluster
Link copied to clipboard
function get_config_map(raw_config: byte_array): map<text, gtv>
Link copied to clipboard
Link copied to clipboard
function get_dependencies(config_map: map<text, gtv>): list<(text, byte_array)>
Link copied to clipboard
function get_latest_blockchain_configuration_data(blockchain: blockchain): (height: integer, config: byte_array)
function get_latest_pending_blockchain_configuration_data(blockchain: blockchain): (minimum_height: integer, base_config: byte_array, signers: byte_array)?
Link copied to clipboard
function get_pending_blockchain_configuration(blockchain: blockchain, height: integer): list<(base_config: byte_array, signers: list<byte_array>, minimum_height: integer)>
function get_pending_blockchain_configuration_by_hash(blockchain: blockchain, config_hash: byte_array): (base_config: byte_array, signers: list<byte_array>, minimum_height: integer)?
Link copied to clipboard
function get_signers_for_configuration(blockchain: blockchain, height: integer): gtv
Link copied to clipboard
Link copied to clipboard
function initialize_module(initial_provider: byte_array, genesis_node: node_info, system_anchoring_config: byte_array, cluster_anchoring_config: byte_array, majority_threshold: integer, provider_quota_max_containers: integer)
Link copied to clipboard
function is_alive(blockchain: blockchain): boolean
Link copied to clipboard
@extendable function is_container_available_for_removal(container: container): text?
Link copied to clipboard
Link copied to clipboard
function make_config_unique(config_data: byte_array): byte_array
Link copied to clipboard
Link copied to clipboard
@extendable function on_configuration_updated(message: configuration_updated)
Link copied to clipboard
function provider_rate_limit(provider: provider, cost: integer)

Recover provider's action points and consume cost, if possible

Link copied to clipboard
@extend(receive_icmf_message) function receive_configuration_failed(sender: byte_array, topic: text, body: gtv)
Link copied to clipboard
@extend(receive_icmf_message) function receive_configuration_updated(sender: byte_array, topic: text, body: gtv)
Link copied to clipboard
Link copied to clipboard
@extendable function register_and_enable_provider(provider_info: provider_info, provider_tier: provider_tier, cluster: cluster?, voter_set: voter_set?, enabled_by_default: boolean)
Link copied to clipboard
function remove_blockchain(blockchain: blockchain)
Link copied to clipboard
function remove_cluster_impl(cluster: cluster)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function remove_container_impl(container: container)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function require_blockchain(blockchain_rid: byte_array, allowed_states: list<blockchain_state>?): blockchain
Link copied to clipboard
function require_blockchain_rid(blockchain_rid: byte_array)
Link copied to clipboard
function require_cluster(name: text): cluster
Link copied to clipboard
function require_cluster_container_units(cluster: cluster, wanted_container_units: integer)
Link copied to clipboard
function require_cluster_extra_storage(cluster: cluster, wanted_extra_storage: integer)
Link copied to clipboard
function require_cluster_governor(cluster: cluster, provider: provider)
Link copied to clipboard
function require_cluster_quotas(cluster: cluster, wanted_container_units: integer, wanted_extra_storage: integer)
Link copied to clipboard
function require_cluster_units_for_node(cluster: cluster, node: node)
Link copied to clipboard
function require_clusters(names: list<text>): list<cluster>
Link copied to clipboard
Link copied to clipboard
function require_container_deployer(container: container, provider: provider)
Link copied to clipboard
Link copied to clipboard
function require_container_units(container: container, new_container_units: integer)
Link copied to clipboard
function require_extra_storage(container: container, new_extra_storage: integer)
Link copied to clipboard
function require_extra_storage_for_node(cluster: cluster, node: node)
Link copied to clipboard

Requires given pubkey is a provider, is signing transaction, is active and not exceeds limit.

Link copied to clipboard
function require_is_signer(pubkey: byte_array)
Link copied to clipboard
Link copied to clipboard
function require_max_blockchains(container: container, new_max_blockchains: integer)
Link copied to clipboard
function require_node(pubkey: byte_array, include_disabled: boolean): node
Link copied to clipboard
function require_node_provider(node_pubkey: byte_array, provider_pubkey: byte_array): node
Link copied to clipboard
Link copied to clipboard
function require_provider_auth(provider: provider, provider_key_roles: list<provider_key_role>): provider

Requires given pubkey is an active provider which is signing the transaction.

Link copied to clipboard
function require_provider_auth_with_rate_limit(provider: provider, provider_key_roles: list<provider_key_role>, cost: integer): provider

Requires given provider is signing transaction, is active and not exceeds limit.

Link copied to clipboard
function require_provider_iccf_auth(tx_to_prove: gtx_transaction, op_index: integer, op_name: text, op_arg_count: integer, provider: provider): list<gtv>

Requires given provider to authenticate using ICCF.

function require_provider_iccf_auth_from_operations(all_operations: list<gtx_operation>, tx_to_prove: gtx_transaction, op_index: integer, op_name: text, op_arg_count: integer, provider: provider, should_update_state: boolean): list<gtv>

Requires given provider to authenticate using ICCF.

Link copied to clipboard
function require_provider_quota(provider: provider, quota_type: provider_quota_type)
function require_provider_with_iccf_proof_and_rate_limit(tx_to_prove: gtx_transaction, op_index: integer, op_name: text, op_arg_count: integer, provider: provider): list<gtv>

Requires given provider to authenticate this transaction, is active and not exceeds limit.

Link copied to clipboard
function require_pubkey(pubkey: byte_array)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function require_system_p_member(provider: provider)
Link copied to clipboard
function require_unique_blockchain(name: text, base_configuration: byte_array, signers: list<byte_array>): byte_array
Link copied to clipboard
Link copied to clipboard
function require_voter_set_governor(voter_set: voter_set, provider: provider)
Link copied to clipboard
function require_voter_set_member(voter_set: voter_set, provider: provider)
Link copied to clipboard
Link copied to clipboard
function store_configuration(blockchain: blockchain, height: integer, configuration: byte_array, overwrite: boolean)
Link copied to clipboard
function update_configuration_signers(cluster: cluster, excluded_node: node?)
Link copied to clipboard
Link copied to clipboard
function update_configuration_signers_regular(blockchain: blockchain, signers: list<byte_array>, excluded_signer: byte_array?)
Link copied to clipboard
function upgrade_container(container: container, container_units: integer, extra_storage: integer, max_blockchains: integer, extra_compute_requests: integer)
Link copied to clipboard
function validate_dependencies(config_map: map<text, gtv>): boolean
Link copied to clipboard
function validate_entity_name(name: text)
Link copied to clipboard
function validate_host(host: text)
Link copied to clipboard
function validate_list_of_classes(parameter_name: text, value: text)
Link copied to clipboard
function validate_metadata_text(parameter_name: text, value: text)
Link copied to clipboard
function validate_node_url(url: text)
Link copied to clipboard
function validate_territory_code(territory: text)
Link copied to clipboard
function validate_url(url: text)