Ethereum Name Service 백서

Ethereum Name Service

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 31쪽

`A4D6` | `ꓖ` | LISU LETTER GA | | | | | | | D | 1. Allocate an empty character buffer. 2. Start with the set of **ALL** groups. 3. For each unique character in the label: * If the character is **Confused** (a member of a **Whole Confusable**): * Retain groups with **Whole Confusable** characters excluding the **Confusable Extent** of the matching **Confused** character. * If no groups remain, the label is not confusable. * The **Confusable Extent** is the fully-connected graph formed from different groups with the same confusable and different confusables of the same group. * The mapping from **Confused** to **Confusable Extent** can be precomputed. * In the table above, **Whole Confusable** for `"g"`, the rectangle formed by each capital letter is a **Confusable Extent**: * `A` is \[`g`] ⊗ \[*Latin*, *Han*, *Japanese*, *Korean*] * `B` is \[`ց`] ⊗ \[*Armn*] * `C` is \[`Ꮐ`, `Ᏻ`] ⊗ \[*Cher*] * `D` is \[`ꓖ`] ⊗ \[*Lisu*] * A **Confusable Extent** can span multiple characters and multiple groups. Consider the (incomplete) **Whole Confusable** for `"o"`: * `6F (o) LATIN SMALL LETTER O` → *Latin*, *Han*, *Japanese*, and *Korean* * `3007 (〇) IDEOGRAPHIC NUMBER ZERO` → *Han*, *Japanese*, *Korean*, and *Bopomofo* * **Confusable Extent** is \[`o`, `〇`] ⊗ \[*Latin*, *Han*, *Japanese*, *Korean*, *Bopomofo*] * If the character is **Unique**, the label is not confusable. * This set can be precomputed from characters that appear in exactly one group and are not **Confused**. * Otherwise: * Append the character to the buffer. 4. If any **Confused** characters were found: * If there are no buffered characters, the label is confusable. * If any of the remaining groups contain all of the buffered characters, the label is confusable. * Example: `"0х" [30 445]` 1. `30 (0) DIGIT ZERO` * Not **Confused** or **Unique**, add to buffer. 2. `445 (х) CYRILLIC SMALL LETTER HA` * **Confusable Extent** is \[`х`, `4B3 (ҳ) CYRILLIC SMALL LETTER HA WITH DESCENDER`] ⊗ \[*Cyrillic*] * **Whole Confusable** excluding the extent is \[`78 (x) LATIN SMALL LETTER X`, ...] → \[*Latin*, ...] * Remaining groups: **ALL** ∩ \[*Latin*, ...] → \[*Latin*, ...] 3. There was (1) buffered character: * *Latin* also contains `30` → `"0x" [30 78]` 4. The label is confusable. 5. The label is not confusable. A label composed of confusable characters isn't necessarily confusable. * Example: `"тӕ" [442 4D5]` 1. `442 (т) CYRILLIC SMALL LETTER TE` * **Confusable Extent** is \[`т`] ⊗ \[*Cyrillic*] * **Whole Confusable** excluding the extent is \[`3C4 (τ) GREEK SMALL LETTER TAU`] → \[*Greek*] * Remaining groups: **ALL** ∩ \[*Greek*] → \[*Greek*] 2. `4D5 (ӕ) CYRILLIC SMALL LIGATURE A IE` * **Confusable Extent** is \[`ӕ`] ⊗ \[*Greek*] * **Whole Confusable** excluding the extent is \[`E6 (æ) LATIN SMALL LETTER AE`] → \[*Latin*] * Remaining groups: \[*Greek*] ∩ \[*Latin*] → ∅ 3. No groups remain so the label is not confusable. #### Split * Partition a name into labels, separated by `2D (.) FULL STOP`, and return the resulting array. * Example: `"abc.123.eth"` → `["abc", "123", "eth"]` * The empty string is 0-labels: `""` → `[]` #### Join * Assemble an array of labels into a name, inserting `2D (.) FULL STOP` between each label, and return the resulting string. * Example: `["abc", "123", "eth"]` → `"abc.123.eth"` ### Description of `spec.json` * **Groups** (`"groups"`) — [groups](#appendix-additional-resources) of characters that can constitute a label * `"name"` — ASCII name of the group (or abbreviation if **Restricted**) * Examples: *Latin*, *Japanese*, *Egyp* * **Restricted** (`"restricted"`) — **`true`** if [Excluded](https://www.unicode.org/reports/tr31#Table_Candidate_Characters_for_Exclusion_from_Identifiers) or [Limited-Use](https://www.unicode.org/reports/tr31/#Table_Limited_Use_Scripts) script * Examples: *Latin* → **`false`**, *Egyp* → **`true`** * `"primary"` — subset of characters that define the group * Examples: `"a"` → *Latin*, `"あ"` → *Japanese*, `"𓀀"` → *Egyp* * `"secondary"` — subset of characters included with the group * Example: `"0"` → *Common* but mixable with *Latin* * **CM Whitelist(ed)** (`"cm"`) — (optional) set of allowed compound sequences in NFC * Each compound sequence is a character followed by one or more **Combining Marks**. * Example: `à̀̀` → `E0 300 300` * Currently, every group that is **CM Whitelist** has zero compound sequences. * **CM Whitelisted** is effectively **`true`** if `[]` otherwise **`false`** * **Ignored** (`"ignored"`) — [characters](#appendix-additional-resources) that are ignored during normalization * Example: `34F (�) COMBINING GRAPHEME JOINER` * **Mapped** (`"mapped"`) — characters that are mapped to a sequence of **valid** characters * Example: `41 (A) LATIN CAPITAL LETTER A` → `[61 (a) LATIN SMALL LETTER A]` * Example: `2165 (Ⅵ) ROMAN NUMERAL SIX` → `[76 (v) LATIN SMALL LETTER V, 69 (i) LATIN SMALL LETTER I]` * **Whole Confusable** (`"wholes"`) — groups of characters that look similar * `"valid"` — subset of confusable characters that are allowed * Example: `34 (4) DIGIT FOUR` * **Confused** (`"confused"`) — subset of confusable characters that confuse * Example: `13CE (Ꮞ) CHEROKEE LETTER SE` * **Fenced** (`"fenced"`) — [characters](#appendix-additional-resources) that cannot be first, last, or contiguous * Example: `2044 (⁄) FRACTION SLASH` * **Emoji Sequence(s)** (`"emoji"`) — valid [emoji sequences](#appendix-additional-resources) * Example: `👨‍💻 [1F468 200D 1F4BB] man technologist` * **Combining Marks / CM** (`"cm"`) — [characters](#appendix-additional-resources) that are [Combining Marks](https://unicode.org/faq/char_combmark.html) * **Non-spacing Marks / NSM** (`"nsm"`) — valid [subset](#appendix-additional-resources) of **CM** with general category (`"Mn"` or `"Me"`) * **Maximum NSM** (`"nsm_max"`) — maximum sequence length of unique **NSM** * **Should Escape** (`"escape"`) — [characters](#appendix-additional-resources) that shouldn't be printed * **NFC Check** (`"nfc_check"`) — valid [subset](#appendix-additional-resources) of characters that [may require NFC](https://unicode.org/reports/tr15/#NFC_QC_Optimization) ### Description of `nf.json` * `"decomp"` — [mapping](https://www.unicode.org/reports/tr44/tr44-30.html#Character_Decomposition_Mappings) from a composed character to a sequence of (partially)-decomposed characters * [`UnicodeData.txt`](https://www.unicode.org/reports/tr44/tr44-30.html#UnicodeData.txt) where `Decomposition_Mapping` exists and does not have a [formatting tag](https://www.unicode.org/reports/tr44/tr44-30.html#Formatting_Tags_Table) * `"exclusions"` — set of characters for which the `"decomp"` mapping is not applied when forming a composition * [`CompositionExclusions.txt`](https://www.unicode.org/reports/tr44/tr44-30.html#CompositionExclusions.txt) * `"ranks"` — sets of characters with increasing [`Canonical_Combining_Class`](https://www.unicode.org/reports/tr44/tr44-30.html#Canonical_Combining_Class_Values) * [`UnicodeData.txt`](https://www.unicode.org/reports/tr44/tr44-30.html#UnicodeData.txt) grouped by `Canonical_Combining_Class` * Class `0` is not included * `"qc"` — set of characters with property [`NFC_QC`](https://www.unicode.org/reports/tr44/tr44-30.html#Decompositions_and_Normalization) of value `N` or `M` * [`DerivedNormalizationProps.txt`](https://www.unicode.org/reports/tr44/tr44-30.html#DerivedNormalizationProps.txt) * **NFC Check** (from [`spec.json`](#description-of-specjson)) is a subset of this set ### Derivation * [IDNA 2003](https://unicode.org/Public/idna/15.1.0/IdnaMappingTable.txt) * `UseSTD3ASCIIRules` is **`true`** * `VerifyDnsLength` is **`false`** * `Transitional_Processing` is **`false`** * The following [deviations](https://unicode.org/reports/tr46/#Table_Deviation_Characters) are **valid**: * `DF (ß) LATIN SMALL LETTER SHARP S` * `3C2 (ς) GREEK SMALL LETTER FINAL SIGMA` * `CheckHyphens` is **`false`** ([WHATWG URL Spec § 3.3](https://url.spec.whatwg.org/#idna)) * `CheckBidi` is **`false`** * [ContextJ](https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.1): * `200C (�) ZERO WIDTH NON-JOINER` (ZWNJ) is **disallowed everywhere**. * `200D (�) ZERO WIDTH JOINER` (ZWJ) is **only allowed** in emoji sequences. * [ContextO](https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.3): * `B7 (·) MIDDLE DOT` is **disallowed**. * `375 (͵) GREEK LOWER NUMERAL SIGN` is **disallowed**. * `5F3 (׳) HEBREW PUNCTUATION GERESH` and `5F4 (״) HEBREW PUNCTUATION GERSHAYIM` are *Greek*. * `30FB (・) KATAKANA MIDDLE DOT` is **Fenced** and *Han*, *Japanese*, *Korean*, and *Bopomofo*. * Some [Extended Arabic Numerals](https://en.wikipedia.org/wiki/Arabic_numerals) are **mapped**: * `6F0 (۰)` → `660 (٠) ARABIC-INDIC DIGIT ZERO` * `6F1 (۱)` → `661 (١) ARABIC-INDIC DIGIT ONE` * `6F2 (۲)` → `662 (٢) ARABIC-INDIC DIGIT TWO` * `6F3 (۳)` → `663 (٣) ARABIC-INDIC DIGIT THREE` * `6F7 (۷)` → `667 (٧) ARABIC-INDIC DIGIT SEVEN` * `6F8 (۸)` → `668 (٨) ARABIC-INDIC DIGIT EIGHT` * `6F9 (۹)` → `669 (٩) ARABIC-INDIC DIGIT NINE` * [Punycode](https://datatracker.ietf.org/doc/html/rfc3492) is not decoded. * The following ASCII characters are **valid**: * `24 ($) DOLLAR SIGN` * `5F (_) LOW LINE` with [restrictions](#validate) * Only label separator is `2E (.) FULL STOP` * No character maps to this character. * This simplifies name detection in unstructured text. * The following alternatives are **disallowed**: * `3002 (。) IDEOGRAPHIC FULL STOP` * `FF0E (.) FULLWIDTH FULL STOP` * `FF61 (。) HALFWIDTH IDEOGRAPHIC FULL STOP` * [Many characters](#appendix-additional-resources) are **disallowed** for various reasons: * Nearly all punctuation are **disallowed**. * Example: `589 (։) ARMENIAN FULL STOP` * All parentheses and brackets are **disallowed**. * Example: `2997 (⦗) LEFT BLACK TORTOISE SHELL BRACKET` * Nearly all vocalization annotations are **disallowed**. * Example: `294 (ʔ) LATIN LETTER GLOTTAL STOP` * Obsolete, deprecated, and ancient characters are **disallowed**. * Example: `463 (ѣ) CYRILLIC SMALL LETTER YAT` * Combining, modifying, reversed, flipped, turned, and partial variations are **disallowed**. * Example: `218A (↊) TURNED DIGIT TWO` * When multiple weights of the same character exist, the variant closest to "heavy" is selected and the rest **disallowed**. * Example: `🞡🞢🞣🞤✚🞥🞦🞧` → `271A (✚) HEAVY GREEK CROSS` * This occasionally selects an emoji. * Example: ✔️ or `2714 (✔︎) HEAVY CHECK MARK` is selected instead of `2713 (✓) CHECK MARK` * Many visually confusable characters are **disallowed**. * Example: `131 (ı) LATIN SMALL LETTER DOTLESS I` * Many ligatures, *n*-graphs, and *n*-grams are **disallowed.** * Example: `A74F (ꝏ) LATIN SMALL LETTER OO` * Many esoteric characters are **disallowed**. * Example: `2376 (⍶) APL FUNCTIONAL SYMBOL ALPHA UNDERBAR` * Many hyphen-like characters are **mapped** to `2D (-) HYPHEN-MINUS`: * `2010 (‐) HYPHEN` * `2011 (‑) NON-BREAKING HYPHEN` * `2012 (‒) FIGURE DASH` * `2013 (–) EN DASH` * `2014 (—) EM DASH` * `2015 (―) HORIZONTAL BAR` * `2043 (⁃) HYPHEN BULLET` * `2212 (−) MINUS SIGN` * `23AF (⎯) HORIZONTAL LINE EXTENSION` * `23E4 (⏤) STRAIGHTNESS` * `FE58 (﹘) SMALL EM DASH` * `2E3A (⸺) TWO-EM DASH` → `"--"` * `2E3B (⸻) THREE-EM DASH` → `"---"` * Characters are assigned to **Groups** according to [Unicode Script\_Extensions](https://www.unicode.org/reports/tr24/#Script_Extensions_Def). * **Groups** may contain [multiple scripts](#appendix-additional-resources): * Only *Latin*, *Greek*, *Cyrillic*, *Han*, *Japanese*, and *Korean* have access to *Common* characters. * *Latin*, *Greek*, *Cyrillic*, *Han*, *Japanese*, *Korean*, and *Bopomofo* only permit specific **Combining Mark** sequences. * *Han*, *Japanese*, and *Korean* have access to `a-z`. * **Restricted** groups are always single-script. * [Unicode augmented script sets](https://www.unicode.org/reports/tr39/#Mixed_Script_Detection) * Scripts *Braille*, *Linear A*, *Linear B*, and *Signwriting* are **disallowed**. * `27 (') APOSTROPHE` is **mapped** to `2019 (’) RIGHT SINGLE QUOTATION MARK` for convenience. * Ethereum symbol (`39E (Ξ) GREEK CAPITAL LETTER XI`) is case-folded and *Common*. * Emoji: * All emoji are [fully-qualified](https://www.unicode.org/reports/tr51/#def_fully_qualified_emoji). * Digits (`0-9`) are [not emoji](#appendix-additional-resources). * Emoji [mapped to non-emoji by IDNA](#appendix-additional-resources) cannot be used as emoji. * Emoji [disallowed by IDNA](#appendix-additional-resources) with default text-presentation are **disabled**: * `203C (‼️) double exclamation mark` * `2049 (⁉️) exclamation question mark ` * Remaining emoji characters are marked as **disallowed** (for text processing). * All `RGI_Emoji_ZWJ_Sequence` are **enabled**. * All `Emoji_Keycap_Sequence` are **enabled**. * All `RGI_Emoji_Tag_Sequence` are **enabled**. * All `RGI_Emoji_Modifier_Sequence` are **enabled**. * All `RGI_Emoji_Flag_Sequence` are **enabled**. * `Basic_Emoji` of the form `[X FE0F]` are **enabled**. * Emoji with default emoji-presentation are **enabled** as `[X FE0F]`. * Remaining single-character emoji are **enabled** as `[X FE0F]` (explicit emoji-presentation). * All singular Skin-color Modifiers are **disabled**. * All singular Regional Indicators are **disabled**. * Blacklisted emoji are **disabled**. * Whitelisted emoji are **enabled**. * Confusables: * Nearly all [Unicode Confusables](https://www.unicode.org/Public/security/15.1.0/confusables.txt) * Emoji are not confusable. * ASCII confusables are case-folded. * Example: `61 (a) LATIN SMALL LETTER A` confuses with `13AA (Ꭺ) CHEROKEE LETTER GO` ### Backwards Compatibility * 99% of names are still valid. * Preserves as much [Unicode IDNA](https://unicode.org/reports/tr46/) and [WHATWG URL](https://url.spec.whatwg.org/#idna) compatibility as possible. * Only [valid emoji sequences](#appendix-additional-resources) are permitted. ### Security Considerations * Unicode presentation may vary between applications and devices. * Unicode text is ultimately subject to font-styling and display context. * Unsupported characters (`�`) may appear unremarkable. * Normalized single-character emoji sequences do not retain their explicit emoji-presentation and may display with [text or emoji](https://www.unicode.org/reports/tr51/#Presentation_Style) presentation styling. * `❤︎` — text-presentation and default-color * <span className="text-green-500">`❤︎`</span> — text-presentation and <span className="text-green-500">green</span>-color * <span className="text-green-500">`❤️`</span> — emoji-presentation and <span className="text-green-500">green</span>-color * Unsupported emoji sequences with ZWJ may appear indistinguishable from those without ZWJ. * `💩💩 [1F4A9 1F4A9]` * `💩‍💩 [1F4A9 200D 1F4A9]` → *error: Disallowed character* * Names composed of labels with varying bidi properties [may appear differently](https://discuss.ens.domains/t/bidi-label-ordering-spoof/15824) depending on context. * Normalization does not enforce single-directional names. * Names may be composed of labels of different directions but normalized labels are never bidirectional. * \[LTR].\[RTL] `bahrain.مصر` * \[LTR+RTL] `bahrainمصر` → *error: Illegal mixture: Latin + Arabic* * Not all normalized names are visually unambiguous. * This ENSIP only addresses **single-character** [confusables](https://www.unicode.org/reports/tr39/). * There exist confusable **multi-character** sequences: * `"ஶ்ரீ" [BB6 BCD BB0 BC0]` * `"ஸ்ரீ" [BB8 BCD BB0 BC0]` * There exist confusable emoji sequences: * `🚴 [1F6B4]` and `🚴🏻 [1F6B4 1F3FB]` * `🇺🇸 [1F1FA 1F1F8]` and `🇺🇲 [1F1FA 1F1F2]` * `♥ [2665] BLACK HEART SUIT` and `❤ [2764] HEAVY BLACK HEART` ### Copyright Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). ### Appendix: Reference Specifications * [EIP-137: Ethereum Domain Name Service](https://eips.ethereum.org/EIPS/eip-137) * [ENSIP-1: ENS](/ensip/1) * [UAX-15: Normalization Forms](https://unicode.org/reports/tr15/) * [UAX-24: Script Property](https://www.unicode.org/reports/tr24/) * [UAX-29: Text Segmentation](https://unicode.org/reports/tr29/) * [UAX-31: Identifier and Pattern Syntax](https://www.unicode.org/reports/tr31/) * [UTS-39: Security Mechanisms](https://www.unicode.org/reports/tr39/) * [UAX-44: Character Database](https://www.unicode.org/reports/tr44/) * [UTS-46: IDNA Compatibility Processing](https://unicode.org/reports/tr46/) * [UTS-51: Emoji](https://www.unicode.org/reports/tr51) * [RFC-3492: Punycode](https://datatracker.ietf.org/doc/html/rfc3492) * [RFC-5891: IDNA: Protocol](https://datatracker.ietf.org/doc/html/rfc5891) * [RFC-5892: The Unicode Code Points and IDNA](https://datatracker.ietf.org/doc/html/rfc5892) * [Unicode CLDR](https://github.com/unicode-org/cldr) * [WHATWG URL: IDNA](https://url.spec.whatwg.org/#idna) ### Appendix: Additional Resources * [Supported Groups](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/groups.md) * [Supported Emoji](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/emoji.md) * [Additional Disallowed Characters](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/disallowed.csv) * [Ignored Characters](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/ignored.csv) * [Should Escape Characters ](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/escape.csv) * [Combining Marks](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/cm.csv) * [Non-spacing Marks](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/nsm.csv) * [Fenced Characters](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/fenced.csv) * [NFC Quick Check](https://github.com/adraffy/ens-normalize.js/blob/main/tools/ensip/nfc_check.csv) ### Appendix: Validation Tests A list of [validation tests](https://github.com/adraffy/ens-normalize.js/blob/main/validate/tests.json) are provided with the following interpretation: * Already Normalized: `{name: "a"}` → `normalize("a")` is `"a"` * Need Normalization: `{name: "A", norm: "a"}` → `normalize("A")` is `"a"` * Expect Error: `{name: "@", error: true}` → `normalize("@")` throws ### Annex: Beautification Follow [algorithm](#algorithm), except: * Do not strip `FE0F` from `Emoji` tokens. * Replace `3BE (ξ) GREEK SMALL LETTER XI` with `39E (Ξ) GREEK CAPITAL LETTER XI` if the label isn't *Greek*. * Example: `normalize("‐Ξ1️⃣") [2010 39E 31 FE0F 20E3]` is `"-ξ1⃣" [2D 3BE 31 20E3]` * Example: `beautify("-ξ1⃣") [2D 3BE 31 20E3]"` is `"-Ξ1️⃣" [2D 39E 31 FE0F 20E3]` ### Versions | Unicode | [Release](https://www.unicode.org/history/publicationdates.html#Release_Dates) | Updated | [SHA-256 of `spec.json`](https://github.com/adraffy/ens-normalize.js/blob/main/derive/data/releases.json) | | :------: | :----------------------------------------------------------------------------- | :--------- | :-------------------------------------------------------------------------------------------------------- | | `15.0.0` | 2022-09-13 | 2023-02-21 | `962316964553fce6188e25a5166a4c1e906333adf53bdf2964c71dedc0f8e2c8` | | `15.1.0` | 2023-09-12 | 2024-01-25 | `1f6d3bdb7a724fe3b91f6d73ab14defcb719e0f4ab79022089c940e7e9c56b9c` | | `16.0.0` | 2024-09-10 | 2024-09-14 | `4b3c5210a328d7097500b413bf075ec210bbac045cd804deae5d1ed771304825` | | `17.0.0` | 2025-09-09 | 2025-09-18 | `4febc8f5d285cbf80d2320fb0c1777ac25e378eb72910c34ec963d0a4e319c84` | import { EnsipHeader } from "../../components/EnsipHeader"; ## ENSIP-16: Metadata Event Discovery <EnsipHeader authors={["jefflau","matoken.eth"]} created="September 22, 2022" status="draft" /> ### Abstract This ENSIP specifies APIs for querying metadata directly on the resolver for EIP-3668 (CCIP Read: Secure offchain data retrieval) enabled names. EIP-3668 will po
프로젝트로 돌아가기