Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ticapix authored Nov 26, 2024
2 parents 79be00f + 3ad3e76 commit 129f1b6
Show file tree
Hide file tree
Showing 31 changed files with 991 additions and 691 deletions.
2 changes: 1 addition & 1 deletion .github/actions/latest-kubo-tag/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22
FROM golang:1.23

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/update-with-latest-versions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22
FROM golang:1.23

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 1 addition & 0 deletions .github/styles/Vocab/ipfs-docs-vocab/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ READMEs?
referenceable
reprovider
reproviding
retrievability
roadmaps
sandboxed
Satoshi
Expand Down
3 changes: 3 additions & 0 deletions .github/styles/pln-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bool(ean)
boolean
boxo
browserify
callout
callouts
cas
cdns
Expand Down Expand Up @@ -191,6 +192,7 @@ repos
reprovider
reproviding
requesters
retrievability
roadmaps
rsa
sandboxed
Expand All @@ -204,6 +206,7 @@ sneakernets
stackparse
stdout
storj
Someguy
subcommand
substring
sys
Expand Down
14 changes: 8 additions & 6 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ const SPEEDCURVE_ID = process.env.SPEEDCURVE_ID || ''
const pageSuffix = '/'

const installMenuChildren = [
['/install/command-line','IPFS Kubo for Go'],
['/install/run-ipfs-inside-docker', 'IPFS Kubo in Docker'],
['https://github.com/ipfs/helia','IPFS Helia for JavaScript'],
['https://iroh.computer/docs/install/', "IPFS Iroh for Rust"],
['/install/ipfs-desktop', 'IPFS Desktop App'],
['/install/ipfs-companion', 'IPFS Companion Browser Extension'],
['/install/server-infrastructure', 'IPFS Cluster']
['/install/command-line','Kubo Daemon & CLI'],
['/install/run-ipfs-inside-docker', 'Kubo in Docker'],
['/install/server-infrastructure', 'IPFS Cluster'],
['https://github.com/ipfs/rainbow#readme', 'Rainbow Gateway'],
['https://github.com/ipfs/someguy#readme', 'Someguy Delegated Router'],
['https://github.com/ipfs/helia#readme','Helia SDK for JS'],
['https://github.com/ipfs/boxo#readme','Boxo SDK for Go'],
['/concepts/ipfs-implementations','Other Implementations']
]

module.exports = {
Expand Down Expand Up @@ -205,7 +208,6 @@ module.exports = {
'/how-to/configure-node',
'/how-to/modify-bootstrap-list',
'/how-to/nat-configuration',
'/how-to/default-profile',
'/how-to/ipfs-updater',
[
'https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/custom-ipfs-repo',
Expand Down
2 changes: 1 addition & 1 deletion docs/community/contribute/ways-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ IPFS and its sister-projects are big, with lots of code written in multiple lang
The biggest and most active repositories we have today are:

- [ipfs/kubo](https://github.com/ipfs/kubo)
- [ipfs/js-ipfs](https://github.com/ipfs/js-ipfs)
- [ipfs/helia](https://github.com/ipfs/helia)
- [libp2p/go-libp2p](https://github.com/libp2p/go-libp2p)
- [libp2p/js-libp2p](https://github.com/libp2p/js-libp2p)

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/dht.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A major property of Kademlia is that all peers can be arranged from smallest to

While having peers that cannot talk to each other may sound like an oddity, two prevalent causes of unreachability are network address translators (NATs) and firewalls. Having asymmetrical networks where peers `X`, `Y`, and `Z` can connect to `A`, but `A` cannot connect to them is fairly common. Similarly, it is _extremely_ common that peers `A` and `B`, which are both behind NATs, cannot talk to each other. To deal with this, IPFS nodes ignore other nodes assumed to be unreachable by the general public. Nodes also filter themselves out of the network if they suspect they are not reachable.

To do this, we use [libp2p's AutoNAT](https://github.com/libp2p/go-libp2p-autonat), which acts as a distributed _session traversal utility for NAT_ (STUN) layer, informing peers of their observed addresses and whether or not they appear to be publicly dialable. Only when peers detect that they are publicly dialable do they switch from client mode (where they can query the DHT but not respond to queries) to server mode (where they can both query and respond to queries). Similarly, if a server discovers that it is no longer publicly dialable, it will switch back into client mode.
To do this, we use [libp2p's AutoNAT](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/autonat), which acts as a distributed _session traversal utility for NAT_ (STUN) layer, informing peers of their observed addresses and whether or not they appear to be publicly dialable. Only when peers detect that they are publicly dialable do they switch from client mode (where they can query the DHT but not respond to queries) to server mode (where they can both query and respond to queries). Similarly, if a server discovers that it is no longer publicly dialable, it will switch back into client mode.

IPFS exposes a _rate-limited_ AutoNAT service on all IPFS nodes that have discovered that they are publicly dialable. These requests are infrequent and do not have a noticeable overhead.

Expand Down Expand Up @@ -82,7 +82,7 @@ To keep the routing tables accurate and up to date, IPFS refreshes the routing t
1. For each bucket, select a random address in the Kademlia space that could fit in that bucket and do a lookup to find the `K` closest peers to that random address. This will ensure that we will have filled up each bucket with as many peers as will fit.
1. Also, search for ourselves in the network, just in case the network size and distribution are such that the first 15 buckets do not suffice to learn about the `K` peers closest to us.

Peers can be dropped from the routing table for several reasons, usually because that peer is offline or unreachable. After every refresh, IPFS goes through the routing table and attempt to connect to peers that we have not queried recently. If any peers are not active or online, they are dropped from the routing table. Peers can also be dropped if they have not been useful within the time period during which they are _probabilistically expected_ to have been utilized in a refresh. That value is `Log(1/K) * Log(1 - α/K) * refreshPeriod`, where `α` is the number of peers dialed that can be simultaneously queried. Additionally, IPFS defines _useful_ as responding within 2x when it takes any other peer from our routing table to respond to us. This biases against peers that are slow, overloaded, unreliable, or have bad network connectivity to us.
Peers can be dropped from the routing table for several reasons, usually because that peer is offline or unreachable. After every refresh, IPFS goes through the routing table and attempt to connect to peers that we have not queried recently. If any peers are not active or online, they are dropped from the routing table. Peers can also be dropped if they have not been useful within the time period during which they are _probabilistically expected_ to have been utilized in a refresh. That value is `Log(1/K) / Log(1 - α/K) * refreshPeriod`, where `α` is the number of peers dialed that can be simultaneously queried. Additionally, IPFS defines _useful_ as responding within 2x when it takes any other peer from our routing table to respond to us. This biases against peers that are slow, overloaded, unreliable, or have bad network connectivity to us.

## Lookup algorithm

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/file-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ await ipfs.files.rm('/my/beautiful/directory')

When you add a _file_ to IPFS, it might be too big to fit in a single block, so it needs metadata to link all its blocks together. UnixFS is a [protocol-buffers](https://developers.google.com/protocol-buffers/)-based format for describing files, directories, and symlinks in IPFS. This data format is used to represent files and all their links and metadata in IPFS. UnixFS creates a block (or a tree of blocks) of linked objects.

UnixFS currently has [Javascript](https://github.com/ipfs/helia-unixfs) and [Go](https://github.com/ipfs/kubo/tree/b3faaad1310bcc32dc3dd24e1919e9edf51edba8/unixfs) implementations. These implementations have modules written in to run different functions:
UnixFS currently has [Javascript](https://github.com/ipfs/helia/tree/main/packages/unixfs) and [Go](https://github.com/ipfs/kubo/tree/b3faaad1310bcc32dc3dd24e1919e9edf51edba8/unixfs) implementations. These implementations have modules written in to run different functions:

- **Data Formats**: manage the serialization/deserialization of UnixFS objects to protocol buffers

Expand Down
Loading

0 comments on commit 129f1b6

Please sign in to comment.