Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
60c6d79
Recover from a 421 on the evidence rather than on the cache's age
mpretty-cyro Sep 10, 2026
348b778
Fix uninitialized requested_unlock_height usage
jagerman Sep 11, 2026
329f8b9
Follow a 421's redirect instead of refreshing the whole pool
mpretty-cyro Sep 13, 2026
152a46e
Expire snode strikes where it matters, not only where it's reported
mpretty-cyro Sep 11, 2026
1159595
Drop a cached edge node once it has been struck out
mpretty-cyro Sep 11, 2026
6446f67
Tell callers when the snode pool could not be refreshed
mpretty-cyro Sep 11, 2026
9c27474
Follow a 421's redirect for each account a batch rejects
jagerman Sep 24, 2026
16be367
Act on a destination's status only when its response decrypted
jagerman Sep 24, 2026
6499e95
Follow a swarm redirect without checking it against our own grouping
jagerman Sep 24, 2026
190f017
Check the pool can now serve a caller before retrying it
jagerman Sep 24, 2026
35387a9
Keep following swarm redirects past the limit, and ask for a refresh
jagerman Sep 24, 2026
78c55b9
Follow a redirect with the nodes of it we know, and refresh for the rest
jagerman Sep 24, 2026
fd6321f
Report too few usable nodes with a named error code
jagerman Sep 24, 2026
c038a7b
Actually suspend the QUIC transport, and close without blaming nodes
jagerman Sep 24, 2026
8ee2293
Abandon a snode pool refresh when the pool is suspended
jagerman Sep 24, 2026
561054c
Give the older snode pool tests the config they were written for
jagerman Sep 24, 2026
c84039c
Test that rotating a path drops a struck-out edge node
jagerman Sep 24, 2026
aeac6b6
Check the pool's age on every get_swarm, not only the first per account
jagerman Sep 24, 2026
044ef51
Fall back on the C API's swarm pubkey for sub-requests naming no account
jagerman Sep 24, 2026
dbb8aeb
Keep repeated swarm redirect logging out of the default log
jagerman Sep 24, 2026
acad948
Ask for a refresh whenever a redirect resolves to too few nodes
mpretty-cyro Sep 28, 2026
d81d252
Silence the disable_mtu_discovery deprecation until the pin can move
mpretty-cyro Sep 28, 2026
588286d
Include what the test helpers use
mpretty-cyro Sep 28, 2026
c76bcf4
Merge pull request #154 from mpretty-cyro/fix/swarm-invalidation-on-421
mpretty-cyro Sep 28, 2026
3e92795
Version bump
mpretty-cyro Sep 28, 2026
dd3b0ae
Switch dependency handling to session-deps
mpretty-cyro Oct 1, 2026
44958ab
Port session_router_router to session-router's tunnel claims; bump se…
mpretty-cyro Oct 2, 2026
203c65b
quic: use max_udp_payload::minimum() instead of the deprecated disabl…
mpretty-cyro Oct 2, 2026
798a4cf
Bump version number
mpretty-cyro Oct 5, 2026
1ed9624
Drop the unused build-tree export() calls; clang-format
mpretty-cyro Oct 5, 2026
6f27df0
Bump session-deps to current dev
jagerman Oct 2, 2026
8ee3ea5
Make ENABLE_NETWORKING_SROUTER=OFF link, and default it off
jagerman Oct 2, 2026
5893e62
quic_transport: describe the MTU cap, not the change that introduced it
jagerman Oct 2, 2026
025c228
Bump session-router for libquic 1.11.0
jagerman Oct 5, 2026
609408c
Bump session-deps for gnutls's Apple frameworks
jagerman Oct 5, 2026
080744c
Bump session-deps for macOS cross-arch builds
jagerman Oct 6, 2026
a9bafa6
Add opt::quic_max_udp_payload (from client)
mpretty-cyro Oct 6, 2026
d8d540b
Merge pull request #179 from mpretty-cyro/session-deps-backport
mpretty-cyro Oct 6, 2026
867ea7b
Fix the static bundle missing session-deps libraries
mpretty-cyro Oct 6, 2026
7975041
Bump session-deps for libunistring's iconv on Apple
jagerman Oct 6, 2026
741df68
Build the static bundle from one walk of the link closure
jagerman Oct 6, 2026
6824566
Make static-bundle-test link the bundle alone, and build it in CI
jagerman Oct 6, 2026
6c0c330
Bump version to 1.9.4
jagerman Oct 6, 2026
07b533e
Link nlohmann-json publicly to network
jagerman Oct 6, 2026
74585a0
Don't dereference a connection that is already gone when a response a…
mpretty-cyro Oct 6, 2026
d72c8bc
Clear only the closed connection's state when a connection fails
mpretty-cyro Oct 6, 2026
0ce0972
Say accurately when a response can arrive after its connection is gone
jagerman Oct 7, 2026
d21126b
Merge pull request #182 from mpretty-cyro/fix/quic-response-null-conn
jagerman Oct 7, 2026
c3507ad
Merge pull request #181 from mpretty-cyro/fix/static-bundle-session-deps
jagerman Oct 7, 2026
dac149c
Fix missing direct linking to libzstd
jagerman Oct 9, 2026
3721688
Add opt::quic_congestion_control
mpretty-cyro Nov 3, 2026
3cf6c45
Use libquic's congestion_control enum for opt::quic_congestion_control
mpretty-cyro Nov 4, 2026
a12da17
Bump session-router to v1.1.1 for libquic 1.14.0
mpretty-cyro Nov 5, 2026
caf65c1
Bump version to 1.9.5
mpretty-cyro Nov 5, 2026
c4e37f7
Bump session-deps to 1.38
mpretty-cyro Nov 5, 2026
4339312
Include <variant> where std::variant and std::visit are used
mpretty-cyro Nov 5, 2026
372cb68
Merge pull request #211 from mpretty-cyro/feature/quic-congestion-con…
mpretty-cyro Nov 5, 2026
84d147f
Don't throw from QuicTransport::resume when the endpoint can't be cre…
mpretty-cyro Nov 13, 2026
e7aadd5
Keep exceptions inside the blocking network C API calls
mpretty-cyro Nov 13, 2026
f4d22fc
Bump version to 1.9.6
mpretty-cyro Nov 16, 2026
a81e316
Merge pull request #226 from mpretty-cyro/fix/network-resume-endpoint…
mpretty-cyro Nov 17, 2026
c3a7639
Fix includes for fmt 12 and GCC 16
jagerman Nov 21, 2026
72dfa7a
Fix uninitialized requested_unlock_height usage
jagerman Sep 30, 2026
37455aa
Port swarm invalidation on 421 from dev (#154)
jagerman Sep 30, 2026
f988c89
Don't dereference a connection that is already gone when a response a…
mpretty-cyro Oct 6, 2026
845d4f5
Clear only the closed connection's state when a connection fails
mpretty-cyro Oct 6, 2026
212367f
Say accurately when a response can arrive after its connection is gone
jagerman Oct 7, 2026
916e621
Fix missing direct linking to libzstd
jagerman Oct 9, 2026
158349e
Don't throw from QuicTransport::resume when the endpoint can't be cre…
mpretty-cyro Nov 13, 2026
186bda7
Add opt::quic_congestion_control
jagerman Nov 26, 2026
da4443e
Build the static bundle from one walk of the link closure
jagerman Nov 26, 2026
3d2650e
Merge 1.x into dev (recorded only; changes ported separately)
jagerman Nov 26, 2026
f996e00
Refuse shared libraries with static dependencies
jagerman Nov 26, 2026
171fc2e
Bump session-deps for libheif's static define in its public Cflags
jagerman Nov 26, 2026
ddc32f5
Bump session-router to drop win32::error and to_wide() from core
jagerman Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .woodpecker/build.star
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,14 @@ def main(ctx):

# The one build that compiles every dependency itself rather than taking the distro's, on
# the oldest distro we support: what the release artifacts do, and the only thing that
# notices when a dependency we vendor stops building.
linux("Ubuntu 22.04 (static deps)", "ubuntu-jammy", cmake = {"BUILD_STATIC_DEPS": True}, meson = "pip"),
# notices when a dependency we vendor stops building. Static libraries as well, because
# shared ones cannot take static dependencies (see the top-level CMakeLists.txt).
linux(
"Ubuntu 22.04 (static deps)",
"ubuntu-jammy",
cmake = {"BUILD_STATIC_DEPS": True, "BUILD_SHARED_LIBS": False},
meson = "pip",
),

# ARM builds; armhf builds in a 32-bit image on the arm64 agents.
linux("Debian sid (ARM64)", "debian-sid", arch = "arm64", jobs = 4),
Expand Down
40 changes: 36 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ endif()
# defaults to the same value as BUILD_SHARED_LIBS (i.e. static by default).
set(BUILD_STATIC_DEPS ${static_default} CACHE BOOL "Build all dependencies statically rather than trying to link to them on the system")

# Each of our shared libraries, and anything linking them, is a separate final link, so every one of
# them that uses a static dependency gets its own copy: gnutls ends up in libsession-crypto.so and
# again in an executable that links oxen::quic through libsession-network.so. The copies export the
# same symbols, so in one process they bind to each other's globals: the second gnutls finds its
# ASN.1 tables already filled in by the first and fails to initialize.
if(BUILD_SHARED_LIBS AND BUILD_STATIC_DEPS)
message(FATAL_ERROR "BUILD_SHARED_LIBS is incompatible with BUILD_STATIC_DEPS: shared libraries "
"need shared (system) dependencies. Configure with -DBUILD_STATIC_DEPS=OFF, or build static "
"libraries.")
endif()

include(cmake/session-deps/Deps.cmake)

option(STATIC_BUNDLE "Build a single static .a containing everything (both code and dependencies)" OFF)
Expand All @@ -78,9 +89,9 @@ if(STATIC_BUNDLE AND NOT BUILD_STATIC_DEPS)
message(FATAL_ERROR "STATIC_BUNDLE requires BUILD_STATIC_DEPS to be enabled")
endif()

# A shared build has no static archives for our own libraries, and libsession_static_bundle()
# silently skips non-static targets: the bundle would come out holding only the dependencies, which
# only shows up as undefined libsession symbols when something links against it.
# A shared build has no static archives for our own libraries, and the bundle walk only collects
# static ones: the bundle would come out holding only the dependencies, which only shows up as
# undefined libsession symbols when something links against it.
if(STATIC_BUNDLE AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "STATIC_BUNDLE is incompatible with BUILD_SHARED_LIBS")
endif()
Expand Down Expand Up @@ -188,7 +199,28 @@ if(STATIC_BUNDLE)

include(combine_archives)

combine_archives(session-util libsession-static-bundle "${LIBSESSION_STATIC_BUNDLE_LIBS}")
# Threads::Threads comes from find_package() calls in subdirectories, which make it visible only
# there; the bundle walk has to be able to see it.
find_package(Threads REQUIRED)
libsession_static_bundle_libs(bundle_archives bundle_system_libs ${libsession_export_targets})
message(STATUS "Static bundle libsession-util.a combines: ${bundle_archives}")
message(STATUS "Static bundle libsession-util.a also needs: ${bundle_system_libs}")
combine_archives(session-util libsession-static-bundle ${bundle_archives})

# Links the bundle and only what the walk says it needs from the system, so that a library
# missing from the bundle fails here rather than in whatever consumes it. Headers come from our
# targets' usage requirements, without linking them.
add_executable(static-bundle-test tests/static_bundle.cpp)
foreach(header_target network image)
target_include_directories(static-bundle-test PRIVATE
$<TARGET_PROPERTY:${header_target},INTERFACE_INCLUDE_DIRECTORIES>)
target_compile_definitions(static-bundle-test PRIVATE
$<TARGET_PROPERTY:${header_target},INTERFACE_COMPILE_DEFINITIONS>)
endforeach()
target_link_libraries(static-bundle-test PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}/libsession-util.a" ${bundle_system_libs})
add_dependencies(static-bundle-test session-util)

set(lib_folder lib)
if(IOS)
set(lib_folder "${lib_folder}-${ARCH}")
Expand Down
93 changes: 65 additions & 28 deletions cmake/AddStaticBundleLib.cmake
Original file line number Diff line number Diff line change
@@ -1,36 +1,73 @@

set(LIBSESSION_STATIC_BUNDLE_LIBS "" CACHE INTERNAL "list of libs to go into the static bundle lib")

function(_libsession_static_bundle_append tgt)
list(APPEND LIBSESSION_STATIC_BUNDLE_LIBS "${tgt}")
set(LIBSESSION_STATIC_BUNDLE_LIBS "${LIBSESSION_STATIC_BUNDLE_LIBS}" CACHE INTERNAL "")
endfunction()

# Call as:
#
# libsession_static_bundle(target [target2 ...])
# libsession_static_bundle_libs(ARCHIVES_VAR SYSTEM_VAR target [target2 ...])
#
# to append the given target(s) to the list of libraries that will be combined to make the static
# bundled libsession-util.a.
function(libsession_static_bundle)
foreach(tgt IN LISTS ARGN)
if(TARGET "${tgt}" AND NOT "${tgt}" IN_LIST LIBSESSION_STATIC_BUNDLE_LIBS)
get_target_property(tgt_type ${tgt} TYPE)

if(tgt_type STREQUAL STATIC_LIBRARY)
message(STATUS "Adding ${tgt} to libsession-util bundled library list")
_libsession_static_bundle_append("${tgt}")
# to walk the link closure of the given targets. ARCHIVES_VAR is set to every static library in
# it: the archives that combine into the STATIC_BUNDLE libsession-util.a. SYSTEM_VAR is set to
# everything else the closure links: system libraries such as iconv, Apple frameworks, linker flags
# and imported non-static targets such as Threads::Threads. None of those can go into an archive,
# so whatever links the bundle has to supply them.
#
# The closure is read from the targets' link properties, so this has to be called after every
# target_link_libraries() it depends on.
function(libsession_static_bundle_libs archives_out system_out)
set(pending ${ARGN})
set(visited)
set(archives)
set(system)
while(NOT "${pending}" STREQUAL "")
list(POP_FRONT pending tgt)
if(tgt MATCHES "^\\$<LINK_ONLY:(.+)>$")
set(tgt "${CMAKE_MATCH_1}")
endif()
if(NOT TARGET "${tgt}")
# Silently skipping either of these could drop a library from the bundle, which then
# only shows up when something links against it. A `::` name is an imported target
# created in some subdirectory without GLOBAL, which we cannot see (let alone look
# inside) from here: find_package() it before calling this.
if(tgt MATCHES "\\$<")
message(FATAL_ERROR "Static bundle: don't know how to follow link item ${tgt}")
endif()

if(tgt_type STREQUAL INTERFACE_LIBRARY)
get_target_property(tgt_link_deps ${tgt} INTERFACE_LINK_LIBRARIES)
else()
get_target_property(tgt_link_deps ${tgt} LINK_LIBRARIES)
if(tgt MATCHES "::")
message(FATAL_ERROR "Static bundle: imported target ${tgt} is not visible here")
endif()
list(APPEND system "${tgt}")
continue()
endif()
get_target_property(aliased ${tgt} ALIASED_TARGET)
if(aliased)
set(tgt "${aliased}")
endif()
if(tgt IN_LIST visited)
continue()
endif()
list(APPEND visited "${tgt}")

if(tgt_link_deps)
libsession_static_bundle(${tgt_link_deps})
endif()
get_target_property(type ${tgt} TYPE)
get_target_property(imported ${tgt} IMPORTED)
if(type STREQUAL STATIC_LIBRARY)
list(APPEND archives "${tgt}")
elseif(imported)
# Something the system provides (Threads::Threads). Linking it by name brings
# everything it carries, including link options, which this walk does not read.
list(APPEND system "${tgt}")
continue()
endif()

# An imported target (which is what session-deps produces for each static dependency)
# carries its dependencies only in INTERFACE_LINK_LIBRARIES; one built here also has its
# private ones in LINK_LIBRARIES.
get_target_property(deps ${tgt} INTERFACE_LINK_LIBRARIES)
if(NOT type STREQUAL INTERFACE_LIBRARY AND NOT imported)
get_target_property(link_deps ${tgt} LINK_LIBRARIES)
list(APPEND deps ${link_deps})
endif()
endforeach()
# ::@(dir) ... ::@ are cmake's own markers around items that target_link_libraries() added
# from another directory, not link items themselves.
list(FILTER deps EXCLUDE REGEX "-NOTFOUND$|^::@")
list(APPEND pending ${deps})
endwhile()
list(REMOVE_DUPLICATES system)
set(${archives_out} "${archives}" PARENT_SCOPE)
set(${system_out} "${system}" PARENT_SCOPE)
endfunction()
7 changes: 0 additions & 7 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function(static_sessiondep_or_submodule)
endfunction()

session_dep(libsodium 1.0.21)
libsession_static_bundle(sessiondep::libsodium)

if(NOT TARGET oxenc::oxenc)
set(OXENC_BUILD_TESTS OFF CACHE BOOL "")
Expand Down Expand Up @@ -83,7 +82,6 @@ set(SROUTER_JEMALLOC OFF CACHE BOOL "")

# 1.1.1 is the first release with session::mlkem768 and installed headers.
static_sessiondep_or_submodule(libsessionrouter-core 1.1.1 session-router session-router::core)
libsession_static_bundle(session-router::core)

# The session-router submodule has already provided oxen::quic; this is for a system session-router,
# for which the check above has made sure this finds the system libquic.
Expand Down Expand Up @@ -130,7 +128,6 @@ sessiondep_or_submodule(protobuf-lite 3.21 protobuf protobuf::libprotobuf-lite)
# configs get deduplicated at the swarm.
set(BUILD_STATIC_libzstd ON CACHE BOOL "" FORCE)
session_dep(libzstd 1.5)
libsession_static_bundle(sessiondep::libzstd)

if(NOT TARGET nlohmann_json::nlohmann_json)
set(JSON_BuildTests OFF CACHE INTERNAL "")
Expand All @@ -140,24 +137,20 @@ endif()


session_dep(simdutf 7)
libsession_static_bundle(sessiondep::simdutf)

# 8.13 added vips_operation_block_set(), which the loader whitelist in src/image/vips.cpp needs: a
# system libvips may carry loaders (svg, pdf, tiff, ...) that our static build leaves out.
session_dep(vips 8.13)
libsession_static_bundle(sessiondep::vips)

# libvips' own HEIF support cannot say which codec a HEIF file uses (it guesses from the brand),
# so libsession::image asks libheif directly; 1.19 is the first with the grid tile API it needs.
session_dep(libheif 1.19)
libsession_static_bundle(sessiondep::libheif)

if(SESSION_ENABLE_JPEGLI)
# Always our own build, even when everything else comes from the system: distributions do not
# package jpegli, and we want every client encoding JPEGs the same way whatever libvips it has.
set(BUILD_STATIC_jpegli ON CACHE BOOL "" FORCE)
session_dep(jpegli 0)
libsession_static_bundle(sessiondep::jpegli)
endif()


Expand Down
2 changes: 2 additions & 0 deletions include/session/network/network_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ struct Config {

std::chrono::seconds quic_keep_alive{10s};
std::optional<size_t> quic_max_udp_payload;
std::optional<opt::quic_congestion_control> quic_congestion_control;

template <typename... Opt>
requires(sizeof...(Opt) > 0 && (opt::is_option<std::decay_t<Opt>> && ...))
Expand Down Expand Up @@ -143,6 +144,7 @@ struct Config {
void handle_config_opt(opt::quic_tunnel_handshake_timeout qtht);
void handle_config_opt(opt::quic_keep_alive qka);
void handle_config_opt(opt::quic_max_udp_payload qmup);
void handle_config_opt(opt::quic_congestion_control qcc);

// Onion request router options
void handle_config_opt(opt::onionreq_path_strike_threshold pst);
Expand Down
8 changes: 8 additions & 0 deletions include/session/network/network_opt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <filesystem>
#include <memory>
#include <oxen/quic/opt.hpp>
#include <type_traits>
#include <variant>

Expand Down Expand Up @@ -435,6 +436,12 @@ namespace opt {
explicit quic_max_udp_payload(size_t s) : size{s} {}
};

/// Can be used to choose the congestion control algorithm Quic connections use for what they
/// send; without it libquic's default is used. BBR keeps its sending rate through loss that
/// isn't caused by congestion, which suits jittery mobile networks, while cubic and reno back
/// off on any loss.
using quic_congestion_control = oxen::quic::opt::congestion_control;

// MARK: Onion Request Router Options

/// Can be used to override the default (3) number of times a path can receive an error before
Expand Down Expand Up @@ -531,6 +538,7 @@ namespace opt {
quic_tunnel_handshake_timeout,
quic_keep_alive,
quic_max_udp_payload,
quic_congestion_control,

// Onion request router options
onionreq_path_strike_threshold,
Expand Down
1 change: 1 addition & 0 deletions include/session/network/routing/onion_request_router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class OnionRequestRouter : public IRouter, public std::enable_shared_from_this<O
void _start_setup();
void _finish_setup();
void _pre_build_paths_if_needed();
void _drop_struck_cached_edge_nodes();
void _close_connections();
void _update_status();
void _send_request_internal(Request request, network_response_callback_t callback);
Expand Down
2 changes: 1 addition & 1 deletion include/session/network/service_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef struct network_service_node {
uint16_t omq_port;
uint16_t version[3];
uint64_t swarm_id;
uint64_t requested_unlock_height;
int64_t requested_unlock_height; // -1 if unknown; 0 if no unlock has been requested.
} network_service_node;

#ifdef __cplusplus
Expand Down
5 changes: 4 additions & 1 deletion include/session/network/service_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ struct service_node {
uint16_t omq_port;
std::array<uint16_t, 3> storage_server_version;
swarm_id_t swarm_id;
uint64_t requested_unlock_height;

// -1 when we don't know: most sources (the binary pool format, the on-disk cache, swarm
// responses) carry no unlock information at all, and 0 would claim they said "not requested".
int64_t requested_unlock_height = -1;

oxen::quic::RemoteAddress to_https_address() const {
return oxen::quic::RemoteAddress{remote_pubkey.view(), ip, https_port};
Expand Down
21 changes: 16 additions & 5 deletions include/session/network/session_network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,21 @@ class Network {
void _close_connections();
void _recalculate_status();
void _update_status(ConnectionStatus new_status);
void _update_network_state(const std::string& body);
// Writes the swarm a 421 reported into the cache. Does not retry: choosing another member is
// the caller's, since only the caller can know which node it ended up talking to.
void _adopt_swarm_from_421(const x25519_pubkey& swarm_pubkey, std::string_view body);
void _update_network_state(const nlohmann::json& json);

// An account's redirect is left empty where there was none to take.
response::swarm_rejections _take_swarm_redirects(
const Request& request, const nlohmann::json* json, int16_t status_code);
void _refresh_if_unredirected(const response::swarm_rejections& rejections);

// Corrects the swarm a 421 disproved, then reports the 421. Does not retry: choosing another
// member is the caller's, since only the caller can know which node it ended up talking to.
void _handle_421(
Request original_request,
response::swarm_rejections rejections,
std::vector<std::pair<std::string, std::string>> headers,
std::optional<std::string> body,
network_response_callback_t final_callback);

void _resync_clock(
std::optional<Request> original_request, network_response_callback_t request_callback);
Expand All @@ -198,7 +209,7 @@ class Network {
const uint8_t index,
const service_node& node,
const uint8_t total_requests);
void _on_clock_resync_complete(const uint8_t total_requests);
void _on_clock_resync_complete();

Request _preprocess_request(Request request);
};
Expand Down
4 changes: 3 additions & 1 deletion include/session/network/session_network_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ typedef struct {
// The account whose swarm this request addresses, as 64 hex chars of its X25519 pubkey — the
// same value passed to session_network_get_swarm() to choose the destination node. Null for a
// request aimed at a node rather than about an account (a cache refresh, a clock resync) or at
// a server, which no swarm membership applies to.
// a server, which no swarm membership applies to. For a `batch` or `sequence` request each
// sub-request's account is read from the body instead, and this is used only if the body
// can't be parsed.
//
// Set it whenever there is one: a storage server rejects a request whose pubkey is outside its
// swarm with a 421, and recovering means re-resolving this account's swarm. Left null, such a
Expand Down
Loading