Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
7b08813
wip: Raw structure of improvements to gun that run in production
speeddragon Feb 26, 2026
fd2f53c
impr: Code structure
speeddragon Feb 27, 2026
957eaa2
chore: update opts
samcamwilliams Mar 1, 2026
d5c6135
fix: compile
speeddragon Mar 1, 2026
e214667
impr: Change default to gun, add conn monitoring
speeddragon Mar 1, 2026
b3cc164
impr: Force HTTP2
speeddragon Mar 2, 2026
50e78f5
impr: Move some event topics in critical path to prefix debug_
speeddragon Mar 2, 2026
033d1a8
parallel set to 1
speeddragon Mar 2, 2026
0a66840
fix: While observer_cli doesn't implement the fix, this contains a fi…
speeddragon Mar 3, 2026
12147c9
Remove ranch
speeddragon Mar 3, 2026
4912a28
chore: connection pool start event
samcamwilliams Mar 3, 2026
68d9f8c
fix: return `not_found` quickly on remote store read non-ID
samcamwilliams Mar 3, 2026
a7ff101
impr: add IP to `http_server_short` print
samcamwilliams Mar 4, 2026
0718f41
Merge pull request #730 from permaweb/feat/rate-limiter
samcamwilliams Mar 4, 2026
7eba0b2
impr: add IP to `priv/ip` of requests
samcamwilliams Mar 4, 2026
4752b18
chore: ignore noisy `ao-core` events
samcamwilliams Mar 5, 2026
712f59e
fix: patch Manifest PR
speeddragon Mar 5, 2026
423e226
chore: remove spammy events
samcamwilliams Mar 5, 2026
7da475d
fix: manifest load deduplication and `index` handling
samcamwilliams Mar 5, 2026
2f091a5
chore: add chain-3, ping 6ms vs. 90 ms for chain-1/2
JamesPiechota Mar 5, 2026
7780248
wip: improvements to manifest routing logic
samcamwilliams Mar 5, 2026
70e5a91
wip: testing setup
samcamwilliams Mar 5, 2026
e461f31
fix: return in-spec for `raw` -- data is in `body` not `data`
samcamwilliams Mar 5, 2026
41146fb
chore: settings and prints
samcamwilliams Mar 5, 2026
b9a47a4
Merge remote-tracking branch 'hyperbeam-main/chore/add-chain-3-202603…
samcamwilliams Mar 5, 2026
30af5d1
Merge branch 'impr/manifest-routing' into impr/gun
samcamwilliams Mar 5, 2026
dc01a2d
fix: tolerate `content-type` values that suffer from the `+` encoding…
samcamwilliams Mar 5, 2026
f3bbd17
chore: fix erroneous opts additions
samcamwilliams Mar 6, 2026
742b07a
fix: `raw` returns the data of a transaction in its `body` field
samcamwilliams Mar 6, 2026
6259f12
feat: sliding window and granularly recharging rate-limiter with `debt`.
samcamwilliams Mar 6, 2026
5b5ecc6
impr: terminate streams with 429'd peers
samcamwilliams Mar 6, 2026
ebbdade
impr: return 429 error directly, rather than applying any subsequent …
samcamwilliams Mar 6, 2026
a31684c
impr: refactor dev_bundler to remove redundant dispatch server
JamesPiechota Mar 6, 2026
1b1655b
impr: refactor dev_bundler and let recovery run asynchronously
JamesPiechota Mar 6, 2026
6e8130b
impr: speed up bundler by removing tx data when only header is needed
JamesPiechota Mar 7, 2026
87588e1
fix: fix bundler regression causing proofs not to be posted (unreleas…
JamesPiechota Mar 7, 2026
4cfd75f
chore: typos
JamesPiechota Mar 7, 2026
066f89f
impr: post the #tx record directly in bundler instead of using resolve
JamesPiechota Mar 7, 2026
dd9499c
Merge remote-tracking branch 'hyperbeam-main/impr/bundler-recovery-20…
samcamwilliams Mar 7, 2026
79cf335
impr: `hb_maps` for `get` in 500 page rendering
samcamwilliams Mar 7, 2026
d9a5f74
chore: remove debugging log that shouldn't have been committed:
JamesPiechota Mar 7, 2026
91c9180
Merge branch 'chore/bundler-logs-20260307' into impr/gun
samcamwilliams Mar 7, 2026
3b69346
chore: params
samcamwilliams Mar 7, 2026
322e326
fix: manifests return 404 on load error now, rather than 5xx.
samcamwilliams Mar 7, 2026
94db201
chore: event
samcamwilliams Mar 7, 2026
27995e2
chore: fix edge-case bug for manifests that contain an `id` subdirectory
samcamwilliams Mar 8, 2026
c45cba8
Merge pull request #740 from permaweb/fix/manifest-404
samcamwilliams Mar 8, 2026
91c3199
impr: both from and to can be negative offsest from tip (copycat)
JamesPiechota Mar 9, 2026
ad27c4b
Merge pull request #742 from permaweb/impr/copycat-negative-to-20260309
samcamwilliams Mar 9, 2026
5822863
log: add bundler_upload_error log
JamesPiechota Mar 11, 2026
24f1f6b
Merge pull request #747 from permaweb/log/bundler-upload-error-20260311
JamesPiechota Mar 11, 2026
299fe21
feat: support multiple blacklist providers
nikooo777 Mar 11, 2026
87d5dde
Simplify: drop backward compat, use blacklist_providers only
nikooo777 Mar 11, 2026
3b0bdd6
Merge pull request #746 from permaweb/feat/multi-blacklist
samcamwilliams Mar 11, 2026
a80056b
fix: cherrypick singleton code from feat/safe-harbour
JamesPiechota Mar 11, 2026
66facf1
Merge pull request #748 from permaweb/impr/singleton-cherrypick-20260311
JamesPiechota Mar 11, 2026
af25f8c
chore: add `blacklist@1.0` to `on/request` defaults
samcamwilliams Mar 12, 2026
e299890
impr: silent singleton enforcement flow
samcamwilliams Mar 12, 2026
205c2ca
impr: use singleton pattern on table creation
samcamwilliams Mar 12, 2026
04dbb46
fix: ets table generation
samcamwilliams Mar 12, 2026
39d5332
fix: improve collection of blacklist IDs
samcamwilliams Mar 12, 2026
3110223
Revert "Merge pull request #729 from permaweb/speeddragon/impr/manife…
samcamwilliams Mar 5, 2026
1299d41
fix: Harden event server against crash and stale PID caching
nikooo777 Mar 2, 2026
e7af0d7
fix: Add timeout to cpu_sup:avg5 in metrics collector
nikooo777 Mar 2, 2026
72b4c24
fix: Use selective ETS query for event counters
nikooo777 Mar 2, 2026
3d92487
fix: Remove unnecessary spawn in metric recording paths
nikooo777 Mar 2, 2026
dbe938e
fix: Guard unprotected Prometheus writes in hot paths
nikooo777 Mar 2, 2026
e7c544b
fix: Cache Prometheus startup failure with retry backoff
nikooo777 Mar 2, 2026
cf6f5f5
fix: Bound event server Prometheus wait and handle late startup
nikooo777 Mar 2, 2026
18915f5
fix: Restore spawn in record_request_metric for latency isolation
nikooo777 Mar 2, 2026
b4ca0bd
fix: dev_copycat_arweave test
speeddragon Mar 5, 2026
b651a0a
disable failure test, until we find a unsupported tx
speeddragon Mar 5, 2026
9ba746f
fix: Test in dev_codec_tx, hb_ao_test_vectors, hb_http_client and hb_…
speeddragon Mar 6, 2026
e401c54
fix: Add host to httpsig requests
speeddragon Mar 6, 2026
f4d24ae
fix: prometheus declare instead of new
speeddragon Mar 6, 2026
d33a758
fix: init hb on hb_client
speeddragon Mar 7, 2026
5bb8bef
Reapply "Merge pull request #729 from permaweb/speeddragon/impr/manif…
speeddragon Mar 9, 2026
e2cfc52
impr: prometheus handling and fix POST tx endpoint
speeddragon Mar 10, 2026
f748353
impr: use singleton pattern
speeddragon Mar 10, 2026
5da22e9
fix: increase timer on as_load test to temporarly fix test
speeddragon Mar 10, 2026
23b706f
fix: dev_name test that was broken by providing host header now
speeddragon Mar 10, 2026
a333ce9
impr: Add option to remote store to only read IDs
speeddragon Mar 10, 2026
11ba07e
fix: dev_blacklist test when starting a new node with existing priv_w…
speeddragon Mar 10, 2026
a9b4e2a
fix: dev_bundler node start, when we already started one
speeddragon Mar 10, 2026
59a1fe9
impr: Testing documentation
speeddragon Mar 10, 2026
584d93b
Update hacking-on-hyperbeam.md
samcamwilliams Mar 10, 2026
c721f11
fix: tests with wallet
speeddragon Mar 11, 2026
4934428
fix: Revert changes, use httpc instead of gun in arns test
speeddragon Mar 11, 2026
fe43eea
impr: gun event logging
samcamwilliams Mar 6, 2026
dd383dd
impr: prometheus management
samcamwilliams Mar 6, 2026
a13ac36
fix: tests
speeddragon Mar 11, 2026
0b9d76e
fix: use gun with http1 to fix arns test
speeddragon Mar 11, 2026
77870af
fix: Add host header, fix tests
speeddragon Mar 12, 2026
94c6efe
fix: infinite loop in singleton registration race condition
samcamwilliams Mar 12, 2026
6f8eaaa
chore: tidy form
samcamwilliams Mar 12, 2026
46151ac
Merge pull request #720 from permaweb/fix/neo-logging
samcamwilliams Mar 12, 2026
21f0ae2
fix: handle as-tuples in blacklist ID collection
nikooo777 Mar 13, 2026
2d3ba28
Merge branch 'fix/blacklist' into impr/gun
nikooo777 Mar 13, 2026
ffee659
fix: subdomain extraction from hostname
samcamwilliams Mar 15, 2026
e0d2756
fix: gun orphans
shyba Mar 13, 2026
526c644
impr: avoid infinity on http client
shyba Mar 13, 2026
6f971f7
fix: gun edge case hang
shyba Mar 13, 2026
1af0abd
Merge remote-tracking branch 'NewEstablishment/fix/gun_hypothesis' in…
samcamwilliams Mar 16, 2026
577ad3f
chore: events > debugFmt
samcamwilliams Mar 16, 2026
7705091
chore: events and nomenclature
samcamwilliams Mar 16, 2026
36d67b0
impr: blacklist refresh handling
samcamwilliams Mar 16, 2026
9007ca2
Merge branch 'impr/blacklist-loading' into impr/gun
samcamwilliams Mar 16, 2026
34acdcc
impr: Basic 52 char subdomain to TX - WIP
speeddragon Mar 12, 2026
a3b4f66
impr: Working version of no TXID manifests, 52 chars manifests. Missi…
speeddragon Mar 12, 2026
7a31717
impr: Added tests to dev_name 52char
speeddragon Mar 13, 2026
d44ca54
impr: Improve tests, add 404 on ARNS not in the list and not a 52 cha…
speeddragon Mar 13, 2026
c3617d3
impr: Fix PR comments
speeddragon Mar 13, 2026
e09efab
impr: separate `base32` name resolution into standalone device
samcamwilliams Mar 16, 2026
c2ede80
fix: unify `~manifest@1.0` test environment generation
samcamwilliams Mar 16, 2026
492ee97
Merge pull request #751 from permaweb/impr/manifest_52char
samcamwilliams Mar 16, 2026
2b85638
fix: improve readiness detection by awaiting the first `meta` key write
samcamwilliams Mar 16, 2026
e714420
wip: Arweave global offsets as names
samcamwilliams Mar 15, 2026
74dc46a
fix: only load message if the result is an ID
samcamwilliams Mar 15, 2026
2363366
fix: tests; small bug fixes
samcamwilliams Mar 15, 2026
83519af
impr: set Arweave offset lookup as initial name resolver
samcamwilliams Mar 15, 2026
e8f9f1a
impr: `/raw` API exposes a simple `offset` key whose response can be …
samcamwilliams Mar 15, 2026
70e5cbc
impr: remove `tx_path` parsing; abstract bundle header decoding
samcamwilliams Mar 15, 2026
ae0a398
feat: add support for resolving nested bundled messages and resolutio…
samcamwilliams Mar 16, 2026
2f573b0
feat: add support for byte units (mb, gb, etc) in Arweave offset refe…
samcamwilliams Mar 16, 2026
266c166
impr: remove duplicated chunk fetches
samcamwilliams Mar 16, 2026
3818c14
fix: reject lone unit symbols without associated ints
samcamwilliams Mar 16, 2026
6d90c64
fix: zebibyte infinite recursion
samcamwilliams Mar 16, 2026
9414b31
Merge pull request #753 from permaweb/feat/offset-names
samcamwilliams Mar 16, 2026
1a56755
impr: ~9x speedup on events handling
shyba Mar 16, 2026
c26f533
impr: event handling in batches
shyba Mar 16, 2026
a34b7cd
fix: xxx_debug -> debug_xxx for ?event topics so they don't get added…
JamesPiechota Mar 13, 2026
2171c23
fix: allow binary event names
JamesPiechota Mar 13, 2026
867abb2
fix: don't need full chunk to get dataitem header
JamesPiechota Mar 17, 2026
4cba407
Merge pull request #756 from permaweb/fix/raw-header-20260316
samcamwilliams Mar 17, 2026
86b611c
impr: remove process dictionary
samcamwilliams Mar 17, 2026
459294a
impr: test realism
samcamwilliams Mar 17, 2026
3aeea2d
impr: simplify
samcamwilliams Mar 17, 2026
dad7ea1
Merge pull request #757 from permaweb/impr/eventbatching
samcamwilliams Mar 17, 2026
3033681
fix: Make TX load, and doesn't try to parse OldMsg
speeddragon Mar 17, 2026
232284c
fix: div -> rem so the check runs
shyba Mar 17, 2026
438039e
Merge pull request #758 from permaweb/fix/event_memory_monitor
speeddragon Mar 17, 2026
86cd2a0
fix: correctly handle inputs to dev_codec_tx when building a bundle
JamesPiechota Mar 17, 2026
38174cb
fix: load base32 as application
speeddragon Mar 17, 2026
294ae42
Merge remote-tracking branch 'hyperbeam-main/fix/b32_subdomain' into …
samcamwilliams Mar 17, 2026
05e1f4a
Merge pull request #744 from permaweb/fix/hyperbuddy-path-resolution
samcamwilliams Mar 17, 2026
8dda9ca
feat: add support for serving custom local files as part of the `hype…
samcamwilliams Mar 17, 2026
8151e12
chore: add small comment on usage
samcamwilliams Mar 18, 2026
dc00725
Merge pull request #761 from permaweb/feat/hyperbuddy-custom-serve
samcamwilliams Mar 18, 2026
23805b2
chore: move `dev_codec_tx:to(List)` into `dev_bundler_task`
JamesPiechota Mar 18, 2026
64a0a03
Merge pull request #759 from permaweb/fix/uploader-aotypes-20260317
samcamwilliams Mar 18, 2026
64676b5
impr: Blacklist handling of long blacklist file
speeddragon Mar 18, 2026
52bf0da
impr: Blacklist performance
speeddragon Mar 18, 2026
6792fa1
impr: Blacklist hook req handling
speeddragon Mar 18, 2026
329122e
Revert "impr: Remove erlang_vm metrics"
speeddragon Mar 18, 2026
ed3c1b7
impr: add hb_process_sampler to track attributes of all running proce…
JamesPiechota Mar 14, 2026
122ead4
Merge pull request #762 from permaweb/fix/b32_subdomain
speeddragon Mar 18, 2026
dc9dcad
Merge pull request #766 from permaweb/impr/process-sampler-20260318
samcamwilliams Mar 18, 2026
25b024a
Update observer_cli dependency reference in rebar.config
speeddragon Mar 18, 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
12 changes: 2 additions & 10 deletions config/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
{prometheus, [
{cowboy_instrumenter, [
{duration_buckets, [0.001, 0.01, 0.1, 0.25, 0.5, 0.75, 1, 2, 4, 10, 30, 60]}
]},
{collectors, [
prometheus_boolean,
prometheus_counter,
prometheus_gauge,
prometheus_histogram,
prometheus_mnesia_collector,
prometheus_quantile_summary,
prometheus_summary]}
]}
]}
].
].
27 changes: 26 additions & 1 deletion docs/misc/hacking-on-hyperbeam.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,29 @@ since the last invocation.

3. Open the svg file in browser.

Happy hacking!
## Common testing pitfalls

Here is a helpful list of common mistakes when writing tests:

- If you need to start a new node, be sure to use a new private key unless you
have a specific reason to use an existing one. HyperBEAM HTTP servers are
registered using their wallet ID as their 'name', so re-use can cause issues.
You can get a new private key is defined using `#{ priv_wallet => ar_wallet:new() }`.
- Similarly, always be careful of your stores in your tests! Avoid using the
default stores, as this can lead to 'context leakage', where one part of your
test is unintentionally able to access data created/stored by a supposedly
different node in the environment. `hb_http_server:start_node/1` will generate
a new unique store for you by default, but avoid creating a named store unless
you need to (and know what you are doing).
- Always try to test your devices through the HTTP AO-Core API as well as through
the local `hb_ao:resolve/[2-3]` interfaces. Avoid direct `dev_name:key` calls
unless strictly necessary. The HTTP API is how users will interact with your
almost always system, and there can be subtle differences in how the interfaces
react. For example, the Erlang function call interface has no regard for how
keys are matched by AO-Core, so will mask any issues with the choice of which
device function to call to satisfy requests.

Happy hacking!

Avoid pattern match a list of commitments, since we cannot guarantee the order.
This will case tests to be flaky.
17 changes: 12 additions & 5 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{erl_opts, [debug_info, {d, 'COWBOY_QUICER', 1}, {d, 'GUN_QUICER', 1}]}.
{plugins, [pc, rebar3_rustler, rebar_edown_plugin]}.
{plugins, [pc, rebar3_rustler, rebar_edown_plugin, {rebar3_eunit_start, {git, "https://github.com/permaweb/rebar3_eunit_start.git", {ref, "04ec53fea187039770db0d4459b7aeb01a9021af"}}}]}.

% Increase `scale_timeouts` when running on a slower machine.
{eunit_opts, [verbose, {scale_timeouts, 10}]}.
{eunit_opts, [verbose, {scale_timeouts, 10}, {start_applications, [prometheus, hb]}]}.

{profiles, [
{quiet,
Expand All @@ -12,7 +12,12 @@
]
},
{no_events, [{erl_opts, [{d, 'NO_EVENTS', true}]}]},
{top, [{deps, [observer_cli]}, {erl_opts, [{d, 'AO_TOP', true}]}]},
{top, [
{deps, [{observer_cli, {git, "https://github.com/permaweb/observer_cli.git",
{ref, "7e7a2613b262e08c43c539d50901e6f26a241b6f"}}}]},
{erl_opts, [{d, 'AO_TOP', true}]},
{relx, [{release, {'hb', "0.0.1"}, [hb, b64fast, base32, cowboy, gun, luerl, prometheus, prometheus_cowboy, prometheus_ranch, elmdb, observer_cli]}]}
]},
{store_events, [{erl_opts, [{d, 'STORE_EVENTS', true}]}]},
{ao_profiling, [{erl_opts, [{d, 'AO_PROFILING', true}]}]},
{eflame,
Expand Down Expand Up @@ -108,7 +113,8 @@

{provider_hooks, [
{pre, [
{compile, {cargo, build}}
{compile, {cargo, build}},
{eunit, {default, rebar3_eunit_start}}
]},
{post, [
{compile, {pc, compile}},
Expand All @@ -134,6 +140,7 @@

{deps, [
{elmdb, {git, "https://github.com/permaweb/elmdb-rs.git", {ref, "bfda2facebdb433eea753f82e7e8d45aefc6d87a"}}},
{base32, "1.0.0"},
{b64fast, {git, "https://github.com/ArweaveTeam/b64fast.git", {ref, "58f0502e49bf73b29d95c6d02460d1fb8d2a5273"}}},
{cowlib, "2.16.0"},
{cowboy, "2.14.0"},
Expand Down Expand Up @@ -162,7 +169,7 @@
]}.

{relx, [
{release, {'hb', "0.0.1"}, [hb, b64fast, cowboy, gun, luerl, prometheus, prometheus_cowboy, prometheus_ranch, elmdb]},
{release, {'hb', "0.0.1"}, [hb, b64fast, base32, cowboy, gun, luerl, prometheus, prometheus_cowboy, prometheus_ranch, elmdb]},
{sys_config, "config/app.config"},
{include_erts, true},
{extended_start_script, true},
Expand Down
3 changes: 3 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{git,"https://github.com/ArweaveTeam/b64fast.git",
{ref,"58f0502e49bf73b29d95c6d02460d1fb8d2a5273"}},
0},
{<<"base32">>,{pkg,<<"base32">>,<<"1.0.0">>},0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.14.0">>},0},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.16.0">>},0},
{<<"ddskerl">>,{pkg,<<"ddskerl">>,<<"0.4.2">>},1},
Expand All @@ -30,6 +31,7 @@
[
{pkg_hash,[
{<<"accept">>, <<"CD6E34A2D7E28CA38B2D3CB233734CA0C221EFBC1F171F91FEC5F162CC2D18DA">>},
{<<"base32">>, <<"1AB331F812FCC254C8F7D4348E1E5A6F2B9B32B7A260BF2BC3358E3BF14C841A">>},
{<<"cowboy">>, <<"565DCF221BA99B1255B0ADCEC24D2D8DBE79E46EC79F30F8373CCEADC6A41E2A">>},
{<<"cowlib">>, <<"54592074EBBBB92EE4746C8A8846E5605052F29309D3A873468D76CDF932076F">>},
{<<"ddskerl">>, <<"A51A90BE9AC9B36A94017670BED479C623B10CA9D4BDA1EDF3A0E48CAEEADA2A">>},
Expand All @@ -42,6 +44,7 @@
{<<"ranch">>, <<"25528F82BC8D7C6152C57666CA99EC716510FE0925CB188172F41CE93117B1B0">>}]},
{pkg_hash_ext,[
{<<"accept">>, <<"CA69388943F5DAD2E7232A5478F16086E3C872F48E32B88B378E1885A59F5649">>},
{<<"base32">>, <<"0449285348ED0C4CD83C7198E76C5FD5A0451C4EF18695B9FD43792A503E551A">>},
{<<"cowboy">>, <<"EA99769574550FE8A83225C752E8A62780A586770EF408816B82B6FE6D46476B">>},
{<<"cowlib">>, <<"7F478D80D66B747344F0EA7708C187645CFCC08B11AA424632F78E25BF05DB51">>},
{<<"ddskerl">>, <<"63F907373D7E548151D584D4DA8A38928FD26EC9477B94C0FFAAD87D7CB69FE7">>},
Expand Down
Loading