Skip to content

Feat/hypercore11 migration#1246

Draft
RangerMauve wants to merge 41 commits intomainfrom
feat/hypercore11-migration
Draft

Feat/hypercore11 migration#1246
RangerMauve wants to merge 41 commits intomainfrom
feat/hypercore11-migration

Conversation

@RangerMauve
Copy link
Copy Markdown
Contributor

Closes #1042

Mauve Signweaver and others added 30 commits February 16, 2026 16:27
* chore: auto-open resources

* chore: increase CI timeout
Co-authored-by: Andrew Chou <andrewchou@fastmail.com>
@RangerMauve RangerMauve marked this pull request as draft March 16, 2026 21:22
@awana-lockfile-bot
Copy link
Copy Markdown

package-lock.json changes

Summary

Status Count
ADDED 27
UPDATED 16
REMOVED 47
Click to toggle table visibility
Name Status Previous Current
@bufbuild/buf-darwin-arm64 REMOVED 1.26.1 -
@bufbuild/buf-darwin-x64 REMOVED 1.26.1 -
@bufbuild/buf-linux-aarch64 REMOVED 1.26.1 -
@bufbuild/buf-win32-arm64 REMOVED 1.26.1 -
@bufbuild/buf-win32-x64 REMOVED 1.26.1 -
@emnapi/core REMOVED 1.3.1 -
@emnapi/runtime REMOVED 1.3.1 -
@emnapi/wasi-threads REMOVED 1.0.1 -
@esbuild/aix-ppc64 REMOVED 0.25.10 -
@esbuild/android-arm REMOVED 0.25.10 -
@esbuild/android-arm64 REMOVED 0.25.10 -
@esbuild/android-x64 REMOVED 0.25.10 -
@esbuild/darwin-arm64 REMOVED 0.25.10 -
@esbuild/darwin-x64 REMOVED 0.25.10 -
@esbuild/freebsd-arm64 REMOVED 0.25.10 -
@esbuild/freebsd-x64 REMOVED 0.25.10 -
@esbuild/linux-arm REMOVED 0.25.10 -
@esbuild/linux-arm64 REMOVED 0.25.10 -
@esbuild/linux-ia32 REMOVED 0.25.10 -
@esbuild/linux-loong64 REMOVED 0.25.10 -
@esbuild/linux-mips64el REMOVED 0.25.10 -
@esbuild/linux-ppc64 REMOVED 0.25.10 -
@esbuild/linux-riscv64 REMOVED 0.25.10 -
@esbuild/linux-s390x REMOVED 0.25.10 -
@esbuild/netbsd-arm64 REMOVED 0.25.10 -
@esbuild/netbsd-x64 REMOVED 0.25.10 -
@esbuild/openbsd-arm64 REMOVED 0.25.10 -
@esbuild/openbsd-x64 REMOVED 0.25.10 -
@esbuild/openharmony-arm64 REMOVED 0.25.10 -
@esbuild/sunos-x64 REMOVED 0.25.10 -
@esbuild/win32-arm64 REMOVED 0.25.10 -
@esbuild/win32-ia32 REMOVED 0.25.10 -
@esbuild/win32-x64 REMOVED 0.25.10 -
@napi-rs/wasm-runtime REMOVED 0.2.6 -
@node-rs/crc32-android-arm-eabi REMOVED 1.10.6 -
@node-rs/crc32-android-arm64 REMOVED 1.10.6 -
@node-rs/crc32-darwin-arm64 REMOVED 1.10.6 -
@node-rs/crc32-darwin-x64 REMOVED 1.10.6 -
@node-rs/crc32-freebsd-x64 REMOVED 1.10.6 -
@node-rs/crc32-linux-arm-gnueabihf REMOVED 1.10.6 -
@node-rs/crc32-linux-arm64-gnu REMOVED 1.10.6 -
@node-rs/crc32-linux-arm64-musl REMOVED 1.10.6 -
@node-rs/crc32-wasm32-wasi REMOVED 1.10.6 -
@node-rs/crc32-win32-arm64-msvc REMOVED 1.10.6 -
@node-rs/crc32-win32-ia32-msvc REMOVED 1.10.6 -
@node-rs/crc32-win32-x64-msvc REMOVED 1.10.6 -
@tybys/wasm-util REMOVED 0.9.0 -
b4a UPDATED 1.6.6 1.8.0
bare-addon-resolve ADDED - 1.10.0
bare-ansi-escapes ADDED - 2.2.3
bare-assert ADDED - 1.2.0
bare-events UPDATED 2.4.2 2.8.2
bare-inspect ADDED - 3.1.4
bare-module-resolve ADDED - 1.12.1
bare-semver ADDED - 1.0.2
bare-stream UPDATED 2.1.3 2.8.1
bare-type ADDED - 1.1.0
bare-url ADDED - 2.3.2
compact-encoding UPDATED 2.15.0 2.19.0
corestore UPDATED 6.8.4 7.9.1
device-file ADDED - 2.3.1
events-universal ADDED - 1.0.1
fd-lock ADDED - 2.1.1
flat-tree UPDATED 1.9.0 1.13.0
fs-native-extensions UPDATED 1.3.2 1.4.5
generate-object-property ADDED - 2.0.0
generate-string ADDED - 1.0.1
hyperblobs UPDATED 2.3.0 2.9.0
hypercore-crypto UPDATED 3.4.2 3.6.1
hypercore-errors UPDATED 1.0.0 1.5.0
hypercore-id-encoding ADDED - 1.3.0
hypercore-storage ADDED - 2.7.1
hypercore UPDATED 10.19.0 11.27.13
hyperdrive UPDATED 11.5.3 13.3.0
hyperschema ADDED - 1.20.1
index-encoder ADDED - 3.5.0
is-property ADDED - 1.0.2
ready-resource UPDATED 1.0.0 1.2.0
refcounter ADDED - 1.0.0
require-addon ADDED - 1.2.0
resolve-reject-promise ADDED - 1.1.0
resource-on-exit ADDED - 1.0.0
rocksdb-native ADDED - 3.13.2
scope-lock ADDED - 1.2.4
signal-promise ADDED - 1.0.3
sodium-native UPDATED 4.3.1 5.1.0
sodium-universal UPDATED 4.0.1 5.0.1
speedometer ADDED - 1.1.0
streamx UPDATED 2.19.0 2.23.0
teex ADDED - 1.0.1

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 16, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedready-resource@​1.0.0 ⏵ 1.2.08110079 +381 +4100
Addedhyperblobs@​2.9.08210010087100
Addedsodium-universal@​5.0.19510010083100
Addedhypercore-crypto@​3.6.1921009083100
Addedcorestore@​7.9.18510010097100
Addedhyperdrive@​13.3.08910010093100
Updatedb4a@​1.6.6 ⏵ 1.8.010010010089 -2100
Updatedcompact-encoding@​2.15.0 ⏵ 2.19.096 +310010089 +6100
Updatedstreamx@​2.19.0 ⏵ 2.23.0100 +110010090 +9100
Addedhypercore@​11.27.139210010099100

View full report

@RangerMauve
Copy link
Copy Markdown
Contributor Author

Issue right now: Hypercore 11 introduced a "remote contiguous range" feature to track which blocks a remote peer has in a row. This has been combined with not sending ranges to peers if they already have data that is available locally. This breaks our code's assumptions because ranges the have value no longer gets those values in the bitfield.

We either need to use something else to calculate the have, or figure out another approach for detecting that a peer still "wants" some blocks they do not yet have.

e.g. broadcastRange early returns now since the local core has the data already and the remote peer knows that.

holepunchto/hypercore@v10.19.0...v11.27.14#diff-3344a84994d8e172768f33ec4bf514ba2bc28eb7eeffff10fcbbd294efe56edcR619

@RangerMauve
Copy link
Copy Markdown
Contributor Author

We could also monkey patch the replication logic to get rid of the early returns just for comapeo peers.

@RangerMauve
Copy link
Copy Markdown
Contributor Author

Adding proper support for the remoteContiguousLength fixed the want calculation. still need to figure out how to bypass the changes to broadcastRange and the such

@RangerMauve
Copy link
Copy Markdown
Contributor Author

Another patched hole is the onhave event. Whenever we got a new bit of data we'd broadcast that info to our peers. This has since been patched to not notify peers we have the data if we already know they have it and don't need it.

I'm going to try to monkey patch the replicator to override its onhave. Or maybe we could monkeypatch the broascastRange event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to hypercore 11

2 participants