genesis-operationis a setting for the genesis operation that is executed when the network is initialized.
genesis-operationcontains the contents of the block that is initially created.
Keys of the genesis account (key, weight, threshold)
Fee policy of the currency to be created
genesis-operations: - account-keys: keys: - publickey: rcrd3KA2wWNhKdAP8rHRzfRmgp91oR9mqopckyXRmCvGmpu weight: 100 threshold: 100 currencies: - balance: "99999999999999999999" currency: MCC new-account-min-balance: "33" type: genesis-currencies
$ openssl genrsa -out mitum.key 4096 $ openssl req -x509 -new -nodes -key mitum.key -sha256 -days 1024 -out mitum.crt
network: bind: https://0.0.0.0:54321 url: https://127.0.0.1:54321 cert-key: mitum.key cert: mitum.crt
rate limitcan be applied to the API service.
rate-limitapplied to these API services.
network: bind: https://0.0.0.0:54321 url: https://127.0.0.1:54321 rate-limit: cache: "memory:?prefix=showme" preset: bad-nodes: new-seal: 3/2m blockdata: 4/m 22.214.171.124: preset: bad-nodes 126.96.36.199/24: preset: bad-nodes blockdata: 5/m 127.0.0.1/24: preset: suffrage
cache: cache for requests. At this time, supports “memory:” and “redis://<redis server>”
memory: memory cache
redis://<redis server>: cached in redis server
preset: predefined rate limit settings.
worldpresets are already defined. See launch/config/ratelimit.go in the source code.
You can make your own rate limit setting like bad-nodes.
Rate-limit Settings for a specific IP
Rules consist of IP address (or IP address range),
The IP address can be a single value or a range of IP addresses expressed in CIDR notation. * example : 188.8.131.52, 184.108.40.206/24, 127.0.0.1/24
Rate limit can be set through
presetcan be pre-defined preset like
worldor user-defined preset like
Additional limit such as
blockdata: 5/mcan be added to the
Rules will be checked by the defined order from upper to lower.
The name of the API interface for Mitum, such as new-seal, used to set the limit can be found in RateLimitHandleMap (launch/config/ratelimit.go).
The name of the API interface for Mitum-currency can be found in RateLimitHandlerMap (digest/handler.go).
new-seal: 3/2m means new-seal interface allows 3 requests per 2 minutes to the specified IP or IP range.
See the manner of time duration.
Without any rules, by default no rate limit.
220.127.116.11/24: preset: bad-nodes blockdata: -1/m
18.104.22.168/24: preset: bad-nodes blockdata: 0/m
network idacts like an identifier that identifies a network.
storage: blockdata: path: ./mc-blockfs database: uri: mongodb://127.0.0.1:27017/mc
port numbershould be the same as that of when running docker.
n3nodes are included in the suffrage nodes, it can be set as follows.
suffrage: nodes: - n0sas - n1sas - n2sas - n3sas
n0node, which is a local node, is not included in the suffrage nodes, the local node becomes a None-suffrage node and serves only as a syncing node.
The Syncing node does not participate in consensus and only syncs the generated block data.
The None-suffrage node handles only the seal containing the operation.
The None-suffrage node does not process ballots and proposals related to voting between nodes.
When the None-suffrage node stores the operation seal, it broadcasts the seal to the suffrage nodes.
suffrage: nodes: - n1sas - n2sas - n3sas
address(alias for the address),
public key, and
url(ip address) of known nodes in the blockchain network.
If not written, it operates as a standalone node.
If the node is a suffrage node and the node discovery function is used, the
urlof the node is not required.
However, if the node is not a suffrage node, the ``url``s of the suffrage nodes must be included.
If certificate related settings are not made in Network config, the node uses self-signed certificate.
If other Mitum nodes use self-signed certificate,
tls-insecure: trueshould be set to all the nodes which use self-signed certificate.
(In case of suffrage node) nodes: - address: n1sas publickey: ktJ4Lb6VcmjrbexhDdJBMnXPXfpGWnNijacdxD2SbvRMmpu tls-insecure: true - address: n2sas publickey: wfVsNvKaGbzB18hwix9L3CEyk5VM8GaogdRT4fD3Z6Zdmpu tls-insecure: true - address: n3sas publickey: vAydAnFCHoYV6VDUhgToWaiVEtn5V4SXEFpSJVcTtRxbmpu tls-insecure: true
(If it is not a suffrage node) nodes: - address: n1sas publickey: ktJ4Lb6VcmjrbexhDdJBMnXPXfpGWnNijacdxD2SbvRMmpu url: https://127.0.0.1:54331 tls-insecure: true - address: n2sas publickey: wfVsNvKaGbzB18hwix9L3CEyk5VM8GaogdRT4fD3Z6Zdmpu url: https://127.0.0.1:54341 tls-insecure: true - address: n3sas publickey: vAydAnFCHoYV6VDUhgToWaiVEtn5V4SXEFpSJVcTtRxbmpu url: https://127.0.0.1:54351 tls-insecure: true
digest: network: bind: https://localhost:54320 url: https://localhost:54320 cert-key: mitum.key cert: mitum.crt
address: mc-nodesas privatekey: Kxt22aSeFzJiDQagrvfXPWbEbrTSPsRxbYm9BhNbNJTsrbPbFnPAmpr storage: database: uri: mongodb://127.0.0.1:27017/mc blockdata: path: ./mc-blockfs network-id: mitum network: bind: https://0.0.0.0:54321 url: https://127.0.0.1:54321 cert-key: mitum.key cert: mitum.crt genesis-operations: - type: genesis-currencies account-keys: keys: - publickey: rcrd3KA2wWNhKdAP8rHRzfRmgp91oR9mqopckyXRmCvGmpu weight: 100 threshold: 100 currencies: - balance: "99999999999999999999" currency: MCC new-account-min-balance: "33" feeer: type: fixed amount: 1 policy: threshold: 100 suffrage: nodes: - mc-nodesas digest: network: bind: https://0.0.0.0:54320 url: https://127.0.0.1:54320 cert-key: mitum.key cert: mitum.crt