Skip to content

BRC-515: MAP Location Keys (quadkey, world, coordinates.*) - #3

Open
rohenaz wants to merge 13 commits into
masterfrom
cursor/brc-0229-game-world-system-b79d
Open

BRC-515: MAP Location Keys (quadkey, world, coordinates.*)#3
rohenaz wants to merge 13 commits into
masterfrom
cursor/brc-0229-game-world-system-b79d

Conversation

@rohenaz

@rohenaz rohenaz commented Aug 26, 2026

Copy link
Copy Markdown

This pull request:

Proposes a new standard by creating a new markdown file in the appropriate directory and requests discussion and assignment of a BRC number.

Companion document: BRC-515 Companion — MAP Location Keys
Mechanism diagrams (quadkey encoding, prefix nesting, polar caps, custody vs position, multi-cell placement, portals, query semantics), the method and results of independently reproducing the §4 arithmetic, and the four remaining open items.

What this defines

MAP keys for placing things in — and across — worlds, so indexers can answer a region query and clients can render a map or globe.

Key Rule
quadkey Web Mercator quadkey, digits 03, length 1..30. List-valued — an object may occupy several cells. A valid quadkey is what places the output.
world Optional world partition. Earth is the default and is expressed by omission. Ids must self-uniquify: genesis outpoint preferred, hex hash for off-chain worlds, myapp:<seed> a fallback.
coordinates.lat / .lng / .alt Optional WGS 84 point, single-valued. MAP's established compound-attribute convention. Never places. The translation anchor.
geohash, h3 Optional non-placing read keys for consumers already indexing those systems, derived from the same point.

The BRC invents no OP_RETURN framing, no command set, and no ownership model. It rides MAP for attributes and 1Sat Ordinals for identity, custody and authorization.

Numbering

Filed as BRC-515, above every dependency: Bitcom 500, MAP 503, 1Sat 506, envelopes 507, and BRC-514 for state resolution.

Depends on PR #1 (the 500–513 corpus) and PR #4 (BRC-514) landing first or alongside, since both are cited normatively.

Custody and position are separate

§5 keeps two layers apart that a location system built on an ownership system can easily collapse:

  • Custody — origin, transfer under sat ordering, tip, burn — is BRC-159's, cited and not restated.
  • Position — the cells in effect at the tip — is this BRC's. A transaction that re-declares quadkey relocates the object; a transfer on its own leaves it at the same coordinates under new ownership.

Only the party who can spend the tip can write new MAP data, so BRC-159's spend authority already gates every relocation. No signature scheme is defined here.

An earlier draft restated origin/tip/pairing/order with an index-based pairing rule that contradicted BRC-159's sat ordering. That machinery is gone.

Uses MAP's commands rather than inventing removal semantics

SET places · ADD adds a cell · DELETE drops a cell · REMOVE unplaces. Cites BRC-503 §3's ::: instruction-set separator.

Portals

world may change across a transfer. Because MAP state carries forward, a transfer writing only world leaves quadkey in effect and the object arrives at the same cell in a different world. The BRC-159 origin is untouched, so identity survives. One world at a time; arrival is not authorization.

Section 4 is verified

The cell math is unchanged and was reproduced from the specification text alone: MAX_LAT, all three test vectors, the published bounding box to six decimals, every row of the z → edge-length table, the polar-cap digit claim, and exact prefix nesting.

Known dependencies

Upstream: a PR to bsv-blockchain/BRCs is intentionally deferred. This PR is against opldotdev/BRCs master only.

Define a MAP key convention for placing objects in Earth and
seeded game worlds using Web Mercator quadkeys, join tags,
spend-lineage updates, and prefix/viewport queries.
@rohenaz
rohenaz marked this pull request as ready for review August 26, 2026 18:58
Recommend WGS 84 lat and lng on the same MAP SET as gws.cell
so key-presence queries can find a point. They do not place
the output and are not a substitute cell id.
Stand the lat/lng vs gws.cell jobs sentence on its own.
Rename gws.cell to cell and gws.world to world; delete the
reserved-prefix rule (value grammar is the discriminator).
Retitle as MAP Location Keys, generic for bitcoinschema.
Note cell is a quadkey, never geohash; other cell encodings
stay out of scope. Update all three indices.
@cursor cursor Bot changed the title BRC-229: Game World System (GWS) BRC-229: MAP Location Keys (cell, world, lat, lng) Aug 26, 2026
Name the key for its encoding, matching the geohash precedent,
so the value is decodable on sight and cannot be mislabeled.
Drop the plain-word meta-commentary from the abstract.
@cursor cursor Bot changed the title BRC-229: MAP Location Keys (cell, world, lat, lng) BRC-229: MAP Location Keys (quadkey, world, lat, lng) Aug 26, 2026
… keys

Earth default is now expressed by omitting world (indexers stay
tolerant of empty/earth). Add section 4.9: system comparison
matrix, translation rules (point->cell exact, cell->cell lossy),
granularity equivalence table, and the record-the-point guidance.
Allow geohash and h3 as non-placing read keys derived from the
same point; forbid cross-labeled encodings incl. H3-in-geohash.
@cursor
cursor Bot force-pushed the cursor/brc-0229-game-world-system-b79d branch from 906afeb to 9b02b77 Compare August 26, 2026 21:44
Clipping makes polar placement deterministic, not absent: north
cap collapses to the y=0 row (quadkey digits 0/1), south to
y=n-1 (digits 2/3), longitude still resolving. Add the property
grid (nesting, aspect, renderer-native decode, poles) to 4.9
and state the trade this BRC takes.
@cursor
cursor Bot force-pushed the cursor/brc-0229-game-world-system-b79d branch from 229e0ef to 5df72e7 Compare August 26, 2026 22:04
…ntions

Renumber 229 -> 315 so the BRC sits above every dependency (Bitcom 300,
MAP 303, 1Sat 306, envelopes 307, and the contested 314).

Section 5 no longer restates 1Sat lineage. Custody -- origin, transfer by
sat ordering, tip, burn -- is cited to BRC-159. Position is this BRC's:
an object occupies the cells in effect at the tip, a transaction that
re-declares quadkey relocates it, a transfer on its own does not. Removes
the origin/tip/pairing/order machinery, whose index-based pairing rule
contradicted BRC-159's sat ordering. Authorization is inherited from
spend authority rather than restated.

Adopt MAP's command set (BRC-303) instead of inventing one: SET places,
ADD adds a cell, DELETE drops a cell, REMOVE unplaces. quadkey becomes
list-valued so one object can occupy several cells. Cites the :::
instruction-set separator.

Replace bare lat/lng with MAP's established coordinates.lat/.lng/.alt
convention; add altitude. Coordinates stay single-valued -- quadkey
carries extent, the point carries position.

World ids must self-uniquify: genesis outpoint preferred, hex hash for
off-chain worlds, myapp:<seed> a fallback; bare seeds forbidden. world
may change across a transfer, specified as a portal. Empty-world
write/read asymmetry stated as one clause.

Query returns a multi-cell record once if any cell matches. Adds three
conformance cases. Section 4 math is unchanged.
@rohenaz rohenaz changed the title BRC-229: MAP Location Keys (quadkey, world, lat, lng) BRC-315: MAP Location Keys (quadkey, world, coordinates.*) Aug 27, 2026
Upstream bsv-blockchain/BRCs has BRC-300 and BRC-369 claimed by open PRs,
so the corpus moved from 300-313 to 500-513. This BRC follows into the same
block and updates its MAP citation from BRC-303 to BRC-503.

Also notes: BRC-229 was itself already claimed upstream by an open PR
(Wallet-Native Elliptic Curve Point Multiplication), so the original number
was a live collision independent of the dependency-ordering problem.
@rohenaz rohenaz changed the title BRC-315: MAP Location Keys (quadkey, world, coordinates.*) BRC-515: MAP Location Keys (quadkey, world, coordinates.*) Aug 27, 2026
…tive

Advisory review found that the spec's authorization story was asserted in
prose but never enforced, and that the command grammar it borrowed made the
gap exploitable.

MAP's SELECT <txid> exists so an unrelated transaction can target a
previously written record, and MAP has no ownership model. Section 2.1
adopted that grammar for unplace and drop-cell while leaving <txid> unbound,
and nothing required an indexer to reject a command arriving outside the
object's custody chain. A conforming vanilla-MAP indexer would therefore let
anyone unplace anyone else's object with one unrelated transaction, while an
indexer written by the authors would not. Two changes close it: <txid> is
bound to the spent tip's txid, and indexers MUST apply a MAP command to a
placed object only when the carrying transaction is a link in that object's
BRC-159 chain.

'The quadkey in effect at the tip' is the spec's central noun and its
definition lived in a non-normative dependency note, which nothing can
conform to. Promoted to an interim normative rule that also pins the two
orderings the note omitted: multiple MAP outputs in one transaction, and
multiple commands under :::. Marked superseded when a general resolution BRC
lands.

Also settles CLEAR, which BRC-503 defines and this BRC ignored.

Other fixes, each verified before applying:
- footnotes 4 and 6 were swapped at section 4 - EPSG:3857 pointed at the
  Bing quadkey reference and quadkey pointed at IOGP
- section 6 returned 'MAP keys on the tip', contradicting resolved-state
  semantics; a join tag set at origin and not repeated would be returned by
  one indexer and omitted by another
- world-id genesis outpoints cited BRC-159 normalization, which makes
  txid.0 equal txid_0, while world equality is exact bytes; underscore only
- geohash and h3 now carry value grammars, with the reason honest naming has
  to be normative: 8928308280fffff is a valid H3 index that also satisfies
  the geohash grammar, since base32 drops a/i/l/o
- BRC-503 section 5 does not list btctx, ethtx or name; citation corrected
- indexer cell cap MUST be at least 16, so a cap of 1 is not conforming
- closed intersection at shared edges; west = east is degenerate, not a wrap
- geohash and h3 MAY appear only alongside coordinates.*
- carriage deviation from BRC-503 section 1 stated normatively
Corrects an over-narrow fix from the previous commit, which wrote BRC-159
spend authority into the spec as the only way a position command can be
authorized. That is one binding, not the model.

The layering is: ownership and permissioning belong to whatever system owns
the asset; placement semantics belong to MAP and to this document. A system
may not use ordinals at all - it might identify users by AIP or Sigma
signature and authorize a SELECT by checking that the signer is entitled to
edit the target record.

Section 5 now requires that an authorization model be in force, requires the
indexer to state which one it enforces, and requires commands it cannot
authorize to be ignored rather than applied - without mandating any
particular model. Spend authority and identity signature are described as
the two already available; anything else is free to define its own.

The security requirement is unchanged and is the reason the section exists:
MAP's SELECT <txid> lets any transaction name any earlier one, so an indexer
that applies position commands without an authorization check will let
anyone move anyone else's object.

Generalizes the language that assumed a 1Sat chain: 'tip' becomes 'current
record' except where spend authority is the subject, carriage explains why a
spend-authorized output needs a bare OP_RETURN rather than asserting it of
every placement, and portals and history are stated in terms of authorized
writes.
CLEAR was described as erasing the object's entire resolved MAP state. MAP
defines it as voiding the values a named transaction wrote, so CLEAR against
one revision leaves every other revision standing. An indexer built on the
old sentence would unplace objects that are still placed.

Replaces the interim state-resolution paragraph with a citation. The
paragraph carried its own supersession clause and BRC-514 now exists to take
it.
A specification does not cite the applications built on it. Projects cite
the spec, not the other way around. External references are limited to the
BRCs this document depends on.

Removes the World of Alchema paragraph. The Implementations section now
states what a compatible implementation does and nothing else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant