misc: use ~/.local/share/darkfi for app storage

This commit is contained in:
skoupidi
2025-01-13 15:25:15 +02:00
parent 7b4aea3f2b
commit a76b9526bc
30 changed files with 62 additions and 62 deletions

View File

@@ -15,7 +15,7 @@ network = "testnet"
rpc_listen = "tcp://127.0.0.1:8240"
# Path to the blockchain database directory
database = "~/.local/darkfi/darkfid/localnet"
database = "~/.local/share/darkfi/darkfid/localnet"
# Confirmation threshold, denominated by number of blocks
threshold = 3
@@ -124,7 +124,7 @@ localnet = true
rpc_listen = "tcp://127.0.0.1:8340"
# Path to the blockchain database directory
database = "~/.local/darkfi/darkfid/testnet"
database = "~/.local/share/darkfi/darkfid/testnet"
# Confirmation threshold, denominated by number of blocks
threshold = 6
@@ -232,7 +232,7 @@ localnet = false
rpc_listen = "tcp://127.0.0.1:8440"
# Path to the blockchain database directory
database = "~/.local/darkfi/darkfid/mainnet"
database = "~/.local/share/darkfi/darkfid/mainnet"
# Confirmation threshold, denominated by number of blocks
threshold = 11

View File

@@ -82,7 +82,7 @@ pub struct BlockchainNetwork {
/// JSON-RPC listen URL
rpc_listen: Url,
#[structopt(long, default_value = "~/.local/darkfi/darkfid/localnet")]
#[structopt(long, default_value = "~/.local/share/darkfi/darkfid/localnet")]
/// Path to blockchain database
database: String,

View File

@@ -12,10 +12,10 @@ autojoin = [
## P2P network settings
[net]
## Path to the P2P datastore
datastore = "~/.local/darkfi/darkirc"
datastore = "~/.local/share/darkfi/darkirc"
## Path to a configured hostlist for saving known peers
hostlist = "~/.local/darkfi/darkirc/p2p_hostlist.tsv"
hostlist = "~/.local/share/darkfi/darkirc/p2p_hostlist.tsv"
## Whitelisted transports for outbound connections
allowed_transports = ["tcp+tls"]

View File

@@ -12,10 +12,10 @@ autojoin = [
## P2P network settings
[net]
## Path to the P2P datastore
datastore = "~/.local/darkfi/darkirc"
datastore = "~/.local/share/darkfi/darkirc"
## Path to a configured hostlist for saving known peers
hostlist = "~/.local/darkfi/darkirc/p2p_hostlist.tsv"
hostlist = "~/.local/share/darkfi/darkirc/p2p_hostlist.tsv"
## connection settings
outbound_connect_timeout = 60

View File

@@ -12,10 +12,10 @@ autojoin = [
## P2P network settings
[net]
## Path to the P2P datastore
datastore = "~/.local/darkfi/darkirc"
datastore = "~/.local/share/darkfi/darkirc"
## Path to a configured hostlist for saving known peers
hostlist = "~/.local/darkfi/darkirc/p2p_hostlist.tsv"
hostlist = "~/.local/share/darkfi/darkirc/p2p_hostlist.tsv"
## connection settings
outbound_connect_timeout = 60

View File

@@ -5,7 +5,7 @@ rpc_listen = "127.0.0.1:1234"
irc_listen = "127.0.0.1:11067"
## Sets Datastore Path
datastore = "~/.config/darkirc-inbound"
datastore = "~/.config/darkfi/darkirc-inbound"
## Raft net settings
[net]

View File

@@ -5,7 +5,7 @@ rpc_listen = "127.0.0.1:7777"
irc_listen = "127.0.0.1:11066"
## Sets Datastore Path
datastore = "~/.config/darkirc-outbound"
datastore = "~/.config/darkfi/darkirc-outbound"
## Raft net settings
[net]

View File

@@ -5,7 +5,7 @@ rpc_listen = "127.0.0.1:8000"
irc_listen = "127.0.0.1:11065"
## Sets Datastore Path
datastore = "~/.config/darkirc-seed"
datastore = "~/.config/darkfi/darkirc-seed"
## Raft net settings
[net]

View File

@@ -14,10 +14,10 @@
#irc_tls_secret = "/etc/letsencrypt/darkirc/privkey.pem"
## Sets Datastore Path
#datastore = "~/.local/darkfi/darkirc/darkirc_db"
#datastore = "~/.local/share/darkfi/darkirc/darkirc_db"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/darkirc/replayed_darkirc_db"
#replay_datastore = "~/.local/share/darkfi/darkirc/replayed_darkirc_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)
@@ -48,10 +48,10 @@ autojoin = [
# P2P network settings
[net]
# Path to the P2P datastore
p2p_datastore = "~/.local/darkfi/darkirc"
p2p_datastore = "~/.local/share/darkfi/darkirc"
# Path to a configured hostlist for saving known peers
hostlist = "~/.local/darkfi/darkirc/p2p_hostlist.tsv"
hostlist = "~/.local/share/darkfi/darkirc/p2p_hostlist.tsv"
## P2P accept addresses
#inbound = ["tcp+tls://0.0.0.0:26661", "tcp+tls://[::]:26661"]

View File

@@ -89,11 +89,11 @@ struct Args {
/// Optional TLS certificate key file path if `irc_listen` uses TLS
irc_tls_secret: Option<String>,
#[structopt(short, long, default_value = "~/.local/darkfi/darkirc_db")]
#[structopt(short, long, default_value = "~/.local/share/darkfi/darkirc_db")]
/// Datastore (DB) path
datastore: String,
#[structopt(short, long, default_value = "~/.local/darkfi/replayed_darkirc_db")]
#[structopt(short, long, default_value = "~/.local/share/darkfi/replayed_darkirc_db")]
/// Replay logs (DB) path
replay_datastore: String,

View File

@@ -15,7 +15,7 @@ fun = true
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to wallet database
wallet_path = "~/.local/darkfi/drk/localnet/wallet.db"
wallet_path = "~/.local/share/darkfi/drk/localnet/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
@@ -26,7 +26,7 @@ endpoint = "tcp://127.0.0.1:8240"
# Testnet blockchain network configuration
[network_config."testnet"]
# Path to wallet database
wallet_path = "~/.local/darkfi/drk/testnet/wallet.db"
wallet_path = "~/.local/share/darkfi/drk/testnet/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
@@ -37,7 +37,7 @@ endpoint = "tcp://127.0.0.1:8340"
# Mainnet blockchain network configuration
[network_config."mainnet"]
# Path to wallet database
wallet_path = "~/.local/darkfi/drk/mainnet/wallet.db"
wallet_path = "~/.local/share/darkfi/drk/mainnet/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"

View File

@@ -549,7 +549,7 @@ enum ContractSubcmd {
#[derive(Clone, Debug, serde::Deserialize, structopt::StructOpt, structopt_toml::StructOptToml)]
#[structopt()]
struct BlockchainNetwork {
#[structopt(long, default_value = "~/.local/darkfi/drk/localnet/wallet.db")]
#[structopt(long, default_value = "~/.local/share/darkfi/drk/localnet/wallet.db")]
/// Path to wallet database
wallet_path: String,

View File

@@ -80,7 +80,7 @@ struct Args {
/// Set log file path to output daemon logs into
log: Option<String>,
#[structopt(long, default_value = "~/.local/share/fud")]
#[structopt(long, default_value = "~/.local/share/darkfi/fud")]
/// Base directory for filesystem storage
base_dir: String,
@@ -174,7 +174,7 @@ impl Fud {
// Returns the paths to the local chunks of the file, if found/fetched.
//
// --> {"jsonrpc": "2.0", "method": "get", "params": ["1211...abfd"], "id": 42}
// <-- {"jsonrpc": "2.0", "result: ["~/.local/share/fud/chunks/fab1...2314", ...], "id": 42}
// <-- {"jsonrpc": "2.0", "result: ["~/.local/share/darkfi/fud/chunks/fab1...2314", ...], "id": 42}
async fn get(&self, id: u16, params: JsonValue) -> JsonResult {
let params = params.get::<Vec<JsonValue>>().unwrap();
if params.len() != 1 || !params[0].is_string() {

View File

@@ -5,10 +5,10 @@
#nickname="NICKNAME"
## Sets Datastore Path
#datastore = "~/.local/darkfi/genev_db"
#datastore = "~/.local/share/darkfi/genev_db"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_darkirc_db"
#replay_datastore = "~/.local/share/darkfi/replayed_darkirc_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -58,11 +58,11 @@ struct Args {
pub net: SettingsOpt,
/// Sets Datastore Path
#[structopt(long, default_value = "~/.local/darkfi/genev_db")]
#[structopt(long, default_value = "~/.local/share/darkfi/genev_db")]
pub datastore: String,
/// Replay logs (DB) path
#[structopt(short, long, default_value = "~/.local/darkfi/replayed_genev_db")]
#[structopt(short, long, default_value = "~/.local/share/darkfi/replayed_genev_db")]
replay_datastore: String,
/// Flag to store Sled DB instructions

View File

@@ -16,8 +16,8 @@
#peers = []
#version = "0.4.1"
#localnet = false
#hostlist ="~/.local/darkfi/lilith/darkfid_sync/hostlist.tsv"
#datastore = "~/.local/darkfi/lilith/darkfid_sync"
#hostlist ="~/.local/share/darkfi/lilith/darkfid_sync/hostlist.tsv"
#datastore = "~/.local/share/darkfi/lilith/darkfid_sync"
#[network."darkfid_consensus_v4"]
#accept_addrs = ["tcp+tls://0.0.0.0:33023"]
@@ -25,8 +25,8 @@
#peers = []
#version = "0.4.1"
#localnet = false
#datastore = "~/.local/darkfi/lilith/darkfid_consensus"
#hostlist ="~/.local/darkfi/lilith/darkfid_consensus/hostlist.tsv"
#datastore = "~/.local/share/darkfi/lilith/darkfid_consensus"
#hostlist ="~/.local/share/darkfi/lilith/darkfid_consensus/hostlist.tsv"
#[network."darkirc_v4"]
#accept_addrs = ["tcp+tls://0.0.0.0:25551"]
@@ -34,8 +34,8 @@
#peers = []
#version = "0.4.1"
#localnet = false
#datastore = "~/.local/darkfi/lilith/darkirc"
#hostlist ="~/.local/darkfi/lilith/darkirc/hostlist.tsv"
#datastore = "~/.local/share/darkfi/lilith/darkirc"
#hostlist ="~/.local/share/darkfi/lilith/darkirc/hostlist.tsv"
#[network."taud_v4"]
#accept_addrs = ["tcp+tls://0.0.0.0:23331"]
@@ -43,5 +43,5 @@
#peers = []
#version = "0.4.1"
#localnet = false
#datastore = "~/.local/darkfi/lilith/taud"
#hostlist ="~/.local/darkfi/lilith/taud/hostlist.tsv"
#datastore = "~/.local/share/darkfi/lilith/taud"
#hostlist ="~/.local/share/darkfi/lilith/taud/hostlist.tsv"

View File

@@ -671,7 +671,7 @@ Examples:
return 0
elif sys.argv[1] == "export":
if len(sys.argv) == 2:
path = "~/.local/darkfi"
path = "~/.local/share/darkfi"
else:
path = sys.argv[2]
if await api.export_to(path, server_name, port):
@@ -679,7 +679,7 @@ Examples:
return 0
elif sys.argv[1] == "import":
if len(sys.argv) == 2:
path = "~/.local/darkfi"
path = "~/.local/share/darkfi"
else:
path = sys.argv[2]
if await api.import_from(path, server_name, port):

View File

@@ -39,11 +39,11 @@ pub struct Args {
pub rpc_listen: Url,
/// Sets Datastore Path
#[structopt(long, default_value = "~/.local/darkfi/taud_db")]
#[structopt(long, default_value = "~/.local/share/darkfi/taud_db")]
pub datastore: String,
/// Replay logs (DB) path
#[structopt(long, default_value = "~/.local/darkfi/replayed_taud_db")]
#[structopt(long, default_value = "~/.local/share/darkfi/replayed_taud_db")]
pub replay_datastore: String,
/// Flag to store Sled DB instructions

View File

@@ -5,10 +5,10 @@
#rpc_listen="tcp://127.0.0.1:23330"
## Datastore Path
#datastore = "~/.local/darkfi/taud_db"
#datastore = "~/.local/share/darkfi/taud_db"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)
@@ -49,10 +49,10 @@ write_public_key = "Fgsc8tep4KX3Rb2drq8RxMyrHFWQ7wZaZPpF9F3GQYFG"
# P2P network settings
[net]
# Path to the P2P datastore
p2p_datastore = "~/.local/darkfi/taud"
p2p_datastore = "~/.local/share/darkfi/taud"
# Path to a configured hostlist for saving known peers
hostlist = "~/.local/darkfi/taud/hostlist.tsv"
hostlist = "~/.local/share/darkfi/taud/hostlist.tsv"
## P2P accept addresses
#inbound = ["tcp+tls://0.0.0.0:23331", "tcp+tls://[::]:23331"]

View File

@@ -8,7 +8,7 @@ rpc_listen="tcp://127.0.0.1:23340"
datastore = "seed"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -8,7 +8,7 @@ rpc_listen="tcp://127.0.0.1:23341"
datastore = "taud1"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -8,7 +8,7 @@ rpc_listen="tcp://127.0.0.1:23342"
datastore = "taud2"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -8,7 +8,7 @@ rpc_listen="tcp://127.0.0.1:23343"
datastore = "taud3"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -8,7 +8,7 @@ rpc_listen="tcp://127.0.0.1:23344"
datastore = "taud4"
## Sets DB logs replay datastore path
#replay_datastore = "~/.local/darkfi/replayed_taud_db"
#replay_datastore = "~/.local/share/darkfi/replayed_taud_db"
## Run in replay mode to store Sled DB instructions
## (for eventgraph debugging tool)

View File

@@ -83,7 +83,7 @@ connect to seed`.
3. You can set a peer such as `tcp+tls://example_peer:26661` in your
config file. Ask in the telegram community channel for an active peer
(here we are using a fake peer called `example_peer`. Then open the
config file at `~/.local/config/darkirc_config.toml` and modify the `peers`
config file at `~/.config/darkfi/darkirc_config.toml` and modify the `peers`
field with the provided peer as follows:
```
@@ -99,7 +99,7 @@ This is possible via a list of hosts that your darkirc node keeps locally.
You can inspect the hostlist as follows:
```
cat ~/.local/darkfi/darkirc/hostlist.tsv
cat ~/.local/share/darkfi/darkirc/hostlist.tsv
```
If the list is empty, open `~/.config/darkfi/darkirc_config` and ensure
@@ -108,7 +108,7 @@ that the `hostlist` field is set with a path of your choosing.
For example:
```
hostlist = "~/.local/darkfi/darkirc/hostlist.tsv"
hostlist = "~/.local/share/darkfi/darkirc/hostlist.tsv"
```
<u><b>Note</b></u>: If you are editing a line that is commented out, don't forget
@@ -154,7 +154,7 @@ we'll delete the directory:
If you see a many rapid `EventReq` messages in the log, it is possible that there is
an incompatibility with your local `darkirc` database and the state of the network.
This can be resolved by deleting `~/.local/darkfi/darkirc_db/`
This can be resolved by deleting `~/.local/share/darkfi/darkirc_db/`
This is a known bug and we are working on a fix.
@@ -281,7 +281,7 @@ If you receive DAG sync issues, verify:
2. There are hosts in the hostlists (you should get hostlists from the
default seed on the first run). You can find the hostlist files within
the respective apps' repo. For example `darkirc`'s default hostlist location
is `~/.local/darkfi/darkirc/hostlist.tsv`.
is `~/.local/share/darkfi/darkirc/hostlist.tsv`.
### Error reporting

View File

@@ -76,11 +76,11 @@ struct Args {
/// JSON-RPC server listen address
json_rpc_listen: Url,
#[structopt(short, long, default_value = "~/.local/darkfi/evgrd_db")]
#[structopt(short, long, default_value = "~/.local/share/darkfi/evgrd_db")]
/// Datastore (DB) path
datastore: String,
#[structopt(short, long, default_value = "~/.local/darkfi/replayed_evgrd_db")]
#[structopt(short, long, default_value = "~/.local/share/darkfi/replayed_evgrd_db")]
/// Replay logs (DB) path
replay_datastore: String,

View File

@@ -1,4 +1,4 @@
[net]
datastore = "~/.local/darkfi/evgrd"
hostlist = "~/.local/darkfi/evgrd/p2p_hostlist.tsv"
datastore = "~/.local/share/darkfi/evgrd"
hostlist = "~/.local/share/darkfi/evgrd/p2p_hostlist.tsv"

View File

@@ -43,7 +43,7 @@ pub struct Privmsg {
async fn amain() -> Result<()> {
info!("Instantiating event DAG");
let ex = std::sync::Arc::new(smol::Executor::new());
let datastore = expand_path("~/.local/darkfi/evgrd-test-client")?;
let datastore = expand_path("~/.local/share/darkfi/evgrd-test-client")?;
fs::create_dir_all(&datastore).await?;
let sled_db = sled::open(datastore)?;

View File

@@ -10,7 +10,7 @@
rpc_listen = "tcp://127.0.0.1:14567"
# Path to daemon database
db_path = "~/.local/darkfi/blockchain-explorer/daemon.db"
db_path = "~/.local/share/darkfi/blockchain-explorer/daemon.db"
# Password for the daemon database
db_pass = "changeme"

View File

@@ -74,7 +74,7 @@ struct Args {
/// JSON-RPC listen URL
rpc_listen: Url,
#[structopt(long, default_value = "~/.local/darkfi/blockchain-explorer/daemon.db")]
#[structopt(long, default_value = "~/.local/share/darkfi/blockchain-explorer/daemon.db")]
/// Path to daemon database
db_path: String,