fix: publish scheduler location to Arweave with AO-protocol CamelCase tags#676
Open
atticusofsparta wants to merge 1 commit intopermaweb:edgefrom
Open
fix: publish scheduler location to Arweave with AO-protocol CamelCase tags#676atticusofsparta wants to merge 1 commit intopermaweb:edgefrom
atticusofsparta wants to merge 1 commit intopermaweb:edgefrom
Conversation
… tags
The AO ecosystem GQL query (`hb_gateway_client:location`) searches for
`Type: "Scheduler-Location"` but `generate_new_location/5` was uploading
the signed TABM directly via `hb_client:upload`, which serialises keys
using HyperBEAM's lowercase-key convention, producing tags such as
`type: location`.
Replace the upload call with `upload_to_arweave/4`, which builds a
`#tx{}` data item directly with the CamelCase tag names required by the
AO protocol (`Type`, `Data-Protocol`, `Variant`, `Url`), signs it with
`ar_bundles:sign_item`, and posts the serialised bytes via
`dev_arweave:post_binary_ans104`. The internal TABM representation
(stored in the local cache and returned to callers) is unchanged.
`upload_to_arweave/4` respects whichever bundler is configured:
`bundler_httpsig` takes precedence over `bundler_ans104`; if neither is
set the upload is skipped and an event is logged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generate_new_location/5was uploading the signed TABM directly viahb_client:upload, which serialises Erlang map keys using HyperBEAM's lowercase convention — producing Arweave tags liketype: locationandurl: ...hb_gateway_client:locationsearches forname: "Type", values: ["Location", "Scheduler-Location"](CamelCase), so published records were never discoverableupload_to_arweave/4which builds a#tx{}data item directly with the correct AO-protocol CamelCase tags (Type: Scheduler-Location,Data-Protocol: ao,Variant: ao.N.1,Url: ...), signs it withar_bundles:sign_item, and posts viadev_arweave:post_binary_ans104bundler_httpsigtakes precedence overbundler_ans104; logs an event and skips if neither is setTest plan
rebar3 compilebundler_httpsigorbundler_ans104configured andlocation_codec: ans104@1.0Type: "Scheduler-Location"owned by the node wallet — record should appear within 1–2 blockshb_gateway_client:location/2resolves the node's own address🤖 Generated with Claude Code