From 464a1978cc7335f9e7195a78a3e95930978ac3a4 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Wed, 21 Aug 2024 15:38:10 -0400 Subject: [PATCH 01/13] starter Vale config and initial rule set --- .github/styles/Google/AMPM.yml | 9 + .github/styles/Google/Acronyms.yml | 64 ++++++ .github/styles/Google/Colons.yml | 8 + .github/styles/Google/Contractions.yml | 30 +++ .github/styles/Google/DateFormat.yml | 9 + .github/styles/Google/Ellipses.yml | 9 + .github/styles/Google/EmDash.yml | 13 ++ .github/styles/Google/Exclamation.yml | 12 ++ .github/styles/Google/FirstPerson.yml | 13 ++ .github/styles/Google/Gender.yml | 9 + .github/styles/Google/GenderBias.yml | 43 ++++ .github/styles/Google/HeadingPunctuation.yml | 13 ++ .github/styles/Google/Headings.yml | 29 +++ .github/styles/Google/Latin.yml | 11 ++ .github/styles/Google/LyHyphens.yml | 14 ++ .github/styles/Google/OptionalPlurals.yml | 12 ++ .github/styles/Google/Ordinal.yml | 7 + .github/styles/Google/OxfordComma.yml | 7 + .github/styles/Google/Parens.yml | 7 + .github/styles/Google/Passive.yml | 184 ++++++++++++++++++ .github/styles/Google/Periods.yml | 7 + .github/styles/Google/Quotes.yml | 7 + .github/styles/Google/Ranges.yml | 7 + .github/styles/Google/Semicolons.yml | 8 + .github/styles/Google/Slang.yml | 11 ++ .github/styles/Google/Spacing.yml | 10 + .github/styles/Google/Spelling.yml | 10 + .github/styles/Google/Units.yml | 8 + .github/styles/Google/We.yml | 11 ++ .github/styles/Google/Will.yml | 7 + .github/styles/Google/WordList.yml | 80 ++++++++ .github/styles/Google/meta.json | 4 + .github/styles/Google/vocab.txt | 0 .github/styles/Papermoon/Acronyms.yml | 67 +++++++ .github/styles/Papermoon/CustomDictionary.yml | 15 ++ .../styles/Papermoon/IgnoreFunctionParams.yml | 9 + .github/styles/Papermoon/LinkTarget.yml | 9 + .github/styles/Papermoon/NotContractions.yml | 21 ++ .github/styles/Papermoon/Titlecase.yml | 14 ++ .github/styles/Papermoon/WordSwapList.yml | 82 ++++++++ .github/styles/config/Papermoon.yml | 8 + .../config/ignore/brand-token-ignore.txt | 6 + .../styles/config/ignore/industry-ignore.txt | 20 ++ .../styles/config/ignore/papermoon-ignore.txt | 0 .../styles/config/ignore/polkadot-ignore.txt | 22 +++ .../config/vocabularies/Industry/accept.tx | 1 + .../config/vocabularies/Industry/reject.txt | 0 .../config/vocabularies/Papermoon/accept.tx | 3 + .../config/vocabularies/Papermoon/reject.txt | 17 ++ .../config/vocabularies/Polkadot/accept.tx | 2 + .../config/vocabularies/Polkadot/reject.txt | 0 .vale.ini | 27 +++ docs/dev-tools/zombienet/overview.md | 4 +- 53 files changed, 998 insertions(+), 2 deletions(-) create mode 100644 .github/styles/Google/AMPM.yml create mode 100644 .github/styles/Google/Acronyms.yml create mode 100644 .github/styles/Google/Colons.yml create mode 100644 .github/styles/Google/Contractions.yml create mode 100644 .github/styles/Google/DateFormat.yml create mode 100644 .github/styles/Google/Ellipses.yml create mode 100644 .github/styles/Google/EmDash.yml create mode 100644 .github/styles/Google/Exclamation.yml create mode 100644 .github/styles/Google/FirstPerson.yml create mode 100644 .github/styles/Google/Gender.yml create mode 100644 .github/styles/Google/GenderBias.yml create mode 100644 .github/styles/Google/HeadingPunctuation.yml create mode 100644 .github/styles/Google/Headings.yml create mode 100644 .github/styles/Google/Latin.yml create mode 100644 .github/styles/Google/LyHyphens.yml create mode 100644 .github/styles/Google/OptionalPlurals.yml create mode 100644 .github/styles/Google/Ordinal.yml create mode 100644 .github/styles/Google/OxfordComma.yml create mode 100644 .github/styles/Google/Parens.yml create mode 100644 .github/styles/Google/Passive.yml create mode 100644 .github/styles/Google/Periods.yml create mode 100644 .github/styles/Google/Quotes.yml create mode 100644 .github/styles/Google/Ranges.yml create mode 100644 .github/styles/Google/Semicolons.yml create mode 100644 .github/styles/Google/Slang.yml create mode 100644 .github/styles/Google/Spacing.yml create mode 100644 .github/styles/Google/Spelling.yml create mode 100644 .github/styles/Google/Units.yml create mode 100644 .github/styles/Google/We.yml create mode 100644 .github/styles/Google/Will.yml create mode 100644 .github/styles/Google/WordList.yml create mode 100644 .github/styles/Google/meta.json create mode 100644 .github/styles/Google/vocab.txt create mode 100644 .github/styles/Papermoon/Acronyms.yml create mode 100644 .github/styles/Papermoon/CustomDictionary.yml create mode 100644 .github/styles/Papermoon/IgnoreFunctionParams.yml create mode 100644 .github/styles/Papermoon/LinkTarget.yml create mode 100644 .github/styles/Papermoon/NotContractions.yml create mode 100644 .github/styles/Papermoon/Titlecase.yml create mode 100644 .github/styles/Papermoon/WordSwapList.yml create mode 100644 .github/styles/config/Papermoon.yml create mode 100644 .github/styles/config/ignore/brand-token-ignore.txt create mode 100644 .github/styles/config/ignore/industry-ignore.txt create mode 100644 .github/styles/config/ignore/papermoon-ignore.txt create mode 100644 .github/styles/config/ignore/polkadot-ignore.txt create mode 100644 .github/styles/config/vocabularies/Industry/accept.tx create mode 100644 .github/styles/config/vocabularies/Industry/reject.txt create mode 100644 .github/styles/config/vocabularies/Papermoon/accept.tx create mode 100644 .github/styles/config/vocabularies/Papermoon/reject.txt create mode 100644 .github/styles/config/vocabularies/Polkadot/accept.tx create mode 100644 .github/styles/config/vocabularies/Polkadot/reject.txt create mode 100644 .vale.ini diff --git a/.github/styles/Google/AMPM.yml b/.github/styles/Google/AMPM.yml new file mode 100644 index 00000000..fbdc6e4f --- /dev/null +++ b/.github/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: 'https://developers.google.com/style/word-list' +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/.github/styles/Google/Acronyms.yml b/.github/styles/Google/Acronyms.yml new file mode 100644 index 00000000..f41af018 --- /dev/null +++ b/.github/styles/Google/Acronyms.yml @@ -0,0 +1,64 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/.github/styles/Google/Colons.yml b/.github/styles/Google/Colons.yml new file mode 100644 index 00000000..99363fbd --- /dev/null +++ b/.github/styles/Google/Colons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should be in lowercase." +link: 'https://developers.google.com/style/colons' +nonword: true +level: warning +scope: sentence +tokens: + - ':\s[A-Z]' diff --git a/.github/styles/Google/Contractions.yml b/.github/styles/Google/Contractions.yml new file mode 100644 index 00000000..4f6fd5d4 --- /dev/null +++ b/.github/styles/Google/Contractions.yml @@ -0,0 +1,30 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/contractions' +level: suggestion +ignorecase: true +action: + name: replace +swap: + are not: aren't + cannot: can't + could not: couldn't + did not: didn't + do not: don't + does not: doesn't + has not: hasn't + have not: haven't + how is: how's + is not: isn't + it is: it's + should not: shouldn't + that is: that's + they are: they're + was not: wasn't + we are: we're + we have: we've + were not: weren't + what is: what's + when is: when's + where is: where's + will not: won't diff --git a/.github/styles/Google/DateFormat.yml b/.github/styles/Google/DateFormat.yml new file mode 100644 index 00000000..e9d227fa --- /dev/null +++ b/.github/styles/Google/DateFormat.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'July 31, 2016' format, not '%s'." +link: 'https://developers.google.com/style/dates-times' +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/.github/styles/Google/Ellipses.yml b/.github/styles/Google/Ellipses.yml new file mode 100644 index 00000000..1e070517 --- /dev/null +++ b/.github/styles/Google/Ellipses.yml @@ -0,0 +1,9 @@ +extends: existence +message: "In general, don't use an ellipsis." +link: 'https://developers.google.com/style/ellipses' +nonword: true +level: warning +action: + name: remove +tokens: + - '\.\.\.' diff --git a/.github/styles/Google/EmDash.yml b/.github/styles/Google/EmDash.yml new file mode 100644 index 00000000..5a81fb09 --- /dev/null +++ b/.github/styles/Google/EmDash.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: "https://developers.google.com/style/dashes" +nonword: true +level: error +action: + name: edit + params: + - trim + - " " +tokens: + - '\s[—–]\s' + diff --git a/.github/styles/Google/Exclamation.yml b/.github/styles/Google/Exclamation.yml new file mode 100644 index 00000000..b4e4a1f7 --- /dev/null +++ b/.github/styles/Google/Exclamation.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use exclamation points in text." +link: "https://developers.google.com/style/exclamation-points" +nonword: true +level: error +action: + name: edit + params: + - trim_right + - "!" +tokens: + - '\w+!(?:\s|$)' diff --git a/.github/styles/Google/FirstPerson.yml b/.github/styles/Google/FirstPerson.yml new file mode 100644 index 00000000..0b7b8828 --- /dev/null +++ b/.github/styles/Google/FirstPerson.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/.github/styles/Google/Gender.yml b/.github/styles/Google/Gender.yml new file mode 100644 index 00000000..c8486181 --- /dev/null +++ b/.github/styles/Google/Gender.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use '%s' as a gender-neutral pronoun." +link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' +level: error +ignorecase: true +tokens: + - he/she + - s/he + - \(s\)he diff --git a/.github/styles/Google/GenderBias.yml b/.github/styles/Google/GenderBias.yml new file mode 100644 index 00000000..36f5a3f8 --- /dev/null +++ b/.github/styles/Google/GenderBias.yml @@ -0,0 +1,43 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +ignorecase: true +link: "https://developers.google.com/style/inclusive-documentation" +level: error +action: + name: replace +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind|humanity + manmade: manufactured + manpower: personnel + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/.github/styles/Google/HeadingPunctuation.yml b/.github/styles/Google/HeadingPunctuation.yml new file mode 100644 index 00000000..c1729868 --- /dev/null +++ b/.github/styles/Google/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't put a period at the end of a heading." +link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - trim_right + - "." +tokens: + - '[a-z0-9][.]\s*$' diff --git a/.github/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml new file mode 100644 index 00000000..c8d5be26 --- /dev/null +++ b/.github/styles/Google/Headings.yml @@ -0,0 +1,29 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" +level: warning +scope: heading +match: $sentence +indicators: + - ":" +exceptions: + - Azure + - CLI + - Cosmos + - Docker + - Emmet + - gRPC + - I + - Kubernetes + - Linux + - macOS + - Marketplace + - MongoDB + - REPL + - Studio + - TypeScript + - URLs + - Visual + - VS + - Windows + - JSON diff --git a/.github/styles/Google/Latin.yml b/.github/styles/Google/Latin.yml new file mode 100644 index 00000000..ca03b915 --- /dev/null +++ b/.github/styles/Google/Latin.yml @@ -0,0 +1,11 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)(?=[\s,;])': for example + '\b(?:ie|i\.e\.)(?=[\s,;])': that is diff --git a/.github/styles/Google/LyHyphens.yml b/.github/styles/Google/LyHyphens.yml new file mode 100644 index 00000000..50dacb40 --- /dev/null +++ b/.github/styles/Google/LyHyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: "https://developers.google.com/style/hyphens" +level: error +ignorecase: false +nonword: true +action: + name: edit + params: + - regex + - "-" + - " " +tokens: + - '\b[^\s-]+ly-\w+\b' diff --git a/.github/styles/Google/OptionalPlurals.yml b/.github/styles/Google/OptionalPlurals.yml new file mode 100644 index 00000000..4a8767d6 --- /dev/null +++ b/.github/styles/Google/OptionalPlurals.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use plurals in parentheses such as in '%s'." +link: "https://developers.google.com/style/plurals-parentheses" +level: error +nonword: true +action: + name: edit + params: + - trim_right + - "(s)" +tokens: + - '\b\w+\(s\)' diff --git a/.github/styles/Google/Ordinal.yml b/.github/styles/Google/Ordinal.yml new file mode 100644 index 00000000..d1ac7d27 --- /dev/null +++ b/.github/styles/Google/Ordinal.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: 'https://developers.google.com/style/numbers' +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/.github/styles/Google/OxfordComma.yml b/.github/styles/Google/OxfordComma.yml new file mode 100644 index 00000000..b9ba21eb --- /dev/null +++ b/.github/styles/Google/OxfordComma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: 'https://developers.google.com/style/commas' +scope: sentence +level: warning +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.github/styles/Google/Parens.yml b/.github/styles/Google/Parens.yml new file mode 100644 index 00000000..3b8711d0 --- /dev/null +++ b/.github/styles/Google/Parens.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use parentheses judiciously." +link: 'https://developers.google.com/style/parentheses' +nonword: true +level: suggestion +tokens: + - '\(.+\)' diff --git a/.github/styles/Google/Passive.yml b/.github/styles/Google/Passive.yml new file mode 100644 index 00000000..3265890e --- /dev/null +++ b/.github/styles/Google/Passive.yml @@ -0,0 +1,184 @@ +extends: existence +link: 'https://developers.google.com/style/voice' +message: "In general, use active voice instead of passive voice ('%s')." +ignorecase: true +level: suggestion +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/.github/styles/Google/Periods.yml b/.github/styles/Google/Periods.yml new file mode 100644 index 00000000..d24a6a6c --- /dev/null +++ b/.github/styles/Google/Periods.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +level: error +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/.github/styles/Google/Quotes.yml b/.github/styles/Google/Quotes.yml new file mode 100644 index 00000000..3cb6f1ab --- /dev/null +++ b/.github/styles/Google/Quotes.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Commas and periods go inside quotation marks." +link: 'https://developers.google.com/style/quotation-marks' +level: error +nonword: true +tokens: + - '"[^"]+"[.,?]' diff --git a/.github/styles/Google/Ranges.yml b/.github/styles/Google/Ranges.yml new file mode 100644 index 00000000..3ec045e7 --- /dev/null +++ b/.github/styles/Google/Ranges.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add words such as 'from' or 'between' to describe a range of numbers." +link: 'https://developers.google.com/style/hyphens' +nonword: true +level: warning +tokens: + - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/.github/styles/Google/Semicolons.yml b/.github/styles/Google/Semicolons.yml new file mode 100644 index 00000000..bb8b85b4 --- /dev/null +++ b/.github/styles/Google/Semicolons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use semicolons judiciously." +link: 'https://developers.google.com/style/semicolons' +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/.github/styles/Google/Slang.yml b/.github/styles/Google/Slang.yml new file mode 100644 index 00000000..63f4c248 --- /dev/null +++ b/.github/styles/Google/Slang.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Don't use internet slang abbreviations such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +tokens: + - 'tl;dr' + - ymmv + - rtfm + - imo + - fwiw diff --git a/.github/styles/Google/Spacing.yml b/.github/styles/Google/Spacing.yml new file mode 100644 index 00000000..66e45a6b --- /dev/null +++ b/.github/styles/Google/Spacing.yml @@ -0,0 +1,10 @@ +extends: existence +message: "'%s' should have one space." +link: 'https://developers.google.com/style/sentence-spacing' +level: error +nonword: true +action: + name: remove +tokens: + - '[a-z][.?!] {2,}[A-Z]' + - '[a-z][.?!][A-Z]' diff --git a/.github/styles/Google/Spelling.yml b/.github/styles/Google/Spelling.yml new file mode 100644 index 00000000..527ac07d --- /dev/null +++ b/.github/styles/Google/Spelling.yml @@ -0,0 +1,10 @@ +extends: existence +message: "In general, use American spelling instead of '%s'." +link: 'https://developers.google.com/style/spelling' +ignorecase: true +level: warning +tokens: + - '(?:\w+)nised?' + - 'colour' + - 'labour' + - 'centre' diff --git a/.github/styles/Google/Units.yml b/.github/styles/Google/Units.yml new file mode 100644 index 00000000..53522ab2 --- /dev/null +++ b/.github/styles/Google/Units.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Put a nonbreaking space between the number and the unit in '%s'." +link: "https://developers.google.com/style/units-of-measure" +nonword: true +level: error +tokens: + - \b\d+(?:B|kB|MB|GB|TB) + - \b\d+(?:ns|ms|s|min|h|d) diff --git a/.github/styles/Google/We.yml b/.github/styles/Google/We.yml new file mode 100644 index 00000000..c7ac7d36 --- /dev/null +++ b/.github/styles/Google/We.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Try to avoid using first-person plural like '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +level: warning +ignorecase: true +tokens: + - we + - we'(?:ve|re) + - ours? + - us + - let's diff --git a/.github/styles/Google/Will.yml b/.github/styles/Google/Will.yml new file mode 100644 index 00000000..128a9183 --- /dev/null +++ b/.github/styles/Google/Will.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Avoid using '%s'." +link: 'https://developers.google.com/style/tense' +ignorecase: true +level: warning +tokens: + - will diff --git a/.github/styles/Google/WordList.yml b/.github/styles/Google/WordList.yml new file mode 100644 index 00000000..b3c6a403 --- /dev/null +++ b/.github/styles/Google/WordList.yml @@ -0,0 +1,80 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://developers.google.com/style/word-list" +level: warning +ignorecase: false +action: + name: replace +swap: + "(?:API Console|dev|developer) key": API key + "(?:cell ?phone|smart ?phone)": phone|mobile phone + "(?:dev|developer|APIs) console": API console + "(?:e-mail|Email|E-mail)": email + "(?:file ?path|path ?name)": path + "(?:kill|terminate|abort)": stop|exit|cancel|end + "(?:OAuth ?2|Oauth)": OAuth 2.0 + "(?:ok|Okay)": OK|okay + "(?:WiFi|wifi)": Wi-Fi + '[\.]+apk': APK + '3\-D': 3D + 'Google (?:I\-O|IO)': Google I/O + "tap (?:&|and) hold": touch & hold + "un(?:check|select)": clear + above: preceding + account name: username + action bar: app bar + admin: administrator + Ajax: AJAX + a\.k\.a|aka: or|also known as + Android device: Android-powered device + android: Android + API explorer: APIs Explorer + application: app + approx\.: approximately + authN: authentication + authZ: authorization + autoupdate: automatically update + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + CLI: command-line tool + click on: click|click in + Cloud: Google Cloud Platform|GCP + Container Engine: Kubernetes Engine + content type: media type + curated roles: predefined roles + data are: data is + Developers Console: Google API Console|API Console + disabled?: turn off|off + ephemeral IP address: ephemeral external IP address + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Google account: Google Account + Google accounts: Google Accounts + Googling: search with Google + grayed-out: unavailable + HTTPs: HTTPS + in order to: to + ingest: import|load + k8s: Kubernetes + long press: touch & hold + network IP address: internal IP address + omnibox: address bar + open-source: open source + overview screen: recents screen + regex: regular expression + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + static IP address: static external IP address + stylesheet: style sheet + synch: sync + tablename: table name + tablet: device + touch: tap + url: URL + vs\.: versus + World Wide Web: web diff --git a/.github/styles/Google/meta.json b/.github/styles/Google/meta.json new file mode 100644 index 00000000..a5da2a84 --- /dev/null +++ b/.github/styles/Google/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Google/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/.github/styles/Google/vocab.txt b/.github/styles/Google/vocab.txt new file mode 100644 index 00000000..e69de29b diff --git a/.github/styles/Papermoon/Acronyms.yml b/.github/styles/Papermoon/Acronyms.yml new file mode 100644 index 00000000..7beabb4d --- /dev/null +++ b/.github/styles/Papermoon/Acronyms.yml @@ -0,0 +1,67 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RPC + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - TOML + - URI + - URL + - USB + - UTF + - XCM + - XML + - XSS + - YAML + - ZIP diff --git a/.github/styles/Papermoon/CustomDictionary.yml b/.github/styles/Papermoon/CustomDictionary.yml new file mode 100644 index 00000000..fb61d3f2 --- /dev/null +++ b/.github/styles/Papermoon/CustomDictionary.yml @@ -0,0 +1,15 @@ +# This style tells Vale.Spelling where to find ignore files +# Ignore files list words to be ignored during spell check (one case-insensitive entry per line) +extends: spelling +message: "Did you really mean '%s'?" +level: error +ignore: + # Reference file location relative to styles/config/ignore directory + # custom dictionary of cyrpto brands and token names/symbols + - brand-token-ignore.txt + # custom dictionary of coding and crypto/blockchain specific words + - industry-ignore.txt + # custom dictionary of Papermoon specific words + - papermoon-ignore.txt + # custom dictionary of Polkadot specific words + - polkadot-ignore.txt diff --git a/.github/styles/Papermoon/IgnoreFunctionParams.yml b/.github/styles/Papermoon/IgnoreFunctionParams.yml new file mode 100644 index 00000000..f36e8b88 --- /dev/null +++ b/.github/styles/Papermoon/IgnoreFunctionParams.yml @@ -0,0 +1,9 @@ +extends: spelling +message: "Manually check param spelling" +level: suggestion +scope: raw +ignorecase: true +# Match function name followed by parentheses, ignore the content inside the parentheses +match: '^\?\?\?\+?\sfunction\s"[^"]*"\s*\([^)]*\)' +exceptions: + - '^\([^)]*\)$' \ No newline at end of file diff --git a/.github/styles/Papermoon/LinkTarget.yml b/.github/styles/Papermoon/LinkTarget.yml new file mode 100644 index 00000000..03d90d80 --- /dev/null +++ b/.github/styles/Papermoon/LinkTarget.yml @@ -0,0 +1,9 @@ +# LinkTarget.yml +extends: existence +message: "Links should include '{target=_blank}' to open in a new tab." +level: error +scope: raw +tokens: + - '\[.*?\]\(.*?\)' +raw: + - '{target=_blank}' \ No newline at end of file diff --git a/.github/styles/Papermoon/NotContractions.yml b/.github/styles/Papermoon/NotContractions.yml new file mode 100644 index 00000000..2e516050 --- /dev/null +++ b/.github/styles/Papermoon/NotContractions.yml @@ -0,0 +1,21 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/contractions' +level: suggestion +ignorecase: true +action: + name: replace +swap: + are not: aren't + cannot: can't + could not: couldn't + did not: didn't + do not: don't + does not: doesn't + has not: hasn't + have not: haven't + is not: isn't + should not: shouldn't + was not: wasn't + were not: weren't + will not: won't \ No newline at end of file diff --git a/.github/styles/Papermoon/Titlecase.yml b/.github/styles/Papermoon/Titlecase.yml new file mode 100644 index 00000000..9b3919b2 --- /dev/null +++ b/.github/styles/Papermoon/Titlecase.yml @@ -0,0 +1,14 @@ +# This rule enforces headings should be in title case +# Will ignore {: anchor-tag-text } +extends: capitalization +message: "'%s' should be in title case" +level: warning +scope: heading +match: '^(.*?)(\s*\{\:\s?#.*\})?$' +style: Chicago + +exceptions: + - ABC + - add + + \ No newline at end of file diff --git a/.github/styles/Papermoon/WordSwapList.yml b/.github/styles/Papermoon/WordSwapList.yml new file mode 100644 index 00000000..6ad7197f --- /dev/null +++ b/.github/styles/Papermoon/WordSwapList.yml @@ -0,0 +1,82 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://developers.google.com/style/word-list" +level: warning +ignorecase: false +action: + name: replace +swap: + "(?:API Console|dev|developer) key": API key + "(?:cell ?phone|smart ?phone)": phone|mobile phone + "(?:dev|developer|APIs) console": API console + "(?:e-mail|Email|E-mail)": email + "(?:file ?path|path ?name)": path + "(?:kill|terminate|abort)": stop|exit|cancel|end + "(?:OAuth ?2|Oauth)": OAuth 2.0 + "(?:ok|Okay)": OK|okay + "(?:WiFi|wifi)": Wi-Fi + '[\.]+apk': APK + '3\-D': 3D + 'Google (?:I\-O|IO)': Google I/O + "tap (?:&|and) hold": touch & hold + "un(?:check|select)": clear + above: preceding + account name: username + action bar: app bar + admin: administrator + Ajax: AJAX + a\.k\.a|aka: or|also known as + Android device: Android-powered device + android: Android + API explorer: APIs Explorer + application: app + approx\.: approximately + authN: authentication + authZ: authorization + autoupdate: automatically update + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + # CLI: command-line tool + # click on: click|click in + Cloud: Google Cloud Platform|GCP + Container Engine: Kubernetes Engine + content type: media type + curated roles: predefined roles + data are: data is + Developers Console: Google API Console|API Console + disabled?: turn off|off|deactivate + ephemeral IP address: ephemeral external IP address + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Google account: Google Account + Google accounts: Google Accounts + Googling: search with Google + grayed-out: unavailable + HTTPs: HTTPS + in order to: to + ingest: import|load + k8s: Kubernetes + long press: touch & hold + network IP address: internal IP address + omnibox: address bar + open-source: open source + overview screen: recents screen + regex: regular expression + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + static IP address: static external IP address + stylesheet: style sheet + synch: sync + tablename: table name + tablet: device + touch: tap + url: URL + vs\.: versus + wasm: Wasm + World Wide Web: web + \ No newline at end of file diff --git a/.github/styles/config/Papermoon.yml b/.github/styles/config/Papermoon.yml new file mode 100644 index 00000000..fd897b09 --- /dev/null +++ b/.github/styles/config/Papermoon.yml @@ -0,0 +1,8 @@ +name: Papermoon +description: "Custom style guide for enforcing Papermoon standards." +version: 0.1.0 +rules: + # Ignores the content inside parentheses on dropdowns using `??? function "` or `???+ function "` + IgnoreFunctionParams: suggestion + # Ignores content inside `**SomeText**` items on dropdowns using `??? function "` or `???+ function "` + IgnoreFunctionNames: suggestion \ No newline at end of file diff --git a/.github/styles/config/ignore/brand-token-ignore.txt b/.github/styles/config/ignore/brand-token-ignore.txt new file mode 100644 index 00000000..3ceffb89 --- /dev/null +++ b/.github/styles/config/ignore/brand-token-ignore.txt @@ -0,0 +1,6 @@ +Acala +Astar +Ethereum +Grafana +Metamask +Polkadot diff --git a/.github/styles/config/ignore/industry-ignore.txt b/.github/styles/config/ignore/industry-ignore.txt new file mode 100644 index 00000000..af5c8c3e --- /dev/null +++ b/.github/styles/config/ignore/industry-ignore.txt @@ -0,0 +1,20 @@ + +blockchain +blockchains +certhash +daemon +daemonless +enum +keystore +keystores +namespace +namespaces +npm +npx +onboarded +onboarding +Podman +subcommand +subkeys +validators +Wasm diff --git a/.github/styles/config/ignore/papermoon-ignore.txt b/.github/styles/config/ignore/papermoon-ignore.txt new file mode 100644 index 00000000..e69de29b diff --git a/.github/styles/config/ignore/polkadot-ignore.txt b/.github/styles/config/ignore/polkadot-ignore.txt new file mode 100644 index 00000000..2854af4d --- /dev/null +++ b/.github/styles/config/ignore/polkadot-ignore.txt @@ -0,0 +1,22 @@ + +backchannel +blockHash +bootnode +bootnodes +dev_newBlock +dev_setHead +dev_setStorage +dev_timeTravel +extrinsics +invulnerables +parachain +parachain's +parachains +parathread +Polkadot +Polkadot's +relaychain +relaychains +Smoldot +Zombienet + diff --git a/.github/styles/config/vocabularies/Industry/accept.tx b/.github/styles/config/vocabularies/Industry/accept.tx new file mode 100644 index 00000000..a694ccac --- /dev/null +++ b/.github/styles/config/vocabularies/Industry/accept.tx @@ -0,0 +1 @@ +webRTC diff --git a/.github/styles/config/vocabularies/Industry/reject.txt b/.github/styles/config/vocabularies/Industry/reject.txt new file mode 100644 index 00000000..e69de29b diff --git a/.github/styles/config/vocabularies/Papermoon/accept.tx b/.github/styles/config/vocabularies/Papermoon/accept.tx new file mode 100644 index 00000000..cc1fafbe --- /dev/null +++ b/.github/styles/config/vocabularies/Papermoon/accept.tx @@ -0,0 +1,3 @@ +TestNet +MainNet + diff --git a/.github/styles/config/vocabularies/Papermoon/reject.txt b/.github/styles/config/vocabularies/Papermoon/reject.txt new file mode 100644 index 00000000..a93a6dce --- /dev/null +++ b/.github/styles/config/vocabularies/Papermoon/reject.txt @@ -0,0 +1,17 @@ +he +her +hers +him +his +let's +our +she +we + + + + + + + + diff --git a/.github/styles/config/vocabularies/Polkadot/accept.tx b/.github/styles/config/vocabularies/Polkadot/accept.tx new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/.github/styles/config/vocabularies/Polkadot/accept.tx @@ -0,0 +1,2 @@ + + diff --git a/.github/styles/config/vocabularies/Polkadot/reject.txt b/.github/styles/config/vocabularies/Polkadot/reject.txt new file mode 100644 index 00000000..e69de29b diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000..220c32f8 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,27 @@ +# Where the style directory is located +StylesPath = .github/styles +# Minimum alert level you can assign to a rule +MinAlertLevel = suggestion +# The Vocabulary files Vale should use +Vocabs = Industry, Polkadot, Papermoon +# Packages included in this configuration +Packages = Google +# Scopes which are ignored by Vale (inline-level HTML tags) +SkippedScopes = div + +# Styles used in this configuration +[*] +BasedOnStyles = Vale, Google, Papermoon + +# Disabled styles from loaded packages +Google.Acronyms = NO +Google.Contractions = NO +Google.EmDash = NO +Google.Headings = NO +Google.Parens = NO +Google.Passive = NO +Google.Will = NO +Google.WordList = NO + + + diff --git a/docs/dev-tools/zombienet/overview.md b/docs/dev-tools/zombienet/overview.md index 64726e23..61627ec9 100644 --- a/docs/dev-tools/zombienet/overview.md +++ b/docs/dev-tools/zombienet/overview.md @@ -520,7 +520,7 @@ There is one specific key capable of receiving more subkeys: the `nodes` key. Th - `ws_port?` ++"number"++ - WS port to use - `rpc_port?` ++"number"++ - RPC port to use - `prometheus_port?` ++"number"++ - Prometheus port to use -- `p2p_cert_hash?` ++"string"++ - libp2p certhash to use with webrtc transport +- `p2p_cert_hash?` ++"string"++ - libp2p certhash to use with webRTC transport - `delay_network_settings?` ++"DelayNetworkSettings"++ - sets the expected configuration to delay the network. The `DelayNetworkSettings` interface is defined as follows: ```js export interface DelayNetworkSettings { @@ -681,7 +681,7 @@ One specific key capable of receiving more subkeys is the `collator` key. This k - `rpc_port?` ++"number"++ - RPC port to use - `prometheus_port?` ++"number"++ - Prometheus port to use - `p2p_port?` ++"number"++ - P2P port to use -- `p2p_cert_hash?` ++"string"++ - libp2p certhash to use with webrtc transport +- `p2p_cert_hash?` ++"string"++ - libp2p certhash to use with webRTC transport - `delay_network_settings?` ++"DelayNetworkSettings"++ - sets the expected configuration to delay the network. The `DelayNetworkSettings` interface is defined as follows: ```js export interface DelayNetworkSettings { From 527bab33d72ef44eec3bab63a9dae5b9860bb82e Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Wed, 21 Aug 2024 17:19:02 -0400 Subject: [PATCH 02/13] updates custom rules reference list on style guide --- .../styles/Papermoon/IgnoreFunctionParams.yml | 9 ------ .github/styles/Papermoon/Titlecase.yml | 2 +- .github/styles/config/Papermoon.yml | 32 ++++++++++++++++--- 3 files changed, 29 insertions(+), 14 deletions(-) delete mode 100644 .github/styles/Papermoon/IgnoreFunctionParams.yml diff --git a/.github/styles/Papermoon/IgnoreFunctionParams.yml b/.github/styles/Papermoon/IgnoreFunctionParams.yml deleted file mode 100644 index f36e8b88..00000000 --- a/.github/styles/Papermoon/IgnoreFunctionParams.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: spelling -message: "Manually check param spelling" -level: suggestion -scope: raw -ignorecase: true -# Match function name followed by parentheses, ignore the content inside the parentheses -match: '^\?\?\?\+?\sfunction\s"[^"]*"\s*\([^)]*\)' -exceptions: - - '^\([^)]*\)$' \ No newline at end of file diff --git a/.github/styles/Papermoon/Titlecase.yml b/.github/styles/Papermoon/Titlecase.yml index 9b3919b2..c44d3955 100644 --- a/.github/styles/Papermoon/Titlecase.yml +++ b/.github/styles/Papermoon/Titlecase.yml @@ -2,7 +2,7 @@ # Will ignore {: anchor-tag-text } extends: capitalization message: "'%s' should be in title case" -level: warning +level: error scope: heading match: '^(.*?)(\s*\{\:\s?#.*\})?$' style: Chicago diff --git a/.github/styles/config/Papermoon.yml b/.github/styles/config/Papermoon.yml index fd897b09..2250ce2d 100644 --- a/.github/styles/config/Papermoon.yml +++ b/.github/styles/config/Papermoon.yml @@ -2,7 +2,31 @@ name: Papermoon description: "Custom style guide for enforcing Papermoon standards." version: 0.1.0 rules: - # Ignores the content inside parentheses on dropdowns using `??? function "` or `???+ function "` - IgnoreFunctionParams: suggestion - # Ignores content inside `**SomeText**` items on dropdowns using `??? function "` or `???+ function "` - IgnoreFunctionNames: suggestion \ No newline at end of file + + ### ALERT Level = Error (commit will fail) ### + + # Extends Vale dictionary to reference ignore files for customization + CustomDictionary: error + # Enforces links will open in new tab + LinkTarget: error + # Enforces headings use Chicago Style title case + Titlecase.yml: error + + + ### ALERT Level = Warning (commit will succeed) ### + + # Enforces custom version of Google.WordList + WordSwapList.yml: warning + + + ### ALERT Level = Suggestion (commit will succeed) ### + + # Prompts user to spell out unfamiliar acronyms first time they are used + # Includes exception list to specify acronyms this rule will ignore + Acronyms: suggestion + + # Suggests replacing 'not' phrases with contraction for clarity + NotContractions: suggestion + + + \ No newline at end of file From 630b88fec5a83b1554227ab9c220e26244eb67bb Mon Sep 17 00:00:00 2001 From: 0xLucca <0xlucca.dev@gmail.com> Date: Thu, 22 Aug 2024 12:00:53 -0300 Subject: [PATCH 03/13] Add vale gh action --- .github/workflows/vale.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/vale.yml diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml new file mode 100644 index 00000000..c0b137fd --- /dev/null +++ b/.github/workflows/vale.yml @@ -0,0 +1,33 @@ +name: Review Docs +on: + pull_request: + branches: main + +jobs: + review-docs: + runs-on: ubuntu-latest + outputs: + files: ${{ steps.get-modified-files.outputs.files }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Get modified files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: get-modified-files + run: | + changed_files=$(gh pr diff --name-only ${{ github.event.pull_request.number }} | grep '\.md$' || true) + md_files=$(echo "$changed_files" | jq -R -s 'split("\n")[:-1]' | jq -c .) + echo "Modified md files: $md_files" + echo "files=$md_files" >> $GITHUB_OUTPUT + + - name: Review docs + uses: errata-ai/vale-action@reviewdog + with: + files: ${{ steps.get-modified-files.outputs.files }} + vale_flags: "--no-exit --minAlertLevel=error" + reporter: github-pr-review + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} From 2e6158c42e8a91aed045d153f3cded8b16545b1a Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 13:15:52 -0400 Subject: [PATCH 04/13] updates to config --- .github/styles/Papermoon/CustomDictionary.yml | 8 ++------ .github/styles/config/ignore/brand-token-ignore.txt | 1 + .github/styles/config/ignore/papermoon-ignore.txt | 0 .github/styles/config/vocabularies/Industry/accept.tx | 1 - .../Industry/accept.txt} | 5 ++++- .../vocabularies/Papermoon/{accept.tx => accept.txt} | 5 ++++- .github/styles/config/vocabularies/Polkadot/accept.tx | 2 -- .../Polkadot/accept.txt} | 6 ++++-- .vale.ini | 2 +- docs/dev-tools/chopsticks/overview.md | 2 +- 10 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 .github/styles/config/ignore/papermoon-ignore.txt delete mode 100644 .github/styles/config/vocabularies/Industry/accept.tx rename .github/styles/config/{ignore/industry-ignore.txt => vocabularies/Industry/accept.txt} (80%) rename .github/styles/config/vocabularies/Papermoon/{accept.tx => accept.txt} (56%) delete mode 100644 .github/styles/config/vocabularies/Polkadot/accept.tx rename .github/styles/config/{ignore/polkadot-ignore.txt => vocabularies/Polkadot/accept.txt} (88%) diff --git a/.github/styles/Papermoon/CustomDictionary.yml b/.github/styles/Papermoon/CustomDictionary.yml index fb61d3f2..f9f5668b 100644 --- a/.github/styles/Papermoon/CustomDictionary.yml +++ b/.github/styles/Papermoon/CustomDictionary.yml @@ -3,13 +3,9 @@ extends: spelling message: "Did you really mean '%s'?" level: error +vocab: true ignore: # Reference file location relative to styles/config/ignore directory # custom dictionary of cyrpto brands and token names/symbols - brand-token-ignore.txt - # custom dictionary of coding and crypto/blockchain specific words - - industry-ignore.txt - # custom dictionary of Papermoon specific words - - papermoon-ignore.txt - # custom dictionary of Polkadot specific words - - polkadot-ignore.txt + diff --git a/.github/styles/config/ignore/brand-token-ignore.txt b/.github/styles/config/ignore/brand-token-ignore.txt index 3ceffb89..77f18487 100644 --- a/.github/styles/config/ignore/brand-token-ignore.txt +++ b/.github/styles/config/ignore/brand-token-ignore.txt @@ -1,3 +1,4 @@ +# List of crypto & blockchain brand names and token symbols Acala Astar Ethereum diff --git a/.github/styles/config/ignore/papermoon-ignore.txt b/.github/styles/config/ignore/papermoon-ignore.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/styles/config/vocabularies/Industry/accept.tx b/.github/styles/config/vocabularies/Industry/accept.tx deleted file mode 100644 index a694ccac..00000000 --- a/.github/styles/config/vocabularies/Industry/accept.tx +++ /dev/null @@ -1 +0,0 @@ -webRTC diff --git a/.github/styles/config/ignore/industry-ignore.txt b/.github/styles/config/vocabularies/Industry/accept.txt similarity index 80% rename from .github/styles/config/ignore/industry-ignore.txt rename to .github/styles/config/vocabularies/Industry/accept.txt index af5c8c3e..3120545a 100644 --- a/.github/styles/config/ignore/industry-ignore.txt +++ b/.github/styles/config/vocabularies/Industry/accept.txt @@ -1,10 +1,11 @@ - blockchain blockchains certhash +cron jobs daemon daemonless enum +JavaScript keystore keystores namespace @@ -16,5 +17,7 @@ onboarding Podman subcommand subkeys +TypeScript validators Wasm +webRTC diff --git a/.github/styles/config/vocabularies/Papermoon/accept.tx b/.github/styles/config/vocabularies/Papermoon/accept.txt similarity index 56% rename from .github/styles/config/vocabularies/Papermoon/accept.tx rename to .github/styles/config/vocabularies/Papermoon/accept.txt index cc1fafbe..f555d9ce 100644 --- a/.github/styles/config/vocabularies/Papermoon/accept.tx +++ b/.github/styles/config/vocabularies/Papermoon/accept.txt @@ -1,3 +1,6 @@ -TestNet MainNet +TestNet +time frame + + diff --git a/.github/styles/config/vocabularies/Polkadot/accept.tx b/.github/styles/config/vocabularies/Polkadot/accept.tx deleted file mode 100644 index 139597f9..00000000 --- a/.github/styles/config/vocabularies/Polkadot/accept.tx +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.github/styles/config/ignore/polkadot-ignore.txt b/.github/styles/config/vocabularies/Polkadot/accept.txt similarity index 88% rename from .github/styles/config/ignore/polkadot-ignore.txt rename to .github/styles/config/vocabularies/Polkadot/accept.txt index 2854af4d..94635a5d 100644 --- a/.github/styles/config/ignore/polkadot-ignore.txt +++ b/.github/styles/config/vocabularies/Polkadot/accept.txt @@ -1,15 +1,17 @@ - +args backchannel blockHash bootnode bootnodes +config dev_newBlock dev_setHead dev_setStorage dev_timeTravel extrinsics invulnerables -parachain +IPs +[Pp]arachain parachain's parachains parathread diff --git a/.vale.ini b/.vale.ini index 220c32f8..fcc3265d 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,7 +3,7 @@ StylesPath = .github/styles # Minimum alert level you can assign to a rule MinAlertLevel = suggestion # The Vocabulary files Vale should use -Vocabs = Industry, Polkadot, Papermoon +Vocab = Industry, Polkadot, Papermoon # Packages included in this configuration Packages = Google # Scopes which are ignored by Vale (inline-level HTML tags) diff --git a/docs/dev-tools/chopsticks/overview.md b/docs/dev-tools/chopsticks/overview.md index bebf2884..4bd14201 100644 --- a/docs/dev-tools/chopsticks/overview.md +++ b/docs/dev-tools/chopsticks/overview.md @@ -228,7 +228,7 @@ After running it, you should see output similar to the following: --8<-- 'code/developer-tools/chopsticks/overview/terminal/fork-output.md' -Now you can interact with the forked chains using the ports specified in the output. +Now he can interact with his forked chains using the ports specified in the output. ## WebSocket Commands From 1913f82f86387e7482f0c38802215262bc3319c4 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 13:41:08 -0400 Subject: [PATCH 05/13] config adjustments, fixed some errors surfaced during testing --- .github/styles/Google/Exclamation.yml | 1 + .github/styles/Papermoon/Acronyms.yml | 1 + .github/styles/Papermoon/Exclamation.yml | 9 +++++++++ .github/styles/Papermoon/NotContractions.yml | 1 - .../styles/config/vocabularies/Industry/accept.txt | 3 +++ .../styles/config/vocabularies/Polkadot/accept.txt | 2 ++ .vale.ini | 1 + docs/dev-tools/chopsticks/overview.md | 12 ++++++------ 8 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 .github/styles/Papermoon/Exclamation.yml diff --git a/.github/styles/Google/Exclamation.yml b/.github/styles/Google/Exclamation.yml index b4e4a1f7..79e27f16 100644 --- a/.github/styles/Google/Exclamation.yml +++ b/.github/styles/Google/Exclamation.yml @@ -10,3 +10,4 @@ action: - "!" tokens: - '\w+!(?:\s|$)' + \ No newline at end of file diff --git a/.github/styles/Papermoon/Acronyms.yml b/.github/styles/Papermoon/Acronyms.yml index 7beabb4d..8ceb5ac8 100644 --- a/.github/styles/Papermoon/Acronyms.yml +++ b/.github/styles/Papermoon/Acronyms.yml @@ -17,6 +17,7 @@ exceptions: - DEBUG - DOM - DPI + - EVM - FAQ - GCC - GDB diff --git a/.github/styles/Papermoon/Exclamation.yml b/.github/styles/Papermoon/Exclamation.yml new file mode 100644 index 00000000..75fd89f3 --- /dev/null +++ b/.github/styles/Papermoon/Exclamation.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use exclamation points in text." +link: "https://developers.google.com/style/exclamation-points" +nonword: true +level: warning +tokens: + - '\w+!(?:\s|$)' +exceptions: + - ink! diff --git a/.github/styles/Papermoon/NotContractions.yml b/.github/styles/Papermoon/NotContractions.yml index 2e516050..1fa0b952 100644 --- a/.github/styles/Papermoon/NotContractions.yml +++ b/.github/styles/Papermoon/NotContractions.yml @@ -7,7 +7,6 @@ action: name: replace swap: are not: aren't - cannot: can't could not: couldn't did not: didn't do not: don't diff --git a/.github/styles/config/vocabularies/Industry/accept.txt b/.github/styles/config/vocabularies/Industry/accept.txt index 3120545a..3852bd86 100644 --- a/.github/styles/config/vocabularies/Industry/accept.txt +++ b/.github/styles/config/vocabularies/Industry/accept.txt @@ -1,3 +1,4 @@ +API blockchain blockchains certhash @@ -15,9 +16,11 @@ npx onboarded onboarding Podman +SDK subcommand subkeys TypeScript +validator validators Wasm webRTC diff --git a/.github/styles/config/vocabularies/Polkadot/accept.txt b/.github/styles/config/vocabularies/Polkadot/accept.txt index 94635a5d..0a9ac415 100644 --- a/.github/styles/config/vocabularies/Polkadot/accept.txt +++ b/.github/styles/config/vocabularies/Polkadot/accept.txt @@ -4,11 +4,13 @@ blockHash bootnode bootnodes config +[Cc]oretime dev_newBlock dev_setHead dev_setStorage dev_timeTravel extrinsics +ink! invulnerables IPs [Pp]arachain diff --git a/.vale.ini b/.vale.ini index fcc3265d..f266fce1 100644 --- a/.vale.ini +++ b/.vale.ini @@ -17,6 +17,7 @@ BasedOnStyles = Vale, Google, Papermoon Google.Acronyms = NO Google.Contractions = NO Google.EmDash = NO +Google.Exclamation = NO Google.Headings = NO Google.Parens = NO Google.Passive = NO diff --git a/docs/dev-tools/chopsticks/overview.md b/docs/dev-tools/chopsticks/overview.md index 4bd14201..db95fc6e 100644 --- a/docs/dev-tools/chopsticks/overview.md +++ b/docs/dev-tools/chopsticks/overview.md @@ -18,7 +18,7 @@ With Chopsticks, developers can simulate and test complex blockchain scenarios w For additional support and information, please reach out through [GitHub Issues](https://github.com/AcalaNetwork/chopsticks/issues){target=_blank}. !!! note - Chopsticks uses [Smoldot](https://github.com/smol-dot/smoldot){target=_blank} light client, which only supports the native Polkadot-SDK API. Consequently, a Chopsticks-based fork does not support Ethereum JSON-RPC calls, so you cannot use it to fork your chain and connect Metamask. + Chopsticks uses [Smoldot](https://github.com/smol-dot/smoldot){target=_blank} light client, which only supports the native Polkadot-SDK API. Consequently, a Chopsticks-based fork doesn't support Ethereum JSON-RPC calls, so you cannot use it to fork your chain and connect Metamask. ## Prerequisites @@ -32,7 +32,7 @@ Before you begin, ensure you have the following installed: You can install Chopsticks either globally or locally in your project. Choose the option that best fits your development workflow. !!! note - This documentation explains the functionality of Chopsticks version `{{ dependencies.chopsticks.version }}`. Make sure you're using the correct version to match these instructions. + This documentation explains the features of Chopsticks version `{{ dependencies.chopsticks.version }}`. Make sure you're using the correct version to match these instructions. ### Global Installation @@ -79,7 +79,7 @@ To run Chopsticks, you need to configure some parameters. This can be set either - `config` - path or URL of the config file - `port` - the port to expose an endpoint on - `build-block-mode` - how blocks should be built in the fork: batch, manual, instant -- `import-storage` - a pre-defined JSON/YAML storage file path to override in the parachain's storage +- `import-storage` - a pre-defined JSON/YAML storage path to override in the parachain's storage - `allow-unresolved-imports` - whether to allow Wasm unresolved imports when using a Wasm to build the parachain - `html` - include to generate storage diff preview between blocks - `mock-signature-host` - mock signature host so that any signature starts with `0xdeadbeef` and filled by `0xcd` is considered valid @@ -115,7 +115,7 @@ To run Chopsticks using a configuration file, utilize the `--config` flag. You c npx @acala-network/chopsticks --config=polkadot ``` -Regardless of which method you choose from the examples above, you'll see an output similar to the following: +Regardless of which method you choose from the preceding examples, you'll see an output similar to the following:
npx @acala-network/chopsticks --config=polkadot @@ -189,7 +189,7 @@ For programmatic interaction, you can use the Polkadot.js library. Here's a basi Chopsticks allows you to replay specific blocks from a chain, which is useful for debugging and analyzing state changes. You can use the parameters in the [Configuration](#configuration) section to set up the chain configuration, and then use the run-block subcommand with additional options: -- `output-path` - file path to print output +- `output-path` - path to print output - `html` - generate HTML with storage diff - `open` - open generated HTML @@ -228,7 +228,7 @@ After running it, you should see output similar to the following: --8<-- 'code/developer-tools/chopsticks/overview/terminal/fork-output.md' -Now he can interact with his forked chains using the ports specified in the output. +Now you can interact with your forked chains using the ports specified in the output. ## WebSocket Commands From 218e1fb4ff926a841bd8854a627ca151329459ac Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 13:48:49 -0400 Subject: [PATCH 06/13] adds test md file to test workflow --- docs/dev-tools/test.md | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/dev-tools/test.md diff --git a/docs/dev-tools/test.md b/docs/dev-tools/test.md new file mode 100644 index 00000000..f65954eb --- /dev/null +++ b/docs/dev-tools/test.md @@ -0,0 +1,48 @@ +THIS IS A TEST FILE REMOVE!!!!!!!!!!!!!! +--- +title: Asset Hub +description: Guide to learn and implement Asset Hub parachain on Polkadot, a decentralized platform for the issuance, management, and trading of digital assets. +--- + +# Asset Hub + +## Introduction + +Asset Hub is a [System Parachain](https://wiki.polkadot.network/docs/learn-system-chains){target=\_blank} designed to manage and operate assets within the Polkadot network. It specializes in creating, managing, and using assets. It is considered the primary hub for asset operations in the network. + +The native token for the Polkadot Asset Hub is DOT, and for the Kusama Asset Hub, it is KSM. Both cases maintain a trusted relationship with the relay chain. + +You can refer to the [How to Teleport DOT or KSM to Asset Hub](https://support.polkadot.network/support/solutions/articles/65000181119){target=\_blank} guide to learn how to send native assets to Asset Hub. + +Some common use cases for Asset Hub include: + +- Creating and managing assets +- Transferring non-native tokens and creating NFTs +- Reducing transfer fees and [existential deposits](https://support.polkadot.network/support/solutions/articles/65000168651){target=\_blank} +- Meeting the existential deposit requirement for insufficient assets + +## Assets + +An asset on the blockchain is a digital representation of value, such as cryptocurrencies and tokens, that can be transferred and traded. Asset Hub stores assets as a map from an ID to information about the asset, including details about the management team, total supply, and other relevant information. + +The [Asset Pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_assets/index.html){target=\_blank} facilitates the management of these assets by providing essential functions for handling them. + +Asset Hub acts as a management portal for asset creators, letting them mint and burn tokens and get an overview of the total issuance across the Polkadot network, including tokens sent elsewhere in the network. + +### Local Assets + +Instead of using custom contracts for each asset, Asset Hub incorporates built-in asset logic, treating them as primary primitives. All assets have identical functionality. + +These assets, identified by claimable, integer-based asset IDs, are known as `local assets`. This approach simplifies asset management, as users can interact with them using the same set of functions. + +The protocol ensures that each asset ID (an integer) is unique, enabling creators to assign metadata such as the asset symbol. Therefore, users should verify their assets to confirm they possess the correct ID. For instance, although anyone can label their asset as USDT, users will probably seek the one issued by [Tether](https://tether.to/en/){target=\_blank} (asset ID 1984). + +You can read the [What is Asset Hub and How Do I Use it?](https://support.polkadot.network/support/solutions/articles/65000181800){target=\_blank} article for more information on verifying an asset's legitimacy on Asset Hub. + +### Foreign Assets + +Asset Hub considers assets originating from a different blockchain to be foreign assets. These assets can be native tokens from various parachains or other consensus systems like Ethereum. Once a foreign asset is added to Asset Hub, users can transfer this token from its original blockchain to Asset Hub and utilize it like any other asset. + +A significant difference lies in the method used for their identification. Unlike the Assets pallet, foreign assets use [XCM Multilocation](https://wiki.polkadot.network/docs/learn/xcm/fundamentals/multilocation-summary){target=\_blank} instead of integers to identify assets, making asset identification much more versatile. + +Foreign assets are implemented as an [instance of Assets pallet](https://github.com/paritytech/polkadot-sdk/blob/035211d707d0a74a2a768fd658160721f09d5b44/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs#L408){target=\_blank}, but with a specialized configuration that enables support for XCM operations. From b3a1965bf3a5f8c146d286225a2101a18d5c46f5 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 13:50:09 -0400 Subject: [PATCH 07/13] fix for test --- docs/dev-tools/test.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/dev-tools/test.md b/docs/dev-tools/test.md index f65954eb..8288d887 100644 --- a/docs/dev-tools/test.md +++ b/docs/dev-tools/test.md @@ -1,4 +1,3 @@ -THIS IS A TEST FILE REMOVE!!!!!!!!!!!!!! --- title: Asset Hub description: Guide to learn and implement Asset Hub parachain on Polkadot, a decentralized platform for the issuance, management, and trading of digital assets. From 726ff92131552ab75a8b2d420cf2eff326713e16 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 14:06:10 -0400 Subject: [PATCH 08/13] adds test file to test vale workflow --- docs/dev-tools/test.md | 47 -------- docs/test.md | 237 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 237 insertions(+), 47 deletions(-) delete mode 100644 docs/dev-tools/test.md create mode 100644 docs/test.md diff --git a/docs/dev-tools/test.md b/docs/dev-tools/test.md deleted file mode 100644 index 8288d887..00000000 --- a/docs/dev-tools/test.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Asset Hub -description: Guide to learn and implement Asset Hub parachain on Polkadot, a decentralized platform for the issuance, management, and trading of digital assets. ---- - -# Asset Hub - -## Introduction - -Asset Hub is a [System Parachain](https://wiki.polkadot.network/docs/learn-system-chains){target=\_blank} designed to manage and operate assets within the Polkadot network. It specializes in creating, managing, and using assets. It is considered the primary hub for asset operations in the network. - -The native token for the Polkadot Asset Hub is DOT, and for the Kusama Asset Hub, it is KSM. Both cases maintain a trusted relationship with the relay chain. - -You can refer to the [How to Teleport DOT or KSM to Asset Hub](https://support.polkadot.network/support/solutions/articles/65000181119){target=\_blank} guide to learn how to send native assets to Asset Hub. - -Some common use cases for Asset Hub include: - -- Creating and managing assets -- Transferring non-native tokens and creating NFTs -- Reducing transfer fees and [existential deposits](https://support.polkadot.network/support/solutions/articles/65000168651){target=\_blank} -- Meeting the existential deposit requirement for insufficient assets - -## Assets - -An asset on the blockchain is a digital representation of value, such as cryptocurrencies and tokens, that can be transferred and traded. Asset Hub stores assets as a map from an ID to information about the asset, including details about the management team, total supply, and other relevant information. - -The [Asset Pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_assets/index.html){target=\_blank} facilitates the management of these assets by providing essential functions for handling them. - -Asset Hub acts as a management portal for asset creators, letting them mint and burn tokens and get an overview of the total issuance across the Polkadot network, including tokens sent elsewhere in the network. - -### Local Assets - -Instead of using custom contracts for each asset, Asset Hub incorporates built-in asset logic, treating them as primary primitives. All assets have identical functionality. - -These assets, identified by claimable, integer-based asset IDs, are known as `local assets`. This approach simplifies asset management, as users can interact with them using the same set of functions. - -The protocol ensures that each asset ID (an integer) is unique, enabling creators to assign metadata such as the asset symbol. Therefore, users should verify their assets to confirm they possess the correct ID. For instance, although anyone can label their asset as USDT, users will probably seek the one issued by [Tether](https://tether.to/en/){target=\_blank} (asset ID 1984). - -You can read the [What is Asset Hub and How Do I Use it?](https://support.polkadot.network/support/solutions/articles/65000181800){target=\_blank} article for more information on verifying an asset's legitimacy on Asset Hub. - -### Foreign Assets - -Asset Hub considers assets originating from a different blockchain to be foreign assets. These assets can be native tokens from various parachains or other consensus systems like Ethereum. Once a foreign asset is added to Asset Hub, users can transfer this token from its original blockchain to Asset Hub and utilize it like any other asset. - -A significant difference lies in the method used for their identification. Unlike the Assets pallet, foreign assets use [XCM Multilocation](https://wiki.polkadot.network/docs/learn/xcm/fundamentals/multilocation-summary){target=\_blank} instead of integers to identify assets, making asset identification much more versatile. - -Foreign assets are implemented as an [instance of Assets pallet](https://github.com/paritytech/polkadot-sdk/blob/035211d707d0a74a2a768fd658160721f09d5b44/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs#L408){target=\_blank}, but with a specialized configuration that enables support for XCM operations. diff --git a/docs/test.md b/docs/test.md new file mode 100644 index 00000000..5fede0e7 --- /dev/null +++ b/docs/test.md @@ -0,0 +1,237 @@ +--- +title: Spawn a Basic Network Using Zombienet +description: This tutorial gets you started with Zombienet by providing a minimal example of how to use Zombienet to spawn a basic network and run a simple test over it. +--- + +# Spawn a Basic Network + +## Introduction + +In this tutorial, you'll learn how to set up a basic network using Zombienet and run a simple test to validate its functionality. The example provided walks you through defining a minimal network configuration, spawning the network, and interacting with the nodes. By the end, you'll clearly understand how to use Zombienet to deploy and test ephemeral blockchain networks, setting the stage for more complex scenarios. + +## Prerequisites + +To follow this tutorial, first, you need to have Zombienet installed. If you haven't done so, please follow the instructions in the [Installation](../overview.md/#installation){target=\_blank} section. + +## Defining the Network + +As mentioned in the [Configuration Files](../overview.md/#configuration-files){target=\_blank} section, Zombienet uses a configuration file to define the ephemeral network that will be spawned. To follow this tutorial, create a file named `spawn-a-basic-network.toml` with the following content: + +```toml +[settings] +timeout = 120 + +[relaychain] + +[[relaychain.nodes]] +name = "alice" +validator = true + +[[relaychain.nodes]] +name = "bob" +validator = true + +[[parachains]] +id = 100 + + [parachains.collator] + name = "collator01" +``` + +This configuration file defines a network with a relaychain with two nodes, `alice` and `bob`, and a parachain with a collator named `collator01`. Also, it sets a timeout of 120 seconds for the network to be ready. + +## Running the Network + +To spawn the network, run the following command: + +```bash +zombienet -p native spawn spawn-a-basic-network.toml +``` + +This command will spawn the network defined in the `spawn-a-basic-network.toml` configuration file. The `-p native` flag specifies that the network will be spawned using the native provider. + +If successful, you will see the following output: + +
+ zombienet -p native spawn spawn-a-basic-network.toml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Network launched 🚀🚀 +
Namespacezombie-75a01b93c92d571f6198a67bcb380fcd
Providernative
+ Node Information +
Namealice
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer
Prometheus Linkhttp://127.0.0.1:55310/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
+ Node Information +
Namebob
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55312#explorer
Prometheus Linkhttp://127.0.0.1:50634/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
+ Node Information +
Namecollator01
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55316#explorer
Prometheus Linkhttp://127.0.0.1:55318/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
Parachain ID100
ChainSpec Path/var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
+
+ +!!! note + If the IPs and ports are not explicitly defined in the configuration file, they may change each time the network is started, causing the links provided in the output to differ from the example. + +## Interacting with the Spawned Network + +### Connecting to the Nodes + +After the network is launched, you can interact with it using [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank}. To do so, open your browser and use the provided links listed by the output as `Direct Link`. For instance, in this particular case, as the ports may vary from spawning to spawning, to interact with the `alice` node, open [https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer){target=\_blank} as it is the link provided in the output for the `alice` node. Moreover, you can also do this for the `bob` and `collator01` nodes. + +If you want to interact with the nodes more programmatically, you can also use the [Polkadot.js API](https://polkadot.js.org/api/){target=_blank}. For example, the following code snippet shows how to connect to the `alice` node using the Polkadot.js API and log some information about the chain and node: + +```typescript +import { ApiPromise, WsProvider } from '@polkadot/api'; + +async function main() { + const wsProvider = new WsProvider('ws://127.0.0.1:55308'); + const api = await ApiPromise.create({ provider: wsProvider }); + + // Retrieve the chain & node information via rpc calls + const [chain, nodeName, nodeVersion] = await Promise.all([ + api.rpc.system.chain(), + api.rpc.system.name(), + api.rpc.system.version() + ]); + + console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`); +} + +main().catch(console.error).finally(() => process.exit()); +``` + +Either way allows you to interact easily with the network and its nodes. + +### Checking Metrics + +You can also check the metrics of the nodes by accessing the provided links listed by the output as `Prometheus Link`. [Prometheus](https://prometheus.io/){target=_blank} is a monitoring and alerting toolkit that collects metrics from the nodes. By accessing the provided links, you can see the metrics of the nodes in a web interface. So, for example, the following image shows the Prometheus metrics for Bob’s node from the Zombienet test: + +![Prometheus metrics for Bob’s node from the Zombienet test](/polkadot-ecosystem-docs-draft/images/dev-tools/zombienet/tutorials/zombienet-tutorials-1.webp) + +### Checking Logs + +To check the nodes’ logs, you can use the provided command listed by the output as 'Log Cmd'. For instance, to check the logs of the `alice` node, you can open a new terminal and run the following command: + +```bash +tail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-SEzfCidQ1za4/alice.log +``` + +After running this command, you will see the logs of the `alice` node in real-time, which can be useful for debugging purposes. The logs of the `bob` and `collator01` nodes can be checked similarly. + +## Running a Test + +To run a test against the spawned network, you can use the [Zombienet DSL](../testing.md) to define the test scenario. For example, you can create a file named `spawn-a-basic-network-test.zndsl` with the following content: + +```toml +Description: Test the basic functionality of the network (minimal example) +Network: ./spawn-a-basic-network.toml +Creds: config + +alice: is up +alice: parachain 100 is registered within 225 seconds +alice: parachain 100 block height is at least 10 within 250 seconds + +bob: is up +bob: parachain 100 is registered within 225 seconds +bob: parachain 100 block height is at least 10 within 250 seconds + +# metrics +alice: reports node_roles is 4 +alice: reports sub_libp2p_is_major_syncing is 0 + +bob: reports node_roles is 4 + +collator01: reports node_roles is 4 +``` + +This test scenario checks to verify the following: + +- the nodes are running +- the parachain with ID 100 is registered within a certain timeframe (255 seconds in this example) +- the parachain block height is at least a certain number within a timeframe (in this case, 10 within 255 seconds) +- the nodes report metrics + +However, you can define any test scenario following the [Zombienet DSL](../testing.md) syntax. + +To run the test, execute the following command: + +```bash +zombienet -p native test spawn-a-basic-network-test.zndsl +``` + +This command will execute the test scenario defined in the `spawn-a-basic-network-test.zndsl` file on the network. If successful, the terminal will display the test output, indicating whether the test passed or failed. \ No newline at end of file From eebf6a6fc6519053b8209abb1b4e40a8f6134fe7 Mon Sep 17 00:00:00 2001 From: 0xLucca <0xlucca.dev@gmail.com> Date: Thu, 22 Aug 2024 15:19:56 -0300 Subject: [PATCH 09/13] Fix workflow --- .github/workflows/vale.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index c0b137fd..9b786b80 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -6,6 +6,8 @@ on: jobs: review-docs: runs-on: ubuntu-latest + permissions: + pull-requests: write outputs: files: ${{ steps.get-modified-files.outputs.files }} steps: @@ -28,6 +30,7 @@ jobs: files: ${{ steps.get-modified-files.outputs.files }} vale_flags: "--no-exit --minAlertLevel=error" reporter: github-pr-review + fail_on_error: true env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} From b2e8e3353a5ff87572f45c31031e43c6a34d194e Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 14:27:36 -0400 Subject: [PATCH 10/13] removes test file --- docs/test.md | 237 --------------------------------------------------- 1 file changed, 237 deletions(-) delete mode 100644 docs/test.md diff --git a/docs/test.md b/docs/test.md deleted file mode 100644 index 5fede0e7..00000000 --- a/docs/test.md +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: Spawn a Basic Network Using Zombienet -description: This tutorial gets you started with Zombienet by providing a minimal example of how to use Zombienet to spawn a basic network and run a simple test over it. ---- - -# Spawn a Basic Network - -## Introduction - -In this tutorial, you'll learn how to set up a basic network using Zombienet and run a simple test to validate its functionality. The example provided walks you through defining a minimal network configuration, spawning the network, and interacting with the nodes. By the end, you'll clearly understand how to use Zombienet to deploy and test ephemeral blockchain networks, setting the stage for more complex scenarios. - -## Prerequisites - -To follow this tutorial, first, you need to have Zombienet installed. If you haven't done so, please follow the instructions in the [Installation](../overview.md/#installation){target=\_blank} section. - -## Defining the Network - -As mentioned in the [Configuration Files](../overview.md/#configuration-files){target=\_blank} section, Zombienet uses a configuration file to define the ephemeral network that will be spawned. To follow this tutorial, create a file named `spawn-a-basic-network.toml` with the following content: - -```toml -[settings] -timeout = 120 - -[relaychain] - -[[relaychain.nodes]] -name = "alice" -validator = true - -[[relaychain.nodes]] -name = "bob" -validator = true - -[[parachains]] -id = 100 - - [parachains.collator] - name = "collator01" -``` - -This configuration file defines a network with a relaychain with two nodes, `alice` and `bob`, and a parachain with a collator named `collator01`. Also, it sets a timeout of 120 seconds for the network to be ready. - -## Running the Network - -To spawn the network, run the following command: - -```bash -zombienet -p native spawn spawn-a-basic-network.toml -``` - -This command will spawn the network defined in the `spawn-a-basic-network.toml` configuration file. The `-p native` flag specifies that the network will be spawned using the native provider. - -If successful, you will see the following output: - -
- zombienet -p native spawn spawn-a-basic-network.toml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Network launched 🚀🚀 -
Namespacezombie-75a01b93c92d571f6198a67bcb380fcd
Providernative
- Node Information -
Namealice
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer
Prometheus Linkhttp://127.0.0.1:55310/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
- Node Information -
Namebob
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55312#explorer
Prometheus Linkhttp://127.0.0.1:50634/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
- Node Information -
Namecollator01
Direct Linkhttps://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55316#explorer
Prometheus Linkhttp://127.0.0.1:55318/metrics
Log Cmdtail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
Parachain ID100
ChainSpec Path/var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-2
-
- -!!! note - If the IPs and ports are not explicitly defined in the configuration file, they may change each time the network is started, causing the links provided in the output to differ from the example. - -## Interacting with the Spawned Network - -### Connecting to the Nodes - -After the network is launched, you can interact with it using [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank}. To do so, open your browser and use the provided links listed by the output as `Direct Link`. For instance, in this particular case, as the ports may vary from spawning to spawning, to interact with the `alice` node, open [https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer){target=\_blank} as it is the link provided in the output for the `alice` node. Moreover, you can also do this for the `bob` and `collator01` nodes. - -If you want to interact with the nodes more programmatically, you can also use the [Polkadot.js API](https://polkadot.js.org/api/){target=_blank}. For example, the following code snippet shows how to connect to the `alice` node using the Polkadot.js API and log some information about the chain and node: - -```typescript -import { ApiPromise, WsProvider } from '@polkadot/api'; - -async function main() { - const wsProvider = new WsProvider('ws://127.0.0.1:55308'); - const api = await ApiPromise.create({ provider: wsProvider }); - - // Retrieve the chain & node information via rpc calls - const [chain, nodeName, nodeVersion] = await Promise.all([ - api.rpc.system.chain(), - api.rpc.system.name(), - api.rpc.system.version() - ]); - - console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`); -} - -main().catch(console.error).finally(() => process.exit()); -``` - -Either way allows you to interact easily with the network and its nodes. - -### Checking Metrics - -You can also check the metrics of the nodes by accessing the provided links listed by the output as `Prometheus Link`. [Prometheus](https://prometheus.io/){target=_blank} is a monitoring and alerting toolkit that collects metrics from the nodes. By accessing the provided links, you can see the metrics of the nodes in a web interface. So, for example, the following image shows the Prometheus metrics for Bob’s node from the Zombienet test: - -![Prometheus metrics for Bob’s node from the Zombienet test](/polkadot-ecosystem-docs-draft/images/dev-tools/zombienet/tutorials/zombienet-tutorials-1.webp) - -### Checking Logs - -To check the nodes’ logs, you can use the provided command listed by the output as 'Log Cmd'. For instance, to check the logs of the `alice` node, you can open a new terminal and run the following command: - -```bash -tail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-SEzfCidQ1za4/alice.log -``` - -After running this command, you will see the logs of the `alice` node in real-time, which can be useful for debugging purposes. The logs of the `bob` and `collator01` nodes can be checked similarly. - -## Running a Test - -To run a test against the spawned network, you can use the [Zombienet DSL](../testing.md) to define the test scenario. For example, you can create a file named `spawn-a-basic-network-test.zndsl` with the following content: - -```toml -Description: Test the basic functionality of the network (minimal example) -Network: ./spawn-a-basic-network.toml -Creds: config - -alice: is up -alice: parachain 100 is registered within 225 seconds -alice: parachain 100 block height is at least 10 within 250 seconds - -bob: is up -bob: parachain 100 is registered within 225 seconds -bob: parachain 100 block height is at least 10 within 250 seconds - -# metrics -alice: reports node_roles is 4 -alice: reports sub_libp2p_is_major_syncing is 0 - -bob: reports node_roles is 4 - -collator01: reports node_roles is 4 -``` - -This test scenario checks to verify the following: - -- the nodes are running -- the parachain with ID 100 is registered within a certain timeframe (255 seconds in this example) -- the parachain block height is at least a certain number within a timeframe (in this case, 10 within 255 seconds) -- the nodes report metrics - -However, you can define any test scenario following the [Zombienet DSL](../testing.md) syntax. - -To run the test, execute the following command: - -```bash -zombienet -p native test spawn-a-basic-network-test.zndsl -``` - -This command will execute the test scenario defined in the `spawn-a-basic-network-test.zndsl` file on the network. If successful, the terminal will display the test output, indicating whether the test passed or failed. \ No newline at end of file From ec9bba90355c3f3d93acd3e1c685a1b4d3081bc3 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 15:46:23 -0400 Subject: [PATCH 11/13] fixed target blank, vocab updates --- .github/styles/Papermoon/LinkTarget.yml | 4 ++-- .../config/ignore/brand-token-ignore.txt | 14 +++++++++++ .../config/vocabularies/Industry/accept.txt | 23 ++++++++++++++++++- .vale.ini | 1 + 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/styles/Papermoon/LinkTarget.yml b/.github/styles/Papermoon/LinkTarget.yml index 03d90d80..457920f3 100644 --- a/.github/styles/Papermoon/LinkTarget.yml +++ b/.github/styles/Papermoon/LinkTarget.yml @@ -1,9 +1,9 @@ # LinkTarget.yml extends: existence -message: "Links should include '{target=_blank}' to open in a new tab." +message: "Links should include '{target=\_blank}' to open in a new tab." level: error scope: raw tokens: - '\[.*?\]\(.*?\)' raw: - - '{target=_blank}' \ No newline at end of file + - '{target=\_blank}' \ No newline at end of file diff --git a/.github/styles/config/ignore/brand-token-ignore.txt b/.github/styles/config/ignore/brand-token-ignore.txt index 77f18487..31a29ea2 100644 --- a/.github/styles/config/ignore/brand-token-ignore.txt +++ b/.github/styles/config/ignore/brand-token-ignore.txt @@ -1,7 +1,21 @@ # List of crypto & blockchain brand names and token symbols Acala +Algorand +Aptos +Arbitrum Astar +Celo +CELO Ethereum Grafana +Klaytn +Kujira Metamask +Moonbeam +Moonriver +Moonbase Alpha Polkadot +Sei +Solana +Uniswap +Wormhole diff --git a/.github/styles/config/vocabularies/Industry/accept.txt b/.github/styles/config/vocabularies/Industry/accept.txt index 3852bd86..7264802c 100644 --- a/.github/styles/config/vocabularies/Industry/accept.txt +++ b/.github/styles/config/vocabularies/Industry/accept.txt @@ -1,14 +1,25 @@ API +application blockchain blockchains +burnable certhash cron jobs daemon daemonless +[Dd]App enum +ERC-\d+ +EVM +EVMs +href +Injective JavaScript +JSON-RPC keystore keystores +mintable +multisig namespace namespaces npm @@ -17,10 +28,20 @@ onboarded onboarding Podman SDK +snake_case subcommand subkeys +tooltip TypeScript validator validators Wasm -webRTC +webRTC + + + + + + + + diff --git a/.vale.ini b/.vale.ini index f266fce1..d913a6c8 100644 --- a/.vale.ini +++ b/.vale.ini @@ -7,6 +7,7 @@ Vocab = Industry, Polkadot, Papermoon # Packages included in this configuration Packages = Google # Scopes which are ignored by Vale (inline-level HTML tags) +# This is in place so Vale ignores styled terminal elements SkippedScopes = div # Styles used in this configuration From 20e215f33696eefd5713481a5edf6eb3177b6a39 Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Thu, 22 Aug 2024 16:03:11 -0400 Subject: [PATCH 12/13] vale config tweaks, one doc error fix --- .github/styles/Papermoon/Titlecase.yml | 1 - .github/styles/Papermoon/WordSwapList.yml | 7 +------ .github/styles/config/vocabularies/Polkadot/accept.txt | 5 +++-- docs/dev-tools/chopsticks/overview.md | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/styles/Papermoon/Titlecase.yml b/.github/styles/Papermoon/Titlecase.yml index c44d3955..add3856a 100644 --- a/.github/styles/Papermoon/Titlecase.yml +++ b/.github/styles/Papermoon/Titlecase.yml @@ -9,6 +9,5 @@ style: Chicago exceptions: - ABC - - add \ No newline at end of file diff --git a/.github/styles/Papermoon/WordSwapList.yml b/.github/styles/Papermoon/WordSwapList.yml index 6ad7197f..5a67e6e1 100644 --- a/.github/styles/Papermoon/WordSwapList.yml +++ b/.github/styles/Papermoon/WordSwapList.yml @@ -52,21 +52,16 @@ swap: file name: filename firewalls: firewall rules functionality: capability|feature - Google account: Google Account - Google accounts: Google Accounts Googling: search with Google grayed-out: unavailable HTTPs: HTTPS in order to: to ingest: import|load k8s: Kubernetes - long press: touch & hold + long press: touch and hold network IP address: internal IP address - omnibox: address bar open-source: open source overview screen: recents screen - regex: regular expression - SHA1: SHA-1|HAS-SHA1 sign into: sign in to sign-?on: single sign-on static IP address: static external IP address diff --git a/.github/styles/config/vocabularies/Polkadot/accept.txt b/.github/styles/config/vocabularies/Polkadot/accept.txt index 0a9ac415..a73426d1 100644 --- a/.github/styles/config/vocabularies/Polkadot/accept.txt +++ b/.github/styles/config/vocabularies/Polkadot/accept.txt @@ -19,8 +19,9 @@ parachains parathread Polkadot Polkadot's -relaychain -relaychains +Polkadot SDK +relay chain +relay chains Smoldot Zombienet diff --git a/docs/dev-tools/chopsticks/overview.md b/docs/dev-tools/chopsticks/overview.md index db95fc6e..7e8ba97b 100644 --- a/docs/dev-tools/chopsticks/overview.md +++ b/docs/dev-tools/chopsticks/overview.md @@ -18,7 +18,7 @@ With Chopsticks, developers can simulate and test complex blockchain scenarios w For additional support and information, please reach out through [GitHub Issues](https://github.com/AcalaNetwork/chopsticks/issues){target=_blank}. !!! note - Chopsticks uses [Smoldot](https://github.com/smol-dot/smoldot){target=_blank} light client, which only supports the native Polkadot-SDK API. Consequently, a Chopsticks-based fork doesn't support Ethereum JSON-RPC calls, so you cannot use it to fork your chain and connect Metamask. + Chopsticks uses [Smoldot](https://github.com/smol-dot/smoldot){target=_blank} light client, which only supports the native Polkadot SDK API. Consequently, a Chopsticks-based fork doesn't support Ethereum JSON-RPC calls, so you cannot use it to fork your chain and connect Metamask. ## Prerequisites From 5e7b77efcbb730763ae4feeb79eaa59e53a43e5c Mon Sep 17 00:00:00 2001 From: DAWN KELLY Date: Fri, 23 Aug 2024 09:29:59 -0400 Subject: [PATCH 13/13] updates vocab and word swap list for Vale --- .github/styles/Papermoon/WordSwapList.yml | 46 +------------------ .../config/vocabularies/Industry/accept.txt | 2 +- 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/.github/styles/Papermoon/WordSwapList.yml b/.github/styles/Papermoon/WordSwapList.yml index 5a67e6e1..72f1c4a7 100644 --- a/.github/styles/Papermoon/WordSwapList.yml +++ b/.github/styles/Papermoon/WordSwapList.yml @@ -6,72 +6,28 @@ ignorecase: false action: name: replace swap: - "(?:API Console|dev|developer) key": API key - "(?:cell ?phone|smart ?phone)": phone|mobile phone - "(?:dev|developer|APIs) console": API console "(?:e-mail|Email|E-mail)": email "(?:file ?path|path ?name)": path "(?:kill|terminate|abort)": stop|exit|cancel|end - "(?:OAuth ?2|Oauth)": OAuth 2.0 "(?:ok|Okay)": OK|okay "(?:WiFi|wifi)": Wi-Fi - '[\.]+apk': APK '3\-D': 3D - 'Google (?:I\-O|IO)': Google I/O - "tap (?:&|and) hold": touch & hold "un(?:check|select)": clear above: preceding - account name: username - action bar: app bar admin: administrator Ajax: AJAX a\.k\.a|aka: or|also known as - Android device: Android-powered device - android: Android - API explorer: APIs Explorer - application: app approx\.: approximately - authN: authentication - authZ: authorization - autoupdate: automatically update - cellular data: mobile data - cellular network: mobile network - chapter: documents|pages|sections check box: checkbox - # CLI: command-line tool - # click on: click|click in - Cloud: Google Cloud Platform|GCP - Container Engine: Kubernetes Engine - content type: media type - curated roles: predefined roles - data are: data is - Developers Console: Google API Console|API Console disabled?: turn off|off|deactivate - ephemeral IP address: ephemeral external IP address - fewer data: less data file name: filename - firewalls: firewall rules - functionality: capability|feature - Googling: search with Google - grayed-out: unavailable HTTPs: HTTPS in order to: to - ingest: import|load - k8s: Kubernetes - long press: touch and hold - network IP address: internal IP address open-source: open source - overview screen: recents screen - sign into: sign in to - sign-?on: single sign-on - static IP address: static external IP address stylesheet: style sheet - synch: sync tablename: table name - tablet: device - touch: tap url: URL vs\.: versus wasm: Wasm - World Wide Web: web + \ No newline at end of file diff --git a/.github/styles/config/vocabularies/Industry/accept.txt b/.github/styles/config/vocabularies/Industry/accept.txt index 7264802c..06c0d936 100644 --- a/.github/styles/config/vocabularies/Industry/accept.txt +++ b/.github/styles/config/vocabularies/Industry/accept.txt @@ -4,7 +4,7 @@ blockchain blockchains burnable certhash -cron jobs +CronJobs daemon daemonless [Dd]App