BRC-515: MAP Location Keys (quadkey, world, coordinates.*) - #3
Open
rohenaz wants to merge 13 commits into
Open
Conversation
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
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.
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.
… 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
Bot
force-pushed
the
cursor/brc-0229-game-world-system-b79d
branch
from
August 26, 2026 21:44
906afeb to
9b02b77
Compare
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
Bot
force-pushed
the
cursor/brc-0229-game-world-system-b79d
branch
from
August 26, 2026 22:04
229e0ef to
5df72e7
Compare
…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.
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.
…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.
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.
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.
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.
quadkey0–3, length 1..30. List-valued — an object may occupy several cells. A validquadkeyis what places the output.worldmyapp:<seed>a fallback.coordinates.lat/.lng/.altgeohash,h3The BRC invents no
OP_RETURNframing, 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:
quadkeyrelocates 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
SETplaces ·ADDadds a cell ·DELETEdrops a cell ·REMOVEunplaces. Cites BRC-503 §3's:::instruction-set separator.Portals
worldmay change across a transfer. Because MAP state carries forward, a transfer writing onlyworldleavesquadkeyin 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 thez→ edge-length table, the polar-cap digit claim, and exact prefix nesting.Known dependencies
opldotdev/MAPPR BRC-515: MAP Location Keys (quadkey, world, coordinates.*) #3 —masterdeclaresSET | DELETEonly whilev2declares six commands with different meanings. This BRC targets v2.go-templatesand1sat-sdkMAP parsers declare a non-existentDELcommand, implementSETonly, ignore:::, and never populate list values. Separate PRs.Upstream: a PR to
bsv-blockchain/BRCsis intentionally deferred. This PR is againstopldotdev/BRCsmasteronly.