Awazon Shapes

Thesis

What a shape proves, and where it stops

Awazon market links

Supplied by the site owner and printed unchanged, with nothing added and nothing ranked. This reference contacts none of them, so it reports no availability of any kind.

Every card on this site ends with a section about limits. This page states the general case those sections are instances of.

A format check is a comparison between a string and a rule. The rule describes characters and positions. The comparison returns one of two answers, and both answers are about the string alone.

That is a narrow result, and it is worth having. The argument of this page is that it is narrow and worth having at the same time, and that most of the trouble people get into with formats comes from taking the result as broader than it is.

The four things a check does settle

Alphabet membership

Every character in the string is drawn from the permitted set. This is the coarsest of the four and the fastest to run, and it is the one that catches text which has passed through a system that rewrote it: a smart quote where a plain one belonged, a letter substituted by an autocorrect, a character from another script that renders identically. The permitted sets are on the four alphabets.

Length

The string is exactly as long as the format requires, or as long as one of the permitted lengths. Length is the check that catches transport damage, since almost everything that goes wrong in transit either removes characters or adds them. Ways of establishing a length reliably are on counting characters without a tool.

Structure

The parts are present, in order, with the right separators between them and the right fixed content in the fixed positions. A structure check is what distinguishes a block that has all the right lines from one that merely has all the right characters, and it is the reason an armoured block can fail while every character inside it is legitimate.

Internal consistency, where a checksum exists

Some formats carry a few characters computed from the rest of themselves. When those characters agree with the rest, the string is consistent with itself, and a single mistyped character somewhere else in it would have made them disagree. This is the strongest of the four checks and it is still a statement about one string in isolation.

The gaps that stay open afterwards

Each of these survives a check that passes on every one of the four counts above. They are stated as situations rather than as warnings, because in each case the situation is entirely ordinary.

  • A wallet address can be correctly formed, checksum and all, and be an address belonging to somebody you have never heard of. The checksum is computed from the address; it knows nothing about the owner.
  • A key fingerprint can have the right length and the right alphabet while being the fingerprint of a key you have never seen, made by anyone at all, at any time.
  • An armoured block can open and close correctly, carry a checksum line, and be a block that was assembled by hand from parts of two others.
  • A transaction identifier can be perfectly shaped and refer to no transaction that exists, because the shape is generated by the same arithmetic whether or not there is anything behind it.
  • A hash can be exactly the right length and be the correct hash of a file you did not want.
  • A hostname can satisfy every rule of its format and be a name nobody has ever registered, or one registered by anyone.
  • An amount can carry the right number of decimal places and be the wrong amount by a factor of a thousand.
  • A timestamp can be well formed and describe a moment chosen by whoever typed it.
  • A string can pass every check and still not be the string you were sent, because a second string with the same shape would pass identically.
  • A string can pass every check today and refer to something that stopped existing before you read it. Formats do not expire, and nothing about a shape carries a date.

Check by check

The checkWhat it settlesWhat it leaves entirely open
Alphabet membershipNo character in the string is outside the permitted setWhich of the enormous number of strings inside that set this one is
LengthNothing was lost or gained between the source and your screenWhether the source was the one you think, since a substitution keeps the length
Fixed positions and separatorsThe parts are present and in the right orderWhat any of those parts refer to, or whether they refer to anything
Internal checksumThe string is consistent with itself and has not been altered by one or two charactersWho produced it, when, and whether the whole of it was replaced at once
Case patternThe string matches the casing convention it claimsNothing beyond that, since case is a convention of printing
Line discipline in an armoured blockThe block survived transport with its structure intactWhat the body contains, since this reference never shows or reads one

Cheapest and weakest at once

A shape check is the cheapest filter available to a reader. It needs no software, no account, no network and no permission from anyone, it runs in seconds, and it can be run on a string that you have decided not to use for anything.

It is also the weakest evidence available. Everything it establishes is a property of the characters in front of you, and every interesting question about a string is a question about the world the string came from.

Both of those are true simultaneously, and neither cancels the other. Cheap and weak is a perfectly good combination for a first pass, provided nothing is asked of it afterwards.

Why this reference stops here

This site tests nothing, contacts nothing and measures nothing. It has no idea whether any string on any page corresponds to anything, and it does not attempt to find out.

The reason is not modesty. Any figure produced by contacting something would be an observation of one moment from one place, made by a machine the reader cannot see, and republished later as though it were a standing property. A reader cannot reproduce it and has no way to check it. A format rule is the opposite: it is stated in full on the page, and a reader with the string in front of them can confirm or reject the claim without trusting the person who wrote it.

So the reference confines itself to the class of statements a reader can verify unaided. That is a small class. It is stated exactly, on the cards listed at every shape on this reference, and the six sections each card uses are described on how to read a card here.

Every page on this reference