From a08e1d767b1286380995ac0f4286fc2d1bb3810c Mon Sep 17 00:00:00 2001 From: Leonardo Nerone Date: Thu, 18 Aug 2022 13:51:33 -0300 Subject: [PATCH 1/3] fix(docs): fix small typos and wording --- CODE_OF_CONDUCT.md | 4 ++-- README.md | 16 ++++++++-------- src/farcasterd/opts.rs | 2 +- src/opts.rs | 2 +- src/peerd/opts.rs | 2 +- src/swapd/opts.rs | 2 +- src/syncerd/opts.rs | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index dd424962e..8687f5780 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,5 +1,5 @@ # Code of Conduct -Out code of conduct is not to have a code of conduct. Restriction is the word +Our code of conduct is not to have a code of conduct. Restriction is the word of sin: free people writing free code take their own decisions and act in a -way they like; taking all responsibility for the consequences. +way they like, taking all responsibility for the consequences. diff --git a/README.md b/README.md index 55d357169..ca36b605e 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,18 @@ :warning: **THIS IS EVOLVING, EXPERIMENTAL TECH, USE ON MAINNET AT YOUR OWN RISK** -The **Farcaster Node** is _a collection of microservices for running cross-chain atomic swaps_. Currently the node is focused on Bitcoin-Monero atomic swaps, but is designed to be flexible and integrate new crypto-pairs in the future. +The **Farcaster Node** is _a collection of microservices for running cross-chain atomic swaps_. Currently, the node is focused on Bitcoin-Monero atomic swaps, but it is designed to be flexible and integrate new crypto-pairs in the future. Microservices currently implemented: -- **farcasterd** (1 instance): the swap manager, it is aware of every initiated swap and interconnects all the other microservices, launches and kills other microservices, exposes an API for the swap-cli client +- **farcasterd** (1 instance): the swap manager, it is aware of every initiated swap and interconnects all the other microservices, launches and kills other microservices, and exposes an API for the swap-cli client - **swapd** (1 instance per swap): control centre for an individual swap -- keeps track of the swap's state as it runs the protocol's state machine, and orchestrates the swap with peerd for communicating with swap counterparty, walletd for signing, and syncers for blockchain interactions. -- **walletd** (1 instance): where secret keys live, where transactions are signed, coordinates with swapd -- **swap-cli** stateless terminal client (=executes a single command and terminates) that commands farcasterd, for taking or making offers, for example -- **peerd** (1 instance per peer connection): handles the connection to an individual peer, -- **syncerd** (1 instance per blockchain, i.e. one for monero and one for bitcoin): interface for getting updates of the blockchain and for broadcasting transactions -- **databased** (1 instance): interface for storing data persistently across restart -- **grpcd** (1 instance): interface for exposing node interfaces as a gRPC endpoint +- **walletd** (1 instance): where secret keys live, where transactions are signed, and coordinates with swapd. +- **swap-cli**: stateless terminal client (=executes a single command and terminates) that commands farcasterd, for taking or making offers, for example. +- **peerd** (1 instance per peer connection): handles the connection to an individual peer. +- **syncerd** (1 instance per blockchain, i.e. one for monero and one for bitcoin): interface for getting updates of the blockchain and for broadcasting transactions. +- **databased** (1 instance): interface for storing data persistently across restart. +- **grpcd** (1 instance): interface for exposing node interfaces as a gRPC endpoint. Farcaster Node is build on atomic swap primitives described in the [RFCs](https://github.com/farcaster-project/RFCs) and implemented in [Farcaster Core](https://github.com/farcaster-project/farcaster-core). diff --git a/src/farcasterd/opts.rs b/src/farcasterd/opts.rs index 67bcb838b..9093cc71d 100644 --- a/src/farcasterd/opts.rs +++ b/src/farcasterd/opts.rs @@ -18,7 +18,7 @@ pub const FARCASTER_CONFIG: &str = "{data_dir}/farcasterd.toml"; /// Farcaster node management daemon; part of Farcaster Node /// -/// The daemon is controlled though ZMQ ctl socket (see `ctl-socket` argument +/// The daemon is controlled through ZMQ ctl socket (see `ctl-socket` argument /// description) #[derive(Parser, Clone, PartialEq, Eq, Debug)] #[clap(name = "farcasterd", bin_name = "farcasterd", author, version)] diff --git a/src/opts.rs b/src/opts.rs index 9c3d6626c..be5da92b9 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -86,7 +86,7 @@ pub struct Opts { /// ZMQ socket name/address for daemon control interface /// - /// Internal interface for control PRC protocol communications. Defaults + /// Internal interface for control RPC protocol communications. Defaults /// to `ctl.rpc` file inside `--data-dir` directory. #[clap( short = 'x', diff --git a/src/peerd/opts.rs b/src/peerd/opts.rs index d74364de8..5eb491af3 100644 --- a/src/peerd/opts.rs +++ b/src/peerd/opts.rs @@ -27,7 +27,7 @@ use internet2::addr::{LocalNode, NodeAddr}; /// `msg.rpc` file inside the data directory from `--data-dir`). It also /// forwards messages from the same socket to the remote peer. /// -/// The daemon is controlled though ZMQ ctl socket (see `ctl-socket` argument +/// The daemon is controlled through ZMQ ctl socket (see `ctl-socket` argument /// description) #[derive(Parser, Clone, PartialEq, Eq, Debug)] #[clap( diff --git a/src/swapd/opts.rs b/src/swapd/opts.rs index b21d88057..90c599a6d 100644 --- a/src/swapd/opts.rs +++ b/src/swapd/opts.rs @@ -18,7 +18,7 @@ use std::str::FromStr; /// Swap executor daemon; part of Farcaster Node /// -/// The daemon is controlled though ZMQ ctl socket (see `ctl-socket` argument +/// The daemon is controlled through ZMQ ctl socket (see `ctl-socket` argument /// description) #[derive(Parser, Clone, PartialEq, Eq, Debug)] #[clap(name = "swapd", bin_name = "swapd", author, version)] diff --git a/src/syncerd/opts.rs b/src/syncerd/opts.rs index ab9b6d460..64d23f921 100644 --- a/src/syncerd/opts.rs +++ b/src/syncerd/opts.rs @@ -17,7 +17,7 @@ use std::str::FromStr; /// Syncer blockchain management daemon; part of Farcaster Node /// -/// The daemon is controlled though ZMQ ctl socket (see `ctl-socket` argument +/// The daemon is controlled through ZMQ ctl socket (see `ctl-socket` argument /// description) #[derive(Parser, Clone, PartialEq, Eq, Debug)] #[clap(name = "syncerd", bin_name = "syncerd", author, version)] From a1f3cf22343cc93882bbdc30a611b0edecc3ab11 Mon Sep 17 00:00:00 2001 From: Leonardo Nerone Date: Thu, 18 Aug 2022 13:51:54 -0300 Subject: [PATCH 2/3] feat(fish): generate shell completions for Fish shell --- build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/build.rs b/build.rs index 31f8fc062..d495674ae 100644 --- a/build.rs +++ b/build.rs @@ -70,6 +70,7 @@ fn main() -> Result<(), configure_me_codegen::Error> { generate_to(Bash, app, &name, &outdir)?; generate_to(PowerShell, app, &name, &outdir)?; generate_to(Zsh, app, &name, &outdir)?; + generate_to(Fish, app, &name, &outdir)?; } configure_me_codegen::build_script_auto() From 40ef63e98d0ee50e0ebd5fac7149d28745b99bf9 Mon Sep 17 00:00:00 2001 From: Leonardo Nerone Date: Thu, 18 Aug 2022 13:52:12 -0300 Subject: [PATCH 3/3] fix(dockerfiles): fix --data-dir arguments, so that it uses the user provided dir --- Dockerfile | 2 +- compose/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 431ad5613..c808e0e62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,4 +56,4 @@ EXPOSE 9735 9981 ENTRYPOINT ["farcasterd"] -CMD ["--data-dir", "/var/lib/farcaster", "-x", "lnpz://0.0.0.0:9981/?api=esb", "--help"] +CMD ["--data-dir", "$DATA_DIR", "-x", "lnpz://0.0.0.0:9981/?api=esb", "--help"] diff --git a/compose/Dockerfile b/compose/Dockerfile index c59caf769..1676ad52e 100644 --- a/compose/Dockerfile +++ b/compose/Dockerfile @@ -15,4 +15,4 @@ EXPOSE 9735 9981 ENTRYPOINT ["farcasterd"] -CMD ["--data-dir", "/var/lib/farcaster", "-x", "lnpz://0.0.0.0:9981/?api=esb", "--help"] +CMD ["--data-dir", "$DATA_DIR", "-x", "lnpz://0.0.0.0:9981/?api=esb", "--help"]