Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ed63843
chore: increase global test timeout
samcamwilliams Jul 15, 2025
9449c72
fix: scheduler server uses full node message in signing flow
samcamwilliams Jul 15, 2025
1cf9a9e
chore: formatting and LMDB init location safety check
samcamwilliams Jul 15, 2025
9825210
refactor: copy LMDB store data during migration
PeterFarber Jul 15, 2025
a49fb11
chore: don't copy wallet if non vol exists and load key file from non…
PeterFarber Jul 15, 2025
850c8c6
fix: correctly shutdown stores; `hb_store_lmdb` matches new API
samcamwilliams Jul 15, 2025
099c914
fix: hb_volume store normalization
samcamwilliams Jul 15, 2025
05059ea
fix: use correct local store name for hb_store_gateway
samcamwilliams Jul 15, 2025
6050b04
fix: Correctly terminate LMDB store before copy
samcamwilliams Jul 15, 2025
2e647c5
chore: testing file system store
PeterFarber Jul 16, 2025
6316b99
fix: remove no_sync on lmdb
VinceJuliano Jul 16, 2025
ec5ec2e
fix: default opts to lmdb
VinceJuliano Jul 16, 2025
0354608
refactor: generalize store configuration and add universal wallet cop…
PeterFarber Jul 16, 2025
01cac9c
fix: genesis waasm server directory dev
jfrain99 Jul 16, 2025
7093560
fix: `[email protected]` charge sign operation passes Opts
samcamwilliams Jul 16, 2025
298b285
fix: `scope` recursion and filtering
samcamwilliams Jul 16, 2025
cd4567d
chore: `id_result` event group
samcamwilliams Jul 16, 2025
4bab546
impr: trace formatting
samcamwilliams Jul 16, 2025
ce12875
wip: load only target commitment in `hb_cache:read`
samcamwilliams Jul 16, 2025
7ecbfd7
chore: `rebar.config` profiles use `-` rather than `_` to match devic…
samcamwilliams Jul 17, 2025
9fda522
fix: greenzone commit now passing opts vs wallet
PeterFarber Jul 17, 2025
c856747
fix: change how we determin if running release for gen wasm
PeterFarber Jul 17, 2025
27d9cd9
chore: `genesis_wasm` -> `genesis-wasm`
samcamwilliams Jul 17, 2025
d1bf234
chore: misc config options and clean-up
samcamwilliams Jul 17, 2025
f74552d
impr: tidy `hb_cache` individual commitment load
samcamwilliams Jul 17, 2025
ac46176
fix: load all known signatures before checking if a given device is f…
samcamwilliams Jul 17, 2025
cb68bae
fix: ensure that all commitments are fully loaded in `read_all_commit…
samcamwilliams Jul 18, 2025
8a364ad
chore: fix test cases where wallet was being passed to hb_message:commit
jfrain99 Jul 17, 2025
8558b76
chore: add logs to find commit issue location
jfrain99 Jul 21, 2025
6238630
chore: fix test opts
samcamwilliams Jul 21, 2025
9b93b95
wip: test setup
samcamwilliams Jul 21, 2025
bc12bb6
fix: pass opts to commit in test_aos_process
jfrain99 Jul 21, 2025
3e74cfe
fix: hb_message_test_vectors normalizing commitments
jfrain99 Jul 22, 2025
d1fed93
fix: push tests read all commitments
jfrain99 Jul 23, 2025
1f1af4f
fix: subledger to subledger tests
jfrain99 Jul 23, 2025
06bc514
fix: dev_p4 opts, dev_push log, subledger_to_subledger tests
jfrain99 Jul 24, 2025
ddef325
fix: dev_scheduler pass opts tests
jfrain99 Jul 24, 2025
463fd44
fix: hb_store normalize msgs before compare
jfrain99 Jul 24, 2025
77368fd
fix: p4 test
jfrain99 Jul 24, 2025
cb7b5df
fix: revert dev_process change causing infinite loop of links
jfrain99 Jul 25, 2025
aa44a09
fix: finish dev_lua_test_ledger test fix, all tests passing
jfrain99 Jul 28, 2025
8707871
fix: node config env production
jfrain99 Jul 29, 2025
706dbb8
fix: node config env production
jfrain99 Jul 29, 2025
6ec66b0
fix: clean up events, beautify branch
jfrain99 Jul 29, 2025
6878098
feat: fix normalize commitments for unsigned
jfrain99 Aug 1, 2025
3704c6b
fix: rework normalize commitments, all tests passing
jfrain99 Aug 5, 2025
5b6e81d
fix: hb_opts list
jfrain99 Aug 6, 2025
e62ede3
chore: revert rebuild of commitments to retrieve process signed ID fo…
samuelmanzanera Aug 6, 2025
31e23d7
fix(wip): do not commit on empty maps
jfrain99 Aug 6, 2025
8def34a
fix(wip): removed enoent clause from hb_store_fs
jfrain99 Aug 7, 2025
38cf678
chore: prune excess logs, unnecessary loads/normalizes
jfrain99 Aug 7, 2025
b0b2820
fix: normalize msgs to match in dev_wasi
jfrain99 Aug 7, 2025
0e940ff
fix: do not strip content type in httpsig_conv
jfrain99 Aug 7, 2025
648914c
Merge branch 'edge' into chore/fix-commit-tests
twilson63 Aug 25, 2025
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WAMR_DIR = _build/wamr

GENESIS_WASM_BRANCH = feat/http-checkpoint
GENESIS_WASM_REPO = https://github.com/permaweb/ao.git
GENESIS_WASM_SERVER_DIR = _build/genesis_wasm/genesis-wasm-server
GENESIS_WASM_SERVER_DIR = _build/genesis-wasm/genesis-wasm-server
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start. genesis_wasm -> genesis-wasm changes


ifdef HB_DEBUG
WAMR_FLAGS = -DWAMR_ENABLE_LOG=1 -DWAMR_BUILD_DUMP_CALL_STACK=1 -DCMAKE_BUILD_TYPE=Debug
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ all devices and sets up default stores on port 10000.

HyperBEAM supports several optional build profiles that enable additional features:

- `genesis_wasm`: Enables Genesis WebAssembly support
- `genesis-wasm`: Enables Genesis WebAssembly support
- `rocksdb`: Enables RocksDB storage backend (adds RocksDB v1.8.0 dependency)
- `http3`: Enables HTTP/3 support via QUIC protocol

Expand All @@ -99,14 +99,14 @@ To start a shell with profiles:
rebar3 as rocksdb shell

# Multiple profiles
rebar3 as rocksdb, genesis_wasm shell
rebar3 as rocksdb, genesis-wasm shell
```

To create a release with profiles:

```bash
# Create release with profiles
rebar3 as rocksdb,genesis_wasm release
rebar3 as rocksdb,genesis-wasm release
```

Note: Profiles modify compile-time options that get baked into the release. Choose the profiles you need before starting HyperBEAM.
Expand Down
12 changes: 6 additions & 6 deletions docs/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14175,7 +14175,7 @@ build system and the runtime execution environment.<a name="index"></a>
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all-0">all/0</a></td><td>Returns a list of all feature flags that the node supports.</td></tr><tr><td valign="top"><a href="#enabled-1">enabled/1</a></td><td>Returns true if the feature flag is enabled.</td></tr><tr><td valign="top"><a href="#genesis_wasm-0">genesis_wasm/0</a></td><td></td></tr><tr><td valign="top"><a href="#http3-0">http3/0</a></td><td></td></tr><tr><td valign="top"><a href="#rocksdb-0">rocksdb/0</a></td><td></td></tr><tr><td valign="top"><a href="#test-0">test/0</a></td><td></td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all-0">all/0</a></td><td>Returns a list of all feature flags that the node supports.</td></tr><tr><td valign="top"><a href="#enabled-1">enabled/1</a></td><td>Returns true if the feature flag is enabled.</td></tr><tr><td valign="top"><a href="#genesis-wasm-0">genesis-wasm/0</a></td><td></td></tr><tr><td valign="top"><a href="#http3-0">http3/0</a></td><td></td></tr><tr><td valign="top"><a href="#rocksdb-0">rocksdb/0</a></td><td></td></tr><tr><td valign="top"><a href="#test-0">test/0</a></td><td></td></tr></table>


<a name="functions"></a>
Expand All @@ -14198,11 +14198,11 @@ Returns a list of all feature flags that the node supports.

Returns true if the feature flag is enabled.

<a name="genesis_wasm-0"></a>
<a name="genesis-wasm-0"></a>

### genesis_wasm/0 ###
### genesis-wasm/0 ###

`genesis_wasm() -> any()`
`genesis-wasm() -> any()`

<a name="http3-0"></a>

Expand Down Expand Up @@ -21299,7 +21299,7 @@ HyperBEAM uses build profiles to enable optional features, often requiring extra

**Available Profiles (Examples):**

* `genesis_wasm`: Enables Genesis WebAssembly support.
* `genesis-wasm`: Enables Genesis WebAssembly support.
* `rocksdb`: Enables the RocksDB storage backend.
* `http3`: Enables HTTP/3 support.

Expand All @@ -21310,7 +21310,7 @@ HyperBEAM uses build profiles to enable optional features, often requiring extra
rebar3 as rocksdb shell

# Start with RocksDB and Genesis WASM profiles
rebar3 as rocksdb, genesis_wasm shell
rebar3 as rocksdb, genesis-wasm shell
```

*Note: Choose profiles **before** starting the shell, as they affect compile-time options.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ HyperBEAM uses a `config.flat` file for configuration when running as a release.

### **b. Build the Release (with Optional Profiles)**

You can build a standard release or include specific profiles for additional features (like `genesis_wasm`, `rocksdb`, `http3`).
You can build a standard release or include specific profiles for additional features (like `genesis-wasm`, `rocksdb`, `http3`).

To build a standard release:
```bash
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/source-code/hb_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build system and the runtime execution environment.<a name="index"></a>
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all-0">all/0</a></td><td>Returns a list of all feature flags that the node supports.</td></tr><tr><td valign="top"><a href="#enabled-1">enabled/1</a></td><td>Returns true if the feature flag is enabled.</td></tr><tr><td valign="top"><a href="#genesis_wasm-0">genesis_wasm/0</a></td><td></td></tr><tr><td valign="top"><a href="#http3-0">http3/0</a></td><td></td></tr><tr><td valign="top"><a href="#rocksdb-0">rocksdb/0</a></td><td></td></tr><tr><td valign="top"><a href="#test-0">test/0</a></td><td></td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all-0">all/0</a></td><td>Returns a list of all feature flags that the node supports.</td></tr><tr><td valign="top"><a href="#enabled-1">enabled/1</a></td><td>Returns true if the feature flag is enabled.</td></tr><tr><td valign="top"><a href="#genesis-wasm-0">genesis-wasm/0</a></td><td></td></tr><tr><td valign="top"><a href="#http3-0">http3/0</a></td><td></td></tr><tr><td valign="top"><a href="#rocksdb-0">rocksdb/0</a></td><td></td></tr><tr><td valign="top"><a href="#test-0">test/0</a></td><td></td></tr></table>


<a name="functions"></a>
Expand All @@ -38,11 +38,11 @@ Returns a list of all feature flags that the node supports.

Returns true if the feature flag is enabled.

<a name="genesis_wasm-0"></a>
<a name="genesis-wasm-0"></a>

### genesis_wasm/0 ###
### genesis-wasm/0 ###

`genesis_wasm() -> any()`
`genesis-wasm() -> any()`

<a name="http3-0"></a>

Expand Down
4 changes: 2 additions & 2 deletions docs/run/running-a-hyperbeam-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ HyperBEAM uses build profiles to enable optional features, often requiring extra

**Available Profiles (Examples):**

* `genesis_wasm`: Enables Genesis WebAssembly support.
* `genesis-wasm`: Enables Genesis WebAssembly support.
* `rocksdb`: Enables the RocksDB storage backend.
* `http3`: Enables HTTP/3 support.

Expand All @@ -173,7 +173,7 @@ HyperBEAM uses build profiles to enable optional features, often requiring extra
rebar3 as rocksdb shell

# Start with RocksDB and Genesis WASM profiles
rebar3 as rocksdb, genesis_wasm shell
rebar3 as rocksdb, genesis-wasm shell
```

*Note: Choose profiles **before** starting the shell, as they affect compile-time options.*
Expand Down
10 changes: 5 additions & 5 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{plugins, [pc, rebar3_rustler, rebar_edown_plugin]}.

{profiles, [
{no_events, [{erl_opts, [{d, 'NO_EVENTS', true}]}]},
{store_events, [{erl_opts, [{d, 'STORE_EVENTS', true}]}]},
{ao_profiling, [{erl_opts, [{d, 'AO_PROFILING', true}]}]},
{'no-events', [{erl_opts, [{d, 'NO_EVENTS', true}]}]},
{'store-events', [{erl_opts, [{d, 'STORE_EVENTS', true}]}]},
{'ao-profiling', [{erl_opts, [{d, 'AO_PROFILING', true}]}]},
{eflame,
[
{deps,
Expand All @@ -20,15 +20,15 @@
{erl_opts, [{d, 'ENABLE_EFLAME', true}]}
]
},
{genesis_wasm, [
{'genesis-wasm', [
{erl_opts, [{d, 'ENABLE_GENESIS_WASM', true}]},
{pre_hooks, [
{compile, "make -C \"${REBAR_ROOT_DIR}\" setup-genesis-wasm"}
]},
{relx, [
{overlay, [
{copy,
"_build/genesis_wasm/genesis-wasm-server",
"_build/genesis-wasm/genesis-wasm-server",
"genesis-wasm-server"
}
]}
Expand Down
5 changes: 3 additions & 2 deletions scripts/hyper-token-p4-client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

-- Find the user's balance in the current ledger state.
function balance(base, request)
ao.event({ "Client received balance request" })
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start improved hyper-token lua events

local status, res = ao.resolve({
path =
base["ledger-path"]
.. "/now/balance/"
.. request["target"]
})
ao.event({ "client received balance response",
ao.event({ "Client received balance response",
{ status = status, res = res, target = request["target"] } }
)
-- If the balance request fails (most likely because the user has no balance),
Expand All @@ -25,7 +26,7 @@ end
-- Charge the user's balance in the current ledger state.
function charge(base, request)
ao.event("debug_charge", {
"client starting charge",
"Client starting charge",
{ request = request, base = base }
})
local status, res = ao.resolve({
Expand Down
5 changes: 2 additions & 3 deletions scripts/hyper-token-p4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ function charge(base, assignment)
-- cost of an execution at lower than its actual cost. Subsequently, the
-- ledger should at least debit the source, even if the source may not
-- deposit to restore this balance.
ao.event({ "Debit request validated: ", { assignment = assignment } })
ao.event({ "Debit request validated, balances before charge: ", { balances = base.balance } })
base.balance = base.balance or {}
base.balance[request.account] =
(base.balance[request.account] or 0) - request.quantity

-- Increment the balance of the recipient account.
base.balance[request.recipient] =
(base.balance[request.recipient] or 0) + request.quantity

ao.event("debug_charge", { "Charge processed: ", { balances = base.balance } })
ao.event({ "Debit request processed, balances after charge: ", { balances = base.balance } })
return "ok", base
end
44 changes: 31 additions & 13 deletions scripts/hyper-token.lua
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ end
-- be from our own root ledger, or from a sub-ledger that is precisely the same
-- as our own.
local function validate_new_peer_ledger(base, request)
ao.event({ "Validating peer ledger: ", { request = request } })
ao.event({ "Validating peer ledger: ", { action = request.action } })

-- Check if the request is from the root ledger.
if is_root(base) or (base.token == request.from) then
Expand All @@ -308,7 +308,7 @@ local function validate_new_peer_ledger(base, request)
-- modified to remove the `authority' and `scheduler' fields.
-- This ensures that the process we are receiving the `credit-notice` from
-- has the same structure as our own process.
ao.event({ "Calculating expected `base` from self", { base = base } })
ao.event({ "Calculating expected `base` from self" })
local status, proc, expected
status, proc = ao.resolve({"as", "[email protected]", base}, "process")
-- Reset the `authority' and `scheduler' fields to nil, to ensure that the
Expand All @@ -320,12 +320,10 @@ local function validate_new_peer_ledger(base, request)
proc,
{ path = "id", commitments = "none" }
)
ao.event({ "Expected `from-base`", { status = status, expected = expected } })
ao.event("debug_base", { "Expected `from-base`", { status = status, expected = expected, proc = proc } })
-- Check if the `from-base' field is present in the assignment.
if not request["from-base"] then
ao.event({ "`from-base` field not found in message", {
request = request
}})
ao.event({ "`from-base` field not found in message" })
return false
end

Expand Down Expand Up @@ -474,6 +472,10 @@ function validate_request(incoming_base, assignment)
})
end

ao.event({ "ensure_initialized", {
status = status,
base = base
}})
-- First, ensure that the message has not already been processed.
ao.event("Deduplicating message.", {
["history-length"] = #(base.dedup or {})
Expand Down Expand Up @@ -598,7 +600,8 @@ local function debit_balance(base, request)
if type(source_balance) ~= "number" then
return "error", log_result(base, "error", {
message = "Source balance is not a number.",
balance = source_balance
balance = source_balance,
type = type(source_balance)
})
end

Expand All @@ -620,7 +623,7 @@ local function debit_balance(base, request)
})
end

ao.event({ "Deducting funds:", { request = request } })
ao.event({ "Deducting funds" })
base.balance[source] = source_balance - request.quantity
ao.event({ "Balances after deduction:",
{ balances = base.balance, ledgers = base.ledgers } }
Expand Down Expand Up @@ -655,10 +658,20 @@ end
-- Xfer in: Sub-ledger = Dec User balance
-- C-N in: Root = Inc User balance, Dec Sub-ledger balance
function transfer(base, assignment)
ao.event({ "Transfer request received", { assignment = assignment } })
ao.event({ "Transfer request received", {
balances = base.balance,
ledgers = base.ledgers,
path = assignment.path,
body = assignment.body
} })
-- Verify the security of the request.
local status, request
status, base, request = validate_request(base, assignment)
ao.event({ "Transfer request validated", {
status = status,
balances = base.balance,
ledgers = base.ledgers
} })
if status ~= "ok" or not request then
return "ok", base
end
Expand Down Expand Up @@ -691,6 +704,7 @@ function transfer(base, assignment)
-- another user. We credit the recipient's balance, or the sub-ledger's
-- balance if the request has a `route' key.
local direct_recipient = request.route or request.recipient
ao.event({ "Balances before credit", { balances = base.balance } })
base.balance[direct_recipient] =
(base.balance[direct_recipient] or 0) + quantity
base = send(base, {
Expand All @@ -700,12 +714,14 @@ function transfer(base, assignment)
quantity = quantity,
sender = request.from
})
ao.event({ "Balances after credit", { balances = base.balance } })
return log_result(base, "ok", {
message = "Direct or root transfer processed successfully.",
from_user = request.from,
to = direct_recipient,
explicit_recipient = request.recipient,
quantity = quantity
quantity = quantity,
balances = base.balance
})
end

Expand Down Expand Up @@ -750,7 +766,7 @@ end

-- Process credit notices from other ledgers.
_G["credit-notice"] = function (base, assignment)
ao.event({ "Credit-Notice received", { assignment = assignment } })
ao.event({ "Credit-Notice received" })

-- Verify the security of the request.
local status, request
Expand Down Expand Up @@ -801,7 +817,8 @@ _G["credit-notice"] = function (base, assignment)
to_ledger = request.sender,
to_user = request.recipient,
quantity = quantity,
balance = base.balance[request.recipient]
balance = base.balance[request.recipient],
balances = base.balance
})
end

Expand Down Expand Up @@ -867,7 +884,7 @@ end
--- We route any `action' to the appropriate function based on the request path.
function compute(base, assignment)
ao.event({ "compute called",
{ balance = base.balance, ledgers = base.ledgers } })
{ balance = base.balance, ledgers = base.ledgers, action = assignment.body.action or "unknown" } })

assignment.body.action = string.lower(assignment.body.action or "")

Expand All @@ -880,6 +897,7 @@ function compute(base, assignment)
elseif assignment.body.action == "register-remote" then
return _G["register-remote"](base, assignment)
else
ao.event({ "Unknown action received, initializing process." })
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end improved hyper-token lua events

-- Handle unknown `action' values.
_, base = ensure_initialized(base, assignment)
base.results = {
Expand Down
14 changes: 10 additions & 4 deletions src/dev_codec_httpsig.erl
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ validate_large_message_from_http_test() ->

committed_id_test() ->
Msg = #{ <<"basic">> => <<"value">> },
Signed = hb_message:commit(Msg, hb:wallet()),
Signed = hb_message:commit(Msg, #{ priv_wallet => hb:wallet() }),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[test] Pass wallet as opt to hb_message:commit

?assert(hb_message:verify(Signed, all, #{})),
?event({signed_msg, Signed}),
UnsignedID = hb_message:id(Signed, none),
Expand Down Expand Up @@ -599,8 +599,14 @@ commit_secret_key_test() ->

multicommitted_id_test() ->
Msg = #{ <<"basic">> => <<"value">> },
Signed1 = hb_message:commit(Msg, Wallet1 = ar_wallet:new()),
Signed2 = hb_message:commit(Signed1, Wallet2 = ar_wallet:new()),
Signed1 = hb_message:commit(
Msg,
#{ priv_wallet => Wallet1 = ar_wallet:new() }
),
Signed2 = hb_message:commit(
Signed1,
#{ priv_wallet => Wallet2 = ar_wallet:new() }
),
Addr1 = hb_util:human_id(ar_wallet:to_address(Wallet1)),
Addr2 = hb_util:human_id(ar_wallet:to_address(Wallet2)),
?event({signed_msg, Signed2}),
Expand All @@ -624,6 +630,6 @@ sign_and_verify_link_test() ->
},
NormMsg = hb_message:convert(Msg, <<"[email protected]">>, #{}),
?event({msg, NormMsg}),
Signed = hb_message:commit(NormMsg, hb:wallet()),
Signed = hb_message:commit(NormMsg, #{ priv_wallet => hb:wallet() }),
?event({signed_msg, Signed}),
?assert(hb_message:verify(Signed)).
4 changes: 2 additions & 2 deletions src/dev_codec_httpsig_conv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ from_body_part(InlinedKey, Part, Opts) ->
hb_maps:without(
[
<<"content-disposition">>,
<<"content-type">>,
% <<"content-type">>,
<<"ao-body-key">>,
<<"content-digest">>
],
Expand Down Expand Up @@ -652,7 +652,7 @@ group_maps(Map, Parent, Top, Opts) when is_map(Map) ->
end;
_ ->
?event({group_maps, {norm_key, NormKey}, {value, Value}}),
case byte_size(Value) > ?MAX_HEADER_LENGTH of
case byte_size(hb_util:bin(Value)) > ?MAX_HEADER_LENGTH of
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cast value to bin if not already

% the value is too large to be encoded as a header
% within a part, so instead lift it to be a top level
% part
Expand Down
Loading