Skip to content

Commit

Permalink
Remove relay and direct peer poll attempt logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Jun 26, 2024
1 parent 5e66b62 commit 055b87a
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 2 deletions.
2 changes: 0 additions & 2 deletions aquadoggo/src/network/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ impl EventLoop {
async fn attempt_dial_known_addresses(&mut self) {
// Attempt to dial all relay addresses.
for relay_address in self.network_config.relay_addresses.iter_mut() {
debug!("Dial relay at address {}", relay_address);
dial_known_peer(
&mut self.swarm,
&mut self.known_peers,
Expand All @@ -269,7 +268,6 @@ impl EventLoop {

// Attempt to dial all direct peer addresses.
for direct_node_address in self.network_config.direct_node_addresses.iter_mut() {
debug!("Dial direct peer at address {}", direct_node_address);
dial_known_peer(
&mut self.swarm,
&mut self.known_peers,
Expand Down
259 changes: 259 additions & 0 deletions x.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
# aquadoggo configuration file
#
# 1. Copy this file to the location where a) aquadoggo will run b) in an XDG
# compliant config directory (for example "$HOME/.config/aquadoggo/config.toml"
# on Linux) or c) refer to it using the -c command line argument when running
# aquadoggo.
# 2. Replace the example values with your own desired configuration. All values
# in this template resemble the defaults
# 3. Check out our website https://p2panda.org for tutorials or official chat
# for further help finding the right configuration for your p2panda network
#
# NOTE: Paths in this file follow the XDG Base Directory Specification for
# Linux. You might want to adjust these values for your regarding operating
# system.

# ゚・。+☆+。
# SCHEMAS
# ゚・。+☆+。

# List of schema ids which a node will replicate, persist and expose on the
# GraphQL API.
#
# When allowing a schema you automatically opt into announcing, replicating and
# materializing documents connected to it, supporting applications and networks
# which are dependent on this data.
#
# It is recommended to set this list to all schema ids your own application
# should support, including all important system schemas. For example:
#
# allow_schema_ids = [
# # To discover new schemas, set your node to replicate schema definition
# # documents by including these two built-in schema ids. Your node will now
# # search for and replicate schemas which have been published to the
# # network.
# "schema_definition_v1",
# "schema_field_definition_v1",
#
# # To replicate documents which represent blobs (binary files) include the
# # following two built-in schema ids. This does not instruct your node to
# # replicate any blobs it finds on the network, but only those which are
# # dependencies of # other documents you already have.
# #
# # If you only want to replicate the meta data, not the binary content,
# # then only include the `blob_v1`.
# "blob_v1",
# "blob_piece_v1",
#
# # Once you discover new schemas and want to start replicating their
# # documents, then add their schema ids to this list as well. It's also
# # possible to create and load schemas directly onto your node using the
# # tool `fishy`: https://github.com/p2panda/fishy
# "my_interesting_schema_0020a01fe...",
# ]
#
# WARNING: When set to wildcard "*", your node will support _any_ schemas it
# will encounter on the network. This is useful for experimentation and local
# development but _not_ recommended for production settings.
#
allow_schema_ids = [
"blob_piece_v1",
"blob_v1",
"schema_definition_v1",
"schema_field_definition_v1",
"bee_sighting_0020df662f01bd4eed879ebb2128edd3e0b55902f179eeaf8978e58011f96b488717",
"bee_local_name_0020aeaca910c8a3f5fb0f80f7e8e6878720272d3bdcefa45c97cfc627e3b5e4252c",
"bee_species_00207889f44a73c94bb9f7e7d087e47d87ab4854c3693bca35bf16c596c8c91c5fe7",
"bee_attributes_location_tree_0020a960a5e60c7daf66f9b9056de6e7904247360017dd09c223800e65223c0adafe",
"bee_attributes_location_ground_00207f1b4d7115e518ed754024db27c86756479c9448aebc3f39a0e67c18b611bc25",
"bee_attributes_location_building_002021849ffe9546354fab1c421a6e5f5aaa49ae6d1bddffbe057444f67ba6e4743f",
"bee_attributes_location_box_00202a2f65b79de2f10a03fbd2adeeea491bfb36dd86998af86f8335414a654dbde0",
"bee_attributes_used_for_002064feb6c43eca60974c8f5e60475b1b931cdc920e8441bd4c88f280a0b2f0cedc",
"taxonomy_kingdom_0020f3cd78f31cd41fb554d605b11b8facdccba5d93322376ba988a4fee4d7893f43",
"taxonomy_phylum_002098b9c13e1162b360a528196c4293ed1e00e71359048323e9af2929ddf1e30313",
"taxonomy_class_0020c790691e036ed090392b4c06eb3586eb130edaee6ece2d4a48607f240bc11f91",
"taxonomy_order_00208ced5b9fc23a3f3e87444c4be7f305bbfcf4989d77cf6d208c579de1fe0a3b79",
"taxonomy_family_0020bdb78e578befd97784e2ec7710f5314fc22fb484e59eef7a66f948ea953a38dc",
"taxonomy_subfamily_0020abf0e567ec55d407c288f7d77bd58f1a529fdb0eb6cbb74279b83b53fb4fa9c2",
"taxonomy_tribe_0020eff38ee4ed5bed12b61452c6472f8cd9c692e4f39b36a6b35f16fde309d56d00",
"taxonomy_genus_0020ebf2746448b4fdf563de1486efc082c1243522d2579aeaaf12e7937c6bc86eba",
"taxonomy_species_0020e1567cb6f7e097b449cd05174f96ac17f774d8b80ffea423c4d4b386e423cb0a",
]

# ゚・。+☆+。・
# DATABASE
# ゚・。+☆+。・

# URL / connection string to PostgreSQL or SQLite database.
#
# When commented out it will default to an in-memory SQLite database URL.
#
# WARNING: When commented out, no data will be persisted after the node shuts
# down. Uncomment this value when running on production as you will otherwise
# loose data.
#
# database_url = "sqlite:$HOME/.local/share/aquadoggo/db.sqlite3"

# Maximum number of connections that the database pool should maintain.
#
# Be mindful of the connection limits for your database as well as other
# applications which may want to connect to the same database (or even multiple
# instances of the same application in high-availability deployments).
#
database_max_connections = 32

# ゚・。+☆
# PORTS
# ゚・。+☆

# HTTP port, serving the GraphQL API (for example hosted under
# http://localhost:2020/graphql). This API is used for client-node
# communication. Defaults to 2020.
#
# When port is taken the node will automatically pick a random, free port.
#
http_port = 2020

# Port for node-node communication and data replication. Defaults to 2022.
#
# When port is taken the node will automatically pick a random, free port.
#
node_port = 2022

# ゚・。+☆
# BLOBS
# ゚・。+☆

# Path to folder where blobs (large binary files) are persisted. Defaults to a
# temporary directory.
#
# WARNING: By default your node will not persist any blobs after shutdown. Set
# a path for production settings to not loose data.
#
# WARNING: This setting should reflect the `database_url` configuration. If the
# database is set to be stored somewhere permamently, you should do the same
# for blob files to not run into data inconsistencies.
#
blobs_base_path = "/home/rust/.local/share/aquadoggo"

# ゚・。+☆+。・
# IDENTITY
# ゚・。+☆+。・

# Path to persist your ed25519 private key file. The key is used to identify
# you towards other nodes during network discovery and replication. This key is
# _not_ used to create and sign data.
#
# If a path is set, a key will be generated newly and stored under this path
# when node starts for the first time.
#
# When comment out or no path is set, your node will generate an ephemeral
# private key on every start up and _not_ persist it.
#
private_key = "/home/rust/.local/share/aquadoggo/private-key.txt"

# ゚・。+☆+。・゚・。+☆+
# LOCAL NETWORKS
# ゚・。+☆+。・゚・。+☆+

# mDNS to discover other peers on the local network. Enabled by default.
#
mdns = false

# ゚・。+☆
# NODES
# ゚・。+☆

# List of known node addresses we want to connect to direct. Addresses can be
# domain names or IP addresses and must include a port number.
#
# NOTE: Make sure that nodes mentioned in this list are directly reachable
# (they need to be hosted with a static IP Address). If you need to connect to
# nodes with changing, dynamic IP addresses or even with nodes behind a
# firewall or NAT, do not use this field but use at least one relay.
#
direct_node_addresses = [
# "192.0.2.0:2022",
# "my.domain.name:2022",
]

# List of peers which are allowed to connect to your node.
#
# If set then only nodes (identified by their peer id) contained in this list
# will be able to connect to your node (via a relay or directly). When not set
# any other node can connect to yours.
#
# Peer IDs identify nodes by using their hashed public keys. They do _not_
# represent authored data from clients and are only used to authenticate nodes
# towards each other during networking.
#
# Use this list for example for setups where the identifier of the nodes you
# want to form a network with is known but you still need to use relays as
# their IP addresses change dynamically.
#
allow_peer_ids = "*"

# List of peers which will be blocked from connecting to your node.
#
# If set then any peers (identified by their peer id) contained in this list
# will be blocked from connecting to your node (via a relay or directly). When
# an empty list is provided then there are no restrictions on which nodes can
# connect to yours.
#
# Block lists and allow lists are exclusive, which means that you should
# _either_ use a block list _or_ an allow list depending on your setup.
#
# Use this list for example if you want to allow _any_ node to connect to yours
# _except_ of a known number of excluded nodes.
#
block_peer_ids = []

# ゚・。+☆+
# RELAYS
# ゚・。+☆+

# List of relay addresses. Addresses can be domain names or IP addresses
# and must include a port number.
#
# A relay helps discover other nodes on the internet (also known as
# "rendesvouz" or "bootstrap" server) and helps establishing direct p2p
# connections when node is behind a firewall or NAT (also known as
# "holepunching").
#
# When a direct connection is not possible the relay will help to redirect the
# (encrypted) traffic as an intermediary between us and other nodes. The node
# will contact the relay and register your IP address for other peers.
#
# WARNING: This will potentially expose your IP address on the network. Do only
# connect to trusted relays or make sure your IP address is hidden via a VPN or
# proxy if you're concerned about leaking your IP.
#
# WARNING: Using a relay will potentially connect you to untrusted / unknown
# nodes with which you will then exchange data with. If in doubt, use the list
# of known node addresses instead and only connect to trusted nodes.
#
relay_addresses = [
# "192.0.2.16:2022",
# "my.domain.me:2022",
]

# Set to true if node should also function as a relay. Defaults to false.
#
# Other nodes can use relays to aid discovery and establishing connectivity.
#
# NOTE: Relays _need_ to be hosted in a way where they can be reached directly,
# for example with a static IP address through an VPS.
#
relay_mode = true

# ゚・。+☆+。・
# WORKERS
# ゚・。+☆+。・

# Number of concurrent workers which defines the maximum of materialization
# tasks which can be worked on simultaneously.
#
# Use a higher number if you run your node on a powerful machine with many CPU
# cores. Lower number for low-energy devices with limited resources.
#
worker_pool_size = 16

0 comments on commit 055b87a

Please sign in to comment.