BTFS Node Configuration
In the file explorer window, navigate to your
.btfs folder. This is the directory in which you set your BTFS Path. There should be a
config file, which governs the configuration settings for your BTFS node. Open this config file in your preferred text editor. The following is an explanation of the configuration parameters.
The two parameters are
PrivKey. PeerID refers to the Identity information of your node, while PrivKey is the node’s base64-encoded protobuf describing the node’s private key. This is immutable.
The Datastore config option configures the on-disk storage system.
StorageMax refers to the soft upper limit on size of your BTFS repository’s datastore.
StorageGCWatermark refers to the percentage of
StorageMax value at which garbage collection is automatically triggered if the BTFS node was run with automatic garbage collection enabled (default is false).
GCPeriodrefers to the time duration specifying frequency of running garbage collection.
The three address types are
Gateway. Swarm addresses are what the node uses to listen for connections from other BTFS peers. These addresses should be accessible from outside machines (i.e. no firewalls blocking). API addresses are the local IP addresses in which you can send API commands to the BTFS node. These addresses should not be accessible via outside machines. The Gateway address is the address in which users can make HTTP requests into the BTFS network.
MDNS refers to multicast DNS peer discovery, which is useful for enabling peer discovery on the local network. Routing type dht refers to distributed hash tables. If you change
Type value to
dhtclient, it makes your node not a DHT node (which means it doesn’t serve requests to the BTFS network) and helps to reduce memory, CPU usage, and bandwidth usage.
This config array specified a list of BTFS peers your node will connect to on startup.
Assuming gateway address is opened in the
Addresses config, this config manages the gateway options. By default, the HTTP only supports the GET method, which allows users to fetch data via the hash, but if
Writeable flag is enabled, then users can also use POST, PUT, and DELETE methods. This allows clients to add data to the BTFS network. Enable this by setting
Under the connection manager configurator (
Swarm.ConnMgr), there are the four parameters of
GracePeriod. This is where you can manage the number of peer connections to your node.
LowWater refers to the minimum number of peer connections to try and maintain.
HighWater refers to the connection threshold that, when exceeeded, triggers a garbage cleanup (drop connections).
GracePeriodrefers to the time duration that new connections are immune from being closed by the connection manager.
This config has the two parameters of
Intervalcontrols the time between rounds of re-providing local content to the routing system. For example, if you set
Interval to “0”, it will disable content reproviding, which results in other nodes on the network not being able to discover the objects in your file repository.
Strategy can take values of “all”, “pinned”, or “roots”.
"all" announces all stored data,
"pinned" announces only pinned data, and
"roots" announces directly pinned keys and root keys of recursive pins.
Routing config, adjust
dhtclient. This helps to reduce DHT traffic, which in turn should help reduce bandwidth usage.
Thanks for your interest of being a TRON Contributor at Tron2Moon.com. As you know, you can freely post your article to Tron2Moon.com and get 1000 to...
Here is the list of all contributors who join the first airdrop organized by Tron2Moon. Our token (T2M) is now on TronScan and on MainNet. For more i...
This is the Tron smart contract written in Solidity for the game Loe Dei. I hope this will bring transparency to my betting dapp. Please try to play ...
The Competitive Gaming Ecosystem that IGG is building is going to get hot after CoinMarketCap listed IG-Gold from 27th June 2019. Intergalactic-Ga...