The Great Renumbering
bitcoin ยท ordinals

Inscription numbers are numbers assigned to inscriptions in the order in which they are created, starting at zero for the genesis inscription.

When inscription numbers were originally added to ord, the Ordinals wallet and explorer that powers, they were intended to be stable and never change.

However, now that we have more experience with the protocol, that seems less tenable and has undesirable consequences, as maintaining stable inscription numbers is a challenge in the face of changes to the inscription protocol.

Consider a simple case, an update that allows multiple inscriptions to be created in a single transaction.

The inscription numbers assigned by an implementation that recognizes multiple inscriptions in a single transaction would differ from those assigned by an implementation that does not.

The former implementation would see T1, creating two new inscriptions, and T2, creating a single new inscription, and assign inscription numbers N, N+1, and N+2, the latter implementation would assign inscription number N to the first and only inscription it recognized in T1, and N+1 to the inscription in T2.

There are many such updates that we would like to make or have made which would introduce discrepancies like these, including:

We've been able to make these changes and keep inscription numbers stable using what I've now come to think of as a regrettable hack: cursed inscriptions. Whenever ord indexes an inscription which would not be recognized by an earlier version, it assigns a negative inscription number. This keeps old inscription numbers stable, while still recognizing new inscriptions.

Cursed inscriptions and negative inscriptions numbers have a number of downsides:

In light of the above, I propose that we make inscription numbers permanently unstable, and bless all cursed inscriptions, both retroactively and on an ongoing basis. Cursed inscription numbers would be folded into the main sequence, and, going forward, inscription numbers should not be used in URLs, which is already the case for ord, and inscription numbers would be de-emphasized on /inscription pages.

This would substantially simplify the ord codebase, make it easier to produce an implementation that assigns the same sequence numbers, and make future protocol changes easier.