From fb58b0ae85f43c938c50a55aa1f88d72c41c6eb3 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Tue, 26 Nov 2024 19:19:07 +0100 Subject: [PATCH 1/2] tests/cli: fix flapping tests (#10600) The issue is that for dht providing to work correctly, at least two nodes must have dht routing. Before, dht providing in the test always failed, but the test succeeded when the tested-CID was the one that the failure happened with (the first in the list for ProvideMany). --- test/cli/delegated_routing_v1_http_proxy_test.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/cli/delegated_routing_v1_http_proxy_test.go b/test/cli/delegated_routing_v1_http_proxy_test.go index 79fd726a411..ef3bc4fe2bc 100644 --- a/test/cli/delegated_routing_v1_http_proxy_test.go +++ b/test/cli/delegated_routing_v1_http_proxy_test.go @@ -15,9 +15,11 @@ func TestRoutingV1Proxy(t *testing.T) { t.Parallel() setupNodes := func(t *testing.T) harness.Nodes { - nodes := harness.NewT(t).NewNodes(2).Init() + nodes := harness.NewT(t).NewNodes(3).Init() - // Node 0 uses DHT and exposes the Routing API. + // Node 0 uses DHT and exposes the Routing API. For the DHT + // to actually work there will need to be another DHT-enabled + // node. nodes[0].UpdateConfig(func(cfg *config.Config) { cfg.Gateway.ExposeRoutingAPI = config.True cfg.Discovery.MDNS.Enabled = false @@ -49,6 +51,15 @@ func TestRoutingV1Proxy(t *testing.T) { }) nodes[1].StartDaemon() + // This is the second DHT node. Only used so that the DHT is + // operative. + nodes[2].UpdateConfig(func(cfg *config.Config) { + cfg.Gateway.ExposeRoutingAPI = config.True + cfg.Discovery.MDNS.Enabled = false + cfg.Routing.Type = config.NewOptionalString("dht") + }) + nodes[2].StartDaemon() + // Connect them. nodes.Connect() From 466f72f518bd9853035d973718ac7bddb8df0281 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Tue, 26 Nov 2024 19:19:48 +0100 Subject: [PATCH 2/2] docs: typos (#10602) --- docs/config.md | 8 ++++---- docs/datastores.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/config.md b/docs/config.md index a745fec01e5..08a1cceedd8 100644 --- a/docs/config.md +++ b/docs/config.md @@ -496,15 +496,15 @@ Enables AutoTLS feature to get DNS+TLS for [libp2p Secure WebSocket](https://git If `.../tls/sni/*.libp2p.direct/ws` [multiaddr] is present in [`Addresses.Swarm`](#addressesswarm) with SNI segment ending with [`AutoTLS.DomainSuffix`](#autotlsdomainsuffix), -Kubo will obtain and set up a trusted PKI TLS certificate for it, making it diallable from web browser's [Secure Contexts](https://w3c.github.io/webappsec-secure-contexts/). +Kubo will obtain and set up a trusted PKI TLS certificate for it, making it dialable from web browser's [Secure Contexts](https://w3c.github.io/webappsec-secure-contexts/). > [!IMPORTANT] > Caveats: -> - Requires your Kubo node to be publicly diallable. +> - Requires your Kubo node to be publicly dialable. > - If you want to test this with a node that is behind a NAT and uses manual port forwarding or UPnP (`Swarm.DisableNatPortMap=false`), > add catch-all `/ip4/0.0.0.0/tcp/4002/tls/sni/*.libp2p.direct/ws` and `/ip6/::/tcp/4002/tls/sni/*.libp2p.direct/ws` to [`Addresses.Swarm`](#addressesswarm) > and **wait 5-15 minutes** for libp2p node to set up and learn about own public addresses via [AutoNAT](#autonat). -> - If your node is fresh and just started, the [p2p-forge] client may produce and log ERRORs during this time, but once a publicly diallable addresses are set up, a subsequent retry should be successful. +> - If your node is fresh and just started, the [p2p-forge] client may produce and log ERRORs during this time, but once a publicly dialable addresses are set up, a subsequent retry should be successful. > - Listeners defined in [`Addresses.Swarm`](#addressesswarm) with `/tls/sni` must use a separate port from other TCP listeners, e.g. `4002` instead of the default `4001`. > - A separate port (`/tcp/4002`) has to be used instead of `/tcp/4001` because we wait for TCP port sharing ([go-libp2p#2984](https://github.com/libp2p/go-libp2p/issues/2684)) to be implemented. > - If you use manual port forwarding, make sure incoming connections to this additional port are allowed the same way `4001` ones already are. @@ -536,7 +536,7 @@ Do not change this unless you self-host [p2p-forge] under own domain. > [!IMPORTANT] > The default endpoint performs [libp2p Peer ID Authentication over HTTP](https://github.com/libp2p/specs/blob/master/http/peer-id-auth.md) > (proving ownership of PeerID), probes if your Kubo node can correctly answer to a [libp2p Identify](https://github.com/libp2p/specs/tree/master/identify) query. -> This ensures only a correctly configured, publicly diallable Kubo can initiate [ACME DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge) for `peerid.libp2p.direct`. +> This ensures only a correctly configured, publicly dialable Kubo can initiate [ACME DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge) for `peerid.libp2p.direct`. Default: `https://registration.libp2p.direct` (public good run by [Interplanetary Shipyard](https://ipshipyard.com)) diff --git a/docs/datastores.md b/docs/datastores.md index 03a400cb6aa..321f59bfc8d 100644 --- a/docs/datastores.md +++ b/docs/datastores.md @@ -57,7 +57,7 @@ The following options are available for tuning pebble. If they are not configured (or assigned their zero-valued), then default values are used. * `bytesPerSync`: int, Sync sstables periodically in order to smooth out writes to disk. (default: 512KB) -* `bisableWAL`: true|false, Disable the write-ahead log (WAL) at expense of prohibiting crash recovery. (default: false) +* `disableWAL`: true|false, Disable the write-ahead log (WAL) at expense of prohibiting crash recovery. (default: false) * `cacheSize`: Size of pebble's shared block cache. (default: 8MB) * `l0CompactionThreshold`: int, Count of L0 files necessary to trigger an L0 compaction. * `l0StopWritesThreshold`: int, Limit on L0 read-amplification, computed as the number of L0 sublevels.