Commit Graph

11 Commits (c76abd48c7f2aa4e686d2b9eb0364e809e3a4a5f)

Author SHA1 Message Date
leonardo d224c2910b Adjust quote based on Bitcoin balance 2 years ago
rishflab a42484f04d Use upstream libp2p instead of our fork
The rendezvous protocol has been merged into upstream. We no longer need
 to depend on our fork. The ASB no longer works as a rendezvous point.
3 years ago
rishflab da9d09aa5e Create Database trait
Use domain types in database API to prevent leaking of database types.
This trait will allow us to smoothly introduce the sqlite database.
3 years ago
rishflab a94c320021 Reorganise modules for multiple database implementations 3 years ago
Seth Simmons e3b231f045
Move "Lost connection" log line from WARN to Debug
Per #660, moving the log line on a peer closing connection outside of a swap to DEBUG instead of WARN, as there is no action that can be taken by the ASB owner.
3 years ago
Thomas Eizinger 9119ce5cc4
Tidy up log messages across the codebase
1. Clearly separate the log messages from any fields that are
captured. The log message itself should be meaningful because it
depends on the underlying formatter, how/if the fields are displayed.
2. Some log messages had very little context, expand that.
3. Wording of errors was inconsistent, hopefully all errors should
now start with `Failed to ...`.
4. Some log messages were duplicated across multiple layers (like opening
the database).
5. Some log messages were split into two where one part is now an `error!`
and the 2nd part is an `info!` on what is happening next.
6. Where appropriate, punctuation has been removed to not interrupt
the reader's flow.
3 years ago
rishflab 93a0692998
Integrate rendezvous protocol into ASB
The rendezvous protocol allows us to register all of our external
addresses. Hence, the first step is to allow the user to configure
external addresses as part of the config. In the future, there might
be an automated way of determining these.

To register with a rendezvous node, the user needs to configure which
one. CoBloX is running a rendezvous node that acts as the default by
every spec-compliant node will do the job just fine. This behaviour
is optional which is why our custom behaviour is wrapped in a `Toggle`.

We also want our node to re-register after half the time of the
registration has passed. To make this simpler and allow for testing in
isolation, we create a custom behaviour that wraps the libp2p rendezvous
behaviour.
3 years ago
Daniel Karzel ff10edd8a4
Add the `list-sellers` command to the CLI
This command uses a rendezvous node to find sellers (i.e. ASBs) and query them for quotes.
Sellers, that can be dialed and queried for a quote will be listed.
3 years ago
Thomas Eizinger b4fafeba6b
Allow large enum variant lint
The docs say one needs to measure the impact of this before taking
action. We didn't measure anything. Let's not take any action.
3 years ago
Thomas Eizinger e163942850
Merge transport and behaviour module into network 3 years ago
Daniel Karzel c0070f8fa7
Move files from `protocol` to appropriate module
Some network and application specific code does not belong in the protocol module and was moved.
Eventloop, recovery and the outside behaviour were moved to the respective application module because they are application specific.

The `swap_setup` was moved into the network module because upon change both sides will have to be changed and should thus stay close together.
3 years ago