forked from samcamwilliams/HyperBEAM
-
Notifications
You must be signed in to change notification settings - Fork 74
Add unsigned ans104 commitments #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
JamesPiechota
wants to merge
22
commits into
edge
Choose a base branch
from
fix/codec-tx-tests
base: edge
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+596
−387
Conversation
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
…hey get picked up by hb_message:id
…m graphql response
Update the test, and implement verify for unsigned ans104
4c35dea to
6dbafdd
Compare
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.
Original intent of this PR was to add an unsigned
ans104commitment whenever decoding or committing anans104message. I'm not familiar with the context of this change, but it was intended to address an urgent issue that showed up around Nov. 20, 2025. A different workaround for that issue was implemented, removing the urgency, but these changes are still considered the right long-term fix.State of PR as of Dec. 1, 2025:
ans104commitment whenever decoding or committing anans104messagetransaction,transactions,id, andidsgraphql queriesdev_codec_ans104:commit(it was returning a#txrather than message)dev_codec_ans104_to:maybe_load(clean outhttpsigcommitments that were getting added to nested messages)dev_codec_ans104:unsigned_mixedcase_bundle_map_tags_testfailuredev_query_arweavewhere it was return IDs for unmatching commitments (e.g. returning an unsigned ID when the query included an owner filter)One remaining test failure:
hb_store_gateway:remote_hyperbeam_node_ans104_testhttpsigand so is no longer returned by graphqlOpen Questions
Context: Default ID
The root cause of many of the errors hit developing this PR is that several parts of the HyperBEAM codebase implement the concept of a "default ID", but this is not a formalized concept in HB and isn't implemented consistently. In these cases the "default ID" is just an unsigned
httpsigID. Some examples:dev_message:iddev_message:idonly generates IDs for signed commitments, if no signed commitment is found, it defaults to using an unsigned httpsig idnoneorallis passed as thecommittersvalue when callingdev_message:idnoneis provided, list of commitments is empty and so logic defaults tohttpsigidallis provided, only commitments with acommittertag (i.e. signed commitment) are consideredhb_cache:writehttpsigID is always returned - even for messages without anyhttpsigcommitments or which have another unsigned commitment.Context: GraphQL
Prior to this PR GraphQL was inconsistent in its ID handling. Querying a message matching on the default ID (i.e. unsigned
httpsigid) will cause all IDs (signed IDs as well as default ID) of the matching messages to be added to the match list (and either all returned fortransactionsor an arbitrary ID to be returned fortransaction)match_argswhen all matching IDs were exploded to all IDshb_message:idlogic which excludes unsigned IDs other than the default ID. As a result graphql will only return signed IDs, with the exception of unsignedhttpsigIDs which are returned. Unsignedans104IDs, for example, will never be returned.Questions
dev_message:idimplementation so that it can generate IDs off of unsigned commitments?allshould select unsigned in addition to signed commitments