Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IPFS Kubo to 0.18.1 #27965

Closed
lidel opened this issue Jan 23, 2023 · 1 comment · Fixed by brave/brave-core-crx-packager#559 or brave/brave-core-crx-packager#574
Closed

Update IPFS Kubo to 0.18.1 #27965

lidel opened this issue Jan 23, 2023 · 1 comment · Fixed by brave/brave-core-crx-packager#559 or brave/brave-core-crx-packager#574
Assignees
Labels
feature/web3/ipfs OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. release-notes/exclude

Comments

@lidel
Copy link

lidel commented Jan 23, 2023

cc @cypt4 @bbondy @autonome

Release Notes: https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.18.md
Signed Binaries (MacOS): https://dist.ipfs.tech/kubo/v0.18.0/

This release introduces some configuration changes, and runs a migration on a preexisting repository to apply changes automatically to users who have default settings.

This means Brave, having some custom config overrides, needs to update some hardcoded config.

Necessary Config Updates

(1) Enable UDP transports (QUIC and WebTransport)

Brave runs with hardcoded TCP transport on port 45001

Modern QUIC transport runs on top of UDP. Whenever possible, QUIC will be preferred by IPFS peers over TCP. Not only is it faster, it also increases the chances of a successful holepunch in case of firewalls. It also enables WebTransport over QUIC.

To enable both, brave should update ipfs_service_utils.cc#L46-L50 and add QUIC UDP listeners on the same port as TCP:

      "Addresses": {
		"API": "/ip4/127.0.0.1/tcp/45001",
		"Announce": [],
		"AppendAnnounce": [],
		"Gateway": "/ip4/127.0.0.1/tcp/48080",
		"NoAnnounce": [],
		"Swarm": [
			"/ip4/0.0.0.0/tcp/44001",
+			"/ip4/0.0.0.0/udp/44001/quic-v1/webtransport",
+			"/ip4/0.0.0.0/udp/44001/quic-v1",
+			"/ip6/::/udp/44001/quic-v1",
+			"/ip6/::/udp/44001/quic-v1/webtransport",
			"/ip6/::/tcp/44001"
		]
	},

(we only add /quic-v1 because Brave had no /quic before)

(2) Remove custom ConnMgr limits

Custom limits from ipfs_service_utils.cc#L52-L54 should be removed:

-  dict->SetByDottedPath("Swarm.ConnMgr.GracePeriod", "20s");
-  dict->SetByDottedPath("Swarm.ConnMgr.LowWater", 20);
-  dict->SetByDottedPath("Swarm.ConnMgr.HighWater", 40);

Kubo 0.18 ships with sensible defaults (ipfs/kubo#9483) and we want Brave to benefit from ResourceMgr autoscaling features.

(3) Switch Routing.Type to auto

Automatic migration will replace Routing.Type=dht with Routing.Type=auto. No action needed here.

However, Brave has an additional override which we may consider removing.

Things are much smarter now, users who are behind NAT will remain DHT clients, and we also want Brave users to leverage IPNI router at https://cid.contact (which is enabled in auto mode).

Due to this, we need to remove --routing=dhtclient CLI override from ipfs_service_impl.cc:

- args.AppendArg("--routing=dhtclient");

This will switch to Routing.Type to auto from config.

@bbondy bbondy added feature/web3/ipfs priority/P3 The next thing for us to work on. It'll ride the trains. labels Jan 23, 2023
@lidel
Copy link
Author

lidel commented Jan 23, 2023

@cypt4 cypt4 self-assigned this Feb 1, 2023
@cypt4 cypt4 added this to Web3 Feb 1, 2023
cypt4 added a commit to brave/brave-core-crx-packager that referenced this issue Feb 2, 2023
@yrliou yrliou moved this to In Progress in Web3 Feb 3, 2023
cypt4 added a commit to brave/brave-core-crx-packager that referenced this issue Feb 7, 2023
cypt4 added a commit to brave/brave-core-crx-packager that referenced this issue Feb 7, 2023
@cypt4 cypt4 changed the title Update IPFS Kubo to 0.18.0 Update IPFS Kubo to 0.18.1 Feb 8, 2023
@srirambv srirambv added this to the [IPFS] Kubo 0.18.1 Release milestone Feb 21, 2023
cypt4 added a commit to brave/brave-core-crx-packager that referenced this issue Feb 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Web3 Feb 23, 2023
@Jorropo Jorropo mentioned this issue Aug 7, 2023
96 tasks
@Jorropo Jorropo mentioned this issue Sep 25, 2023
14 tasks
@hacdias hacdias mentioned this issue Nov 1, 2023
11 tasks
@hacdias hacdias mentioned this issue Dec 6, 2023
9 tasks
@hacdias hacdias mentioned this issue Jan 11, 2024
3 tasks
@hacdias hacdias mentioned this issue Feb 20, 2024
8 tasks
@hacdias hacdias mentioned this issue Apr 9, 2024
11 tasks
@hacdias hacdias mentioned this issue May 27, 2024
9 tasks
@lidel lidel mentioned this issue Aug 21, 2024
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/web3/ipfs OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. release-notes/exclude
Projects
Archived in project
4 participants