attest: Compute default for ENCODED_* from EPOCH, simpler NO_SIGN#54
Open
hodlinator wants to merge 3 commits into
Open
attest: Compute default for ENCODED_* from EPOCH, simpler NO_SIGN#54hodlinator wants to merge 3 commits into
hodlinator wants to merge 3 commits into
Conversation
Also drop empty newline after help text since at least in bash it appears we get an additional empty one anyway.
In this case we just output the SHA256SUMS to the console.
jurraca
suggested changes
Jun 9, 2026
jurraca
left a comment
Collaborator
There was a problem hiding this comment.
ACK on the SIGNER/NO_SIGN change (103a6e5) but the ENCODED_* default paths change have tradeoffs that imo are problematic:
- the point of attestation is not to rely on the files here, but to provide an attestation that the user generated themselves, so that we can compare the attestations to the files in the tree. If the defaults are used, the user is attesting to what's already there. We want the user to provide their own encoded files, showing that they got a final result, and encoded it, and attested to those files.
- Ideally the user could provide the
ASMAP_TXTas currently, and call out to thebitcoin/contrib/asmap/asmap-tool.pyto encode the files on the fly, and generate the attestation from there. This is maybe a better approach, though it complicates the script a bit. - On attesting to a new run, the default file paths do not exist, so they are required unless the files already exist.
$ env NO_SIGN=1 ASMAP_TXT=../kartograf/out/1780588800/final_result.txt EPOCH=1780588800 ./asmap-attest
ERR: The specified ENCODED_FILLED does not exist or is not a regular file:
'2026/1780588800_asmap.dat'
| diff -u "$sha256sums_file" "$temp_sha256sums" || true | ||
| if [ -z "$SIGNER" ]; then | ||
| echo "Computed SHA256SUMS at $temp_sha256sums:" | ||
| cat $temp_sha256sums |
Collaborator
There was a problem hiding this comment.
we should rm -rf $temp_sha256sums here too
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.
Improves ergonomics of the asmap-attest script:
ENCODED_*env vars as their default locations can be computed based offEPOCHnow that the script and files (often) reside in the same repo.SIGNERifNO_SIGNis set and only output SHA256SUMS in that case. (More subjective value than other commits).Inspired by discussion at #50 (comment)