Before embedding an ASmap in Bitcoin Core, contributors should attest to the ASmap they create with a well-known PGP key. This allows us to verify that the ASmap file was the same across contributors, and that the contributor’s submission This process is analogous to the Guix signing process and the scripts here are heavily inspired from guix-attest and guix-verify.
The attestation repository is currently under the “asmap” organization.
The asmap-attest script process is:
- take an ASmap as input
- encode it with the
asmap-toolpython script in this directory - produce two encoded files: filled and unfilled binary ASmaps
- create an attestation file with the hash of the input ASmap and the hashes of both encoded files
- sign that file with the signer’s PGP key
- write the attestation and signatures files to the attestation repository
This process writes 4 files in total: both encoded files to the local directory, an attestation file and its signature to the attestation repository (asmap.sigs) (unless the NO_SIGN env var is set) . The input ASmap file is usually around 33MB, the encoded files around 1.5MB (filled) and 1.8MB (unfilled), and the attestation file and signature are sub 1MB.
The asmap-verify script validates the signatures in the repo. The user must add the signer’s keys to their GPG keyring before verifying attestations.
No tests are added here. These scripts don’t interface with any runtime functionality in the codebase.