chore(README): formatting

This commit is contained in:
jon r 2023-03-28 19:55:00 +02:00
parent 4846da2816
commit 4052333a08

View file

@ -1,20 +1,20 @@
## Pathfinder2 # Pathfinder2
Pathfinder is a collection of tools related to Pathfinder is a collection of tools related to
computing transitive transfers in the computing transitive transfers in the
[CirclesUBI](https://joincircles.net) trust graph. [CirclesUBI](https://joincircles.net) trust graph.
### Building ## Building
This is a rust project, so assuming `cargo` is installed, `cargo build` This is a rust project, so assuming `cargo` is installed, `cargo build` creates three binaries:
creates two binaries: The server (default) and the cli. The `server` (default), the `cli` and the `convert` tool.
Both need a file that contains the trust graph edges to work. All need a file that contains the trust graph edges to work.
A reasonably up to date edge database file can be obtained from A reasonably up to date edge database file can be obtained from
https://chriseth.github.io/pathfinder2/edges.dat
- https://chriseth.github.io/pathfinder2/edges.dat
#### Using the Server ### Using the Server
`cargo run --release <ip-address>:<port>` will start a JSON-RPC server listening on the given port. `cargo run --release <ip-address>:<port>` will start a JSON-RPC server listening on the given port.
@ -29,18 +29,15 @@ Number of worker threads: 4
Size of request queue: 10 Size of request queue: 10
#### Using the CLI ### Using the CLI
The CLI will load an edge database file and compute the transitive transfers
from one source to one destination. You can limit the number of hops to explore
and the maximum amount of circles to transfer.
The CLI will load an edge database file and compute the transitive transfers from one source to one destination. You can limit the number of hops to explore and the maximum amount of circles to transfer.
The options are: The options are:
`cargo run --release --bin cli <from> <to> <edges.dat> [<max_hops> [<max_amount>]] [--dot <dotfile>]` `cargo run --release --bin cli <from> <to> <edges.dat> [<max_hops> [<max_amount>]] [--dot <dotfile>]`
For example For example:
`cargo run --release --bin cli 0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c 0x42cEDde51198D1773590311E2A340DC06B24cB37 edges.dat 3 1000000000000000000` `cargo run --release --bin cli 0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c 0x42cEDde51198D1773590311E2A340DC06B24cB37 edges.dat 3 1000000000000000000`
@ -48,7 +45,7 @@ Computes a transfer of at most `1000000000000000000`, exploring 3 hops.
If you specify `--dot <dotfile>`, a graphviz/dot representation of the transfer graph is written to the given file. If you specify `--dot <dotfile>`, a graphviz/dot representation of the transfer graph is written to the given file.
#### Conversion Tool ### Conversion Tool
The conversion tool can convert between different ways of representing the edge and trust relations in the circles system. The conversion tool can convert between different ways of representing the edge and trust relations in the circles system.
All data formats are described in https://hackmd.io/Gg04t7gjQKeDW2Q6Jchp0Q All data formats are described in https://hackmd.io/Gg04t7gjQKeDW2Q6Jchp0Q