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.
If you are creating dapp on the Tron blockchain, you properly will face one issue with Event Watcher using TronWeb. The issue is the watch() promise ...
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 ...
TronBet, the number 1 betting DApp on the Tron blockchain will introduce Sports Betting to the public after the success of its platform. TronBet curr...
Team Tron2Moon proudly announces that we successfully created a torrent ranking tool for all BitTorrent users. You can find the tool at: https://www....