From 731aec69445e055e54dbd2a7a853d8d1999c399c Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:14:48 +1000 Subject: [PATCH 01/18] Create sr-1.md --- sr-1.md | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sr-1.md diff --git a/sr-1.md b/sr-1.md new file mode 100644 index 000000000..83c2cfba8 --- /dev/null +++ b/sr-1.md @@ -0,0 +1,167 @@ +--- +sr: 1 +title: SR Purpose and Guidelines +status: Implemented +author: Fenway +created: 2024-09-24T00:00:00.000Z +type: Governance +network: Ethereum & Optimism +--- + +## What is an SR? + +SR stands for Synthetix Referendum. SR's are artifacts that describe proposed changes to Synthetix that are to be voted on by SNX token holders, not representative Council members. + +## SR Rationale + +We intend SRs to be the primary mechanisms for proposing significant changes to the protocol to be voted on directly by SNX token holders. These can include but are not limited to; structural changes to Synthetix operations, governance model adjustments, and token design changes. Because they are maintained as text files in a versioned repository, their revision history is the historical record of the proposal. + +It is highly recommended that the SR be socialised with tokenholders prior to posting to get a community temperature check and/or to gather the required support to meet the quorum required. + +A SR must meet certain minimum criteria, as outlined in SIP-408. It must be a clear and complete description of the proposed changes. + +## SR Work Flow + +Parties involved in the process are the _author_, the [_SIP editors_](#sip-editors), and the [Spartan Council](https://governance.synthetix.io/#/councils/spartan). + +:warning: Before you begin, vet your idea, this will save you time. Ask the Synthetix community first if the proposed change is original to avoid wasting time on something that will be rejected based on prior research (searching the Internet does not always do the trick). It also helps to make sure the idea is applicable to the entire community and not just the author. Just because an idea sounds good to the author does not mean it will have the intend effect. The appropriate public forum to gauge interest around your SCCP is [the Synthetix Discord]. + +Your role as the champion is to write the SR using the style and format described below, shepherd the discussions in the appropriate forums, and build community consensus around the idea. Following is the process that a successful SR will move along: + +``` +[ DRAFT ] -> [ PROPOSED ] -> [ VOTINH ] -> [ APPROVED ] +``` + +Each status change is requested by the SR author and reviewed by the SIP editors. Use a pull request to update the status. Please include a link to where people should continue discussing your SR. The SIP editors will process these requests as per the conditions below. + +- **Draft** -- This SR is work-in-progress. + +- **Proposed** -- If agreeable and the relevant criteria are met, SIP editor will assign the SR a number (generally the issue or PR number related to the SR) and merge your pull request. The SIP editor may request more information before merging an SR. Proposed SRs will be discussed during governance calls (either weekly scheduled ones or one-off governance calls) and in Discord. + +- **Voting** -- A snapshot vote will be held for SNX token holders. If the quorum and approval percentage meet the required criteria, the change will be moved to approved. + +- **Approved** -- This SR has passed community governance and is now being prioritised. + +## What belongs in a successful SR? + +Each SR should have the following parts: + +- Preamble - RFC 822 style headers containing metadata about the SR, including the SR number, a short descriptive title (limited to a maximum of 44 characters), and the author details. +- Simple Summary - “If you can’t explain it simply, you don’t understand it well enough.” Provide a simplified and layman-accessible explanation of the SR. +- Abstract - a short (~200 word) description of the variable change proposed. +- Motivation (\*optional) - The motivation is critical for SRs that want to update significant components of the Synthetix project. It should clearly explain why the existing methods of operation are not adequate. SR submissions without sufficient motivation may be rejected outright. + +## SR Formats and Templates + +SCCPs should be written in [markdown] format. +Image files should be included in a subdirectory of the `assets` folder for that SR as follows: `assets/sr-X` (for sr **X**). When linking to an image in the SR, use relative links such as `../assets/sr-X/image.png`. + +## SR Header Preamble + +Each SR must begin with an [RFC 822](https://www.ietf.org/rfc/rfc822.txt) style header preamble, preceded and followed by three hyphens (`---`). This header is also termed ["front matter" by Jekyll](https://jekyllrb.com/docs/front-matter/). The headers must appear in the following order. Headers marked with "\*" are optional and are described below. All other headers are required. + +` sip:` (this is determined by the SIP editor) + +` title:` + +` author:` + +` * discussions-to:` \ + +` status:` < DRAFT | PROPOSED | VOTING | APPROVED > + +` created:` + +` * updated:` + +` * requires:` + +Headers that permit lists must separate elements with commas. + +Headers requiring dates will always do so in the format of ISO 8601 (yyyy-mm-dd). + +#### `author` header + +The `author` header optionally lists the names, email addresses or usernames of the authors/owners of the SCCP. Those who prefer anonymity may use a username only, or a first name and a username. The format of the author header value must be: + +> Random J. User <address@dom.ain> + +or + +> Random J. User (@username) + +if the email address or GitHub username is included, and + +> Random J. User + +if the email address is not given. + +#### `discussions-to` header + +While an SR is in DRAFT or PROPOSED status, a `discussions-to` header will indicate the mailing list or URL where the SR is being discussed. + +#### `created` header + +The `created` header records the date that the SR was assigned a number. Both headers should be in yyyy-mm-dd format, e.g. 2001-08-14. + +#### `updated` header + +The `updated` header records the date(s) when the SR was updated with "substantial" changes. This header is only valid for SCCPs of Draft and Active status. + +#### `requires` header + +SRs may have a `requires` header, indicating the SR numbers that this SCCP depends on. + +## Auxiliary Files + +SRs may include auxiliary files such as diagrams. Such files must be named SR-XXXX-Y.ext, where “XXXX” is the SR number, “Y” is a serial number (starting at 1), and “ext” is replaced by the actual file extension (e.g. “png”). + +## SIP Editors + +The current SIP editors can be found listed in [SIP-1](https://github.com/Synthetixio/SIPs/blob/master/sips/sip-1.md) + +## SIP Editor Responsibilities + +For each new SR that comes in, an editor does the following: + +- Read the SR to check if it is ready: sound and complete. The ideas must make technical sense, even if they don't seem likely to get to final status. +- Ensure the SR meets the required criteria (e.g. soft quorum) +- The title should accurately describe the content. +- Check the SR for language (spelling, grammar, sentence structure, etc.), markup (Github flavored Markdown), code style + +If the SR isn't ready, the editor will send it back to the author for revision, with specific instructions. + +Once the SR is ready for the repository, the SIP editor will: + +- Assign an SR number (generally the PR number or, if preferred by the author, the Issue # if there was discussion in the Issues section of this repository about this SR) + +- Merge the corresponding pull request + +- Send a message back to the SR author with the next step. + +Many SRs are written and maintained by developers with write access to the Ethereum codebase. The SIP editors monitor SR changes, and correct any structure, grammar, spelling, or markup mistakes we see. + +The editors don't pass judgment on SRs. We merely do the administrative & editorial part. + +## History + +The SR document was derived heavily from the EIP Ethereum Improvement Proposal document in many places text was simply copied and modified. Any comments about the SR document should be directed to the SIP editors. The history of the EIP is quoted below from the EIP document for context: + +- _"This document (EIP) was derived heavily from [Bitcoin's BIP-0001] written by Amir Taaki which in turn was derived from [Python's PEP-0001]. In many places text was simply copied and modified. Although the PEP-0001 text was written by Barry Warsaw, Jeremy Hylton, and David Goodger, they are not responsible for its use..."_ \* + +June 10, 2019: SR-1 has been drafted and submitted as a PR. + +See [the revision history for further details](https://github.com/synthetixio/**), which is also available by clicking on the History button in the top right of the SR. + +### Bibliography + +[the synthetix discord]: https://discord.gg/a2E6uxk +[pull request]: https://github.com/Synthetixio/SIPs/pulls +[markdown]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet +[bitcoin's bip-0001]: https://github.com/bitcoin/bips +[python's pep-0001]: https://www.python.org/dev/peps/ +[synthetix engineering team]: https://github.com/orgs/Synthetixio/people + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 141d5d209b9e1fd5926d8dacb0fa1c3f02ae613b Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:16:59 +1000 Subject: [PATCH 02/18] Create sr-{MarkdownRemark.frontmatter__sr}.tsx --- .../sr-{MarkdownRemark.frontmatter__sr}.tsx | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx diff --git a/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx new file mode 100644 index 000000000..3f7ff09d2 --- /dev/null +++ b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx @@ -0,0 +1,49 @@ +import React from 'react' +import { graphql } from 'gatsby' +import { Helmet } from 'react-helmet' + +import Main from '../../layout/Main' +import FrontmatterTable from '../../components/FrontmatterTable' +import SourceIcon from '../../icons/Source' +import { SrPageQuery } from '../../../types/gql' +import { getGithubLink } from '../../components/utils' + +interface Props { + frontmatter__sip: number + data: SrPageQuery +} + +const Template: React.FC = ({ data }) => { + const { markdownRemark } = data + const { frontmatter, html, fileAbsolutePath } = markdownRemark + const githubLink = getGithubLink(fileAbsolutePath) + return ( +
+ +

+ + SR-{frontmatter.sr}: {frontmatter.title} + +

+ +
+
+ ) +} + +export default Template + +export const pageQuery = graphql` + query srPage($frontmatter__sr: Int) { + markdownRemark(frontmatter: { sr: { eq: $frontmatter__sr } }) { + fileAbsolutePath + frontmatter { + ...Frontmatter + } + html + } + } +` From 9e93eeb0ba324869cbba04dff527d6cdcf4f0725 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:18:07 +1000 Subject: [PATCH 03/18] Create all-sr.tsx --- src/pages/all-sr.tsx | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/pages/all-sr.tsx diff --git a/src/pages/all-sr.tsx b/src/pages/all-sr.tsx new file mode 100644 index 000000000..53c29b914 --- /dev/null +++ b/src/pages/all-sr.tsx @@ -0,0 +1,66 @@ +import React from 'react' +import { graphql } from 'gatsby' +import { sortBy, filter, flow } from 'lodash/fp' +import { Helmet } from 'react-helmet' + +import statuses from '../../ci/statuses' +import { AllSrsQuery } from '../../types/gql' +import Main from '../layout/Main' +import { StatusTable } from '../components/StatusTable' +import { StatusLabel } from '../components/StatusLabel' + +interface Props { + data: AllSrsQuery +} + +const Template: React.FC = ({ data: { allMarkdownRemark } }) => { + const { group } = allMarkdownRemark + + const columns = flow( + filter(({ fieldValue }) => statuses.indexOf(fieldValue) > -1), + sortBy(({ fieldValue }) => statuses.indexOf(fieldValue)), + )(group) as AllSrsQuery['allMarkdownRemark']['group'] + + return ( +
+ +
+

All SRs

+
+
+ {columns.map((g) => { + const rows = sortBy('frontmatter.sr')(g.nodes) + return ( +
+ + +
+ ) + })} +
+
+ ) +} + +export default Template + +export const pageQuery = graphql` + query allSrs { + allMarkdownRemark( + filter: { + fileAbsolutePath: { regex: "/srs/" } + frontmatter: { sr: { ne: null } } + } + ) { + group(field: frontmatter___status) { + fieldValue + nodes { + id + frontmatter { + ...Frontmatter + } + } + } + } + } +` From b53339ab06da0b6f181116cac5e814d8f12efc97 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:20:10 +1000 Subject: [PATCH 04/18] Add SR to header --- src/layout/Main.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/layout/Main.tsx b/src/layout/Main.tsx index 8adc16e71..21e31678d 100644 --- a/src/layout/Main.tsx +++ b/src/layout/Main.tsx @@ -75,6 +75,9 @@ const Main: React.FC = ({ children }) => { All STPs + + All SRs + From fc0f31d801482d40627143b055089aea2b999c2b Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:21:41 +1000 Subject: [PATCH 05/18] Add SR to StatusTable.tsx --- src/components/StatusTable.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/StatusTable.tsx b/src/components/StatusTable.tsx index 67b615195..d01f7af16 100644 --- a/src/components/StatusTable.tsx +++ b/src/components/StatusTable.tsx @@ -30,6 +30,10 @@ const StatusTable: React.FC = ({ rows }) => { {row.frontmatter.stp} + ) : row.frontmatter.sr ? ( + + {row.frontmatter.sr} + ) : ( {row.frontmatter.sccp} From 301746ad1be4b50bd6a45df8f440177ff1524282 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:23:07 +1000 Subject: [PATCH 06/18] Add SRs to title --- gatsby-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatsby-config.js b/gatsby-config.js index 461946a7d..5cfabf377 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -4,7 +4,7 @@ module.exports = { }, siteMetadata: { siteUrl: 'https://www.yourdomain.tld', - title: 'Synthetix SIPs, STPs & SCCPs', + title: 'Synthetix SIPs, STPs, SRs & SCCPs', }, plugins: [ 'gatsby-plugin-typescript', From f88821d9c5d2afc6c877f27449408e20cb40a145 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:27:23 +1000 Subject: [PATCH 07/18] Add SR to checkFrontmatters --- ci/checkFrontmatters.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ci/checkFrontmatters.js b/ci/checkFrontmatters.js index f3957d782..0d811b4ae 100644 --- a/ci/checkFrontmatters.js +++ b/ci/checkFrontmatters.js @@ -45,6 +45,16 @@ const sccpValidationSchema = commonValidationSchema .noUnknown() .strict() +const srValidationSchema = commonValidationSchema + .concat( + Yup.object().shape({ + sr: Yup.number().required(), + }), + ) + .noUnknown() + .strict() + + const stpValidationSchema = Yup.object() .shape({ file: Yup.string().required(), @@ -65,6 +75,7 @@ const stpValidationSchema = Yup.object() const sips = await g('./content/sips/*.md') const stps = await g('./content/stps/*.md') const sccp = await g('./content/sccp/*.md') + const sr = await g('./content/sr/*.md') // SIP await Promise.all( @@ -93,6 +104,15 @@ const stpValidationSchema = Yup.object() return await sccpValidationSchema.validate(castValues) }), ) + // SR + await Promise.all( + sr.map(async (file) => { + const content = await fs.readFile(file, 'utf-8') + const { attributes } = fm(content) + const castValues = srValidationSchema.cast({ file, ...attributes }) + return await srValidationSchema.validate(castValues) + }), + ) } catch (error) { console.log(error) console.error({ From dedf1b3c1865f1a676366fa0b66e584e2bdfc169 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:28:41 +1000 Subject: [PATCH 08/18] Add SR to name --- .github/workflows/PR-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR-build.yml b/.github/workflows/PR-build.yml index 3babbbf3e..1905b3fbf 100644 --- a/.github/workflows/PR-build.yml +++ b/.github/workflows/PR-build.yml @@ -15,5 +15,5 @@ jobs: run: npm install -g npm@latest - name: Install dependencies run: npm install --prefer-offline --no-audit - - name: Validate SIP, STP, & SCCP frontmatters + - name: Validate SIP, STP, SR & SCCP frontmatters run: npm test From c203702b7c02d69579780eea1717acedbcc4c9cf Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:30:34 +1000 Subject: [PATCH 09/18] Add sr-x.md --- sr-1.md | 167 -------------------------------------------------------- sr-x.md | 61 +++++++++++++++++++++ 2 files changed, 61 insertions(+), 167 deletions(-) delete mode 100644 sr-1.md create mode 100644 sr-x.md diff --git a/sr-1.md b/sr-1.md deleted file mode 100644 index 83c2cfba8..000000000 --- a/sr-1.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -sr: 1 -title: SR Purpose and Guidelines -status: Implemented -author: Fenway -created: 2024-09-24T00:00:00.000Z -type: Governance -network: Ethereum & Optimism ---- - -## What is an SR? - -SR stands for Synthetix Referendum. SR's are artifacts that describe proposed changes to Synthetix that are to be voted on by SNX token holders, not representative Council members. - -## SR Rationale - -We intend SRs to be the primary mechanisms for proposing significant changes to the protocol to be voted on directly by SNX token holders. These can include but are not limited to; structural changes to Synthetix operations, governance model adjustments, and token design changes. Because they are maintained as text files in a versioned repository, their revision history is the historical record of the proposal. - -It is highly recommended that the SR be socialised with tokenholders prior to posting to get a community temperature check and/or to gather the required support to meet the quorum required. - -A SR must meet certain minimum criteria, as outlined in SIP-408. It must be a clear and complete description of the proposed changes. - -## SR Work Flow - -Parties involved in the process are the _author_, the [_SIP editors_](#sip-editors), and the [Spartan Council](https://governance.synthetix.io/#/councils/spartan). - -:warning: Before you begin, vet your idea, this will save you time. Ask the Synthetix community first if the proposed change is original to avoid wasting time on something that will be rejected based on prior research (searching the Internet does not always do the trick). It also helps to make sure the idea is applicable to the entire community and not just the author. Just because an idea sounds good to the author does not mean it will have the intend effect. The appropriate public forum to gauge interest around your SCCP is [the Synthetix Discord]. - -Your role as the champion is to write the SR using the style and format described below, shepherd the discussions in the appropriate forums, and build community consensus around the idea. Following is the process that a successful SR will move along: - -``` -[ DRAFT ] -> [ PROPOSED ] -> [ VOTINH ] -> [ APPROVED ] -``` - -Each status change is requested by the SR author and reviewed by the SIP editors. Use a pull request to update the status. Please include a link to where people should continue discussing your SR. The SIP editors will process these requests as per the conditions below. - -- **Draft** -- This SR is work-in-progress. - -- **Proposed** -- If agreeable and the relevant criteria are met, SIP editor will assign the SR a number (generally the issue or PR number related to the SR) and merge your pull request. The SIP editor may request more information before merging an SR. Proposed SRs will be discussed during governance calls (either weekly scheduled ones or one-off governance calls) and in Discord. - -- **Voting** -- A snapshot vote will be held for SNX token holders. If the quorum and approval percentage meet the required criteria, the change will be moved to approved. - -- **Approved** -- This SR has passed community governance and is now being prioritised. - -## What belongs in a successful SR? - -Each SR should have the following parts: - -- Preamble - RFC 822 style headers containing metadata about the SR, including the SR number, a short descriptive title (limited to a maximum of 44 characters), and the author details. -- Simple Summary - “If you can’t explain it simply, you don’t understand it well enough.” Provide a simplified and layman-accessible explanation of the SR. -- Abstract - a short (~200 word) description of the variable change proposed. -- Motivation (\*optional) - The motivation is critical for SRs that want to update significant components of the Synthetix project. It should clearly explain why the existing methods of operation are not adequate. SR submissions without sufficient motivation may be rejected outright. - -## SR Formats and Templates - -SCCPs should be written in [markdown] format. -Image files should be included in a subdirectory of the `assets` folder for that SR as follows: `assets/sr-X` (for sr **X**). When linking to an image in the SR, use relative links such as `../assets/sr-X/image.png`. - -## SR Header Preamble - -Each SR must begin with an [RFC 822](https://www.ietf.org/rfc/rfc822.txt) style header preamble, preceded and followed by three hyphens (`---`). This header is also termed ["front matter" by Jekyll](https://jekyllrb.com/docs/front-matter/). The headers must appear in the following order. Headers marked with "\*" are optional and are described below. All other headers are required. - -` sip:` (this is determined by the SIP editor) - -` title:` - -` author:` - -` * discussions-to:` \ - -` status:` < DRAFT | PROPOSED | VOTING | APPROVED > - -` created:` - -` * updated:` - -` * requires:` - -Headers that permit lists must separate elements with commas. - -Headers requiring dates will always do so in the format of ISO 8601 (yyyy-mm-dd). - -#### `author` header - -The `author` header optionally lists the names, email addresses or usernames of the authors/owners of the SCCP. Those who prefer anonymity may use a username only, or a first name and a username. The format of the author header value must be: - -> Random J. User <address@dom.ain> - -or - -> Random J. User (@username) - -if the email address or GitHub username is included, and - -> Random J. User - -if the email address is not given. - -#### `discussions-to` header - -While an SR is in DRAFT or PROPOSED status, a `discussions-to` header will indicate the mailing list or URL where the SR is being discussed. - -#### `created` header - -The `created` header records the date that the SR was assigned a number. Both headers should be in yyyy-mm-dd format, e.g. 2001-08-14. - -#### `updated` header - -The `updated` header records the date(s) when the SR was updated with "substantial" changes. This header is only valid for SCCPs of Draft and Active status. - -#### `requires` header - -SRs may have a `requires` header, indicating the SR numbers that this SCCP depends on. - -## Auxiliary Files - -SRs may include auxiliary files such as diagrams. Such files must be named SR-XXXX-Y.ext, where “XXXX” is the SR number, “Y” is a serial number (starting at 1), and “ext” is replaced by the actual file extension (e.g. “png”). - -## SIP Editors - -The current SIP editors can be found listed in [SIP-1](https://github.com/Synthetixio/SIPs/blob/master/sips/sip-1.md) - -## SIP Editor Responsibilities - -For each new SR that comes in, an editor does the following: - -- Read the SR to check if it is ready: sound and complete. The ideas must make technical sense, even if they don't seem likely to get to final status. -- Ensure the SR meets the required criteria (e.g. soft quorum) -- The title should accurately describe the content. -- Check the SR for language (spelling, grammar, sentence structure, etc.), markup (Github flavored Markdown), code style - -If the SR isn't ready, the editor will send it back to the author for revision, with specific instructions. - -Once the SR is ready for the repository, the SIP editor will: - -- Assign an SR number (generally the PR number or, if preferred by the author, the Issue # if there was discussion in the Issues section of this repository about this SR) - -- Merge the corresponding pull request - -- Send a message back to the SR author with the next step. - -Many SRs are written and maintained by developers with write access to the Ethereum codebase. The SIP editors monitor SR changes, and correct any structure, grammar, spelling, or markup mistakes we see. - -The editors don't pass judgment on SRs. We merely do the administrative & editorial part. - -## History - -The SR document was derived heavily from the EIP Ethereum Improvement Proposal document in many places text was simply copied and modified. Any comments about the SR document should be directed to the SIP editors. The history of the EIP is quoted below from the EIP document for context: - -- _"This document (EIP) was derived heavily from [Bitcoin's BIP-0001] written by Amir Taaki which in turn was derived from [Python's PEP-0001]. In many places text was simply copied and modified. Although the PEP-0001 text was written by Barry Warsaw, Jeremy Hylton, and David Goodger, they are not responsible for its use..."_ \* - -June 10, 2019: SR-1 has been drafted and submitted as a PR. - -See [the revision history for further details](https://github.com/synthetixio/**), which is also available by clicking on the History button in the top right of the SR. - -### Bibliography - -[the synthetix discord]: https://discord.gg/a2E6uxk -[pull request]: https://github.com/Synthetixio/SIPs/pulls -[markdown]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet -[bitcoin's bip-0001]: https://github.com/bitcoin/bips -[python's pep-0001]: https://www.python.org/dev/peps/ -[synthetix engineering team]: https://github.com/orgs/Synthetixio/people - -## Copyright - -Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/sr-x.md b/sr-x.md new file mode 100644 index 000000000..289c1ef99 --- /dev/null +++ b/sr-x.md @@ -0,0 +1,61 @@ +--- +sr: +title: +status: +author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> +implementation-date: +discussions-to: +created: +--- + + + +This is the suggested template for new SRs. Note that an SR number will be assigned by an editor. When opening a pull request to submit your SR, please use an abbreviated title in the filename, `sr-draft_title_abbrev.md`. The title should be 44 characters or less. + +## Simple Summary + + + +"If you can't explain it simply, you don't understand it well enough." Simply describe the outcome the proposal intends to achieve. This should be accessible to a casual community member. + +## Abstract + + + +A short (~200 word) description of the proposal, the abstract should clearly describe the proposal. This is what _will_ be done if the SR is implemented, not _why_ it should be done or _how_ it will be done. + +## Motivation + + + +This is the problem statement. This is the _why_ of the SR. It should clearly explain _why_ the current state of the protocol is inadequate. It is critical that you explain _why_ the change is needed, if the SR proposes changing how Synthetix operates, you must address _why_ the current methods of operation appear inadequate. This is not the place to describe how the SR will address the issue! + +## Specification + + + +### Overview + + + +This is a high level overview of _how_ the SR will solve the problem. The overview should clearly describe how the new suggested changes will be implemented. + +### Rationale + + + +This is where you explain the reasoning behind how you propose to solve the problem. Why did you propose these changes – what were the considerations. The rationale fleshes out the motivation and reasoning behind decisions that were made. It should describe any alternate ideas that were considered and related work. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion. + +### Specification + + + +The specification should outline the changes being proposed to the operations, structure or design of Synthetix. For example, changes to any operations of working, changes to governance, changes to the tokenomics, etc. + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From ab993a34d3daa2b3d5db5cb57cef7e3d1398e676 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:31:57 +1000 Subject: [PATCH 10/18] Add network to sr-x.md --- sr-x.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sr-x.md b/sr-x.md index 289c1ef99..c08ba10a2 100644 --- a/sr-x.md +++ b/sr-x.md @@ -5,6 +5,7 @@ status: author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> implementation-date: discussions-to: +network: created: --- From 0b72153f48e9f7ded5a7c2a507936a4d0a870571 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:33:20 +1000 Subject: [PATCH 11/18] Create sr-1.md --- content/srs/sr-1.md | 167 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 content/srs/sr-1.md diff --git a/content/srs/sr-1.md b/content/srs/sr-1.md new file mode 100644 index 000000000..83c2cfba8 --- /dev/null +++ b/content/srs/sr-1.md @@ -0,0 +1,167 @@ +--- +sr: 1 +title: SR Purpose and Guidelines +status: Implemented +author: Fenway +created: 2024-09-24T00:00:00.000Z +type: Governance +network: Ethereum & Optimism +--- + +## What is an SR? + +SR stands for Synthetix Referendum. SR's are artifacts that describe proposed changes to Synthetix that are to be voted on by SNX token holders, not representative Council members. + +## SR Rationale + +We intend SRs to be the primary mechanisms for proposing significant changes to the protocol to be voted on directly by SNX token holders. These can include but are not limited to; structural changes to Synthetix operations, governance model adjustments, and token design changes. Because they are maintained as text files in a versioned repository, their revision history is the historical record of the proposal. + +It is highly recommended that the SR be socialised with tokenholders prior to posting to get a community temperature check and/or to gather the required support to meet the quorum required. + +A SR must meet certain minimum criteria, as outlined in SIP-408. It must be a clear and complete description of the proposed changes. + +## SR Work Flow + +Parties involved in the process are the _author_, the [_SIP editors_](#sip-editors), and the [Spartan Council](https://governance.synthetix.io/#/councils/spartan). + +:warning: Before you begin, vet your idea, this will save you time. Ask the Synthetix community first if the proposed change is original to avoid wasting time on something that will be rejected based on prior research (searching the Internet does not always do the trick). It also helps to make sure the idea is applicable to the entire community and not just the author. Just because an idea sounds good to the author does not mean it will have the intend effect. The appropriate public forum to gauge interest around your SCCP is [the Synthetix Discord]. + +Your role as the champion is to write the SR using the style and format described below, shepherd the discussions in the appropriate forums, and build community consensus around the idea. Following is the process that a successful SR will move along: + +``` +[ DRAFT ] -> [ PROPOSED ] -> [ VOTINH ] -> [ APPROVED ] +``` + +Each status change is requested by the SR author and reviewed by the SIP editors. Use a pull request to update the status. Please include a link to where people should continue discussing your SR. The SIP editors will process these requests as per the conditions below. + +- **Draft** -- This SR is work-in-progress. + +- **Proposed** -- If agreeable and the relevant criteria are met, SIP editor will assign the SR a number (generally the issue or PR number related to the SR) and merge your pull request. The SIP editor may request more information before merging an SR. Proposed SRs will be discussed during governance calls (either weekly scheduled ones or one-off governance calls) and in Discord. + +- **Voting** -- A snapshot vote will be held for SNX token holders. If the quorum and approval percentage meet the required criteria, the change will be moved to approved. + +- **Approved** -- This SR has passed community governance and is now being prioritised. + +## What belongs in a successful SR? + +Each SR should have the following parts: + +- Preamble - RFC 822 style headers containing metadata about the SR, including the SR number, a short descriptive title (limited to a maximum of 44 characters), and the author details. +- Simple Summary - “If you can’t explain it simply, you don’t understand it well enough.” Provide a simplified and layman-accessible explanation of the SR. +- Abstract - a short (~200 word) description of the variable change proposed. +- Motivation (\*optional) - The motivation is critical for SRs that want to update significant components of the Synthetix project. It should clearly explain why the existing methods of operation are not adequate. SR submissions without sufficient motivation may be rejected outright. + +## SR Formats and Templates + +SCCPs should be written in [markdown] format. +Image files should be included in a subdirectory of the `assets` folder for that SR as follows: `assets/sr-X` (for sr **X**). When linking to an image in the SR, use relative links such as `../assets/sr-X/image.png`. + +## SR Header Preamble + +Each SR must begin with an [RFC 822](https://www.ietf.org/rfc/rfc822.txt) style header preamble, preceded and followed by three hyphens (`---`). This header is also termed ["front matter" by Jekyll](https://jekyllrb.com/docs/front-matter/). The headers must appear in the following order. Headers marked with "\*" are optional and are described below. All other headers are required. + +` sip:` (this is determined by the SIP editor) + +` title:` + +` author:` + +` * discussions-to:` \ + +` status:` < DRAFT | PROPOSED | VOTING | APPROVED > + +` created:` + +` * updated:` + +` * requires:` + +Headers that permit lists must separate elements with commas. + +Headers requiring dates will always do so in the format of ISO 8601 (yyyy-mm-dd). + +#### `author` header + +The `author` header optionally lists the names, email addresses or usernames of the authors/owners of the SCCP. Those who prefer anonymity may use a username only, or a first name and a username. The format of the author header value must be: + +> Random J. User <address@dom.ain> + +or + +> Random J. User (@username) + +if the email address or GitHub username is included, and + +> Random J. User + +if the email address is not given. + +#### `discussions-to` header + +While an SR is in DRAFT or PROPOSED status, a `discussions-to` header will indicate the mailing list or URL where the SR is being discussed. + +#### `created` header + +The `created` header records the date that the SR was assigned a number. Both headers should be in yyyy-mm-dd format, e.g. 2001-08-14. + +#### `updated` header + +The `updated` header records the date(s) when the SR was updated with "substantial" changes. This header is only valid for SCCPs of Draft and Active status. + +#### `requires` header + +SRs may have a `requires` header, indicating the SR numbers that this SCCP depends on. + +## Auxiliary Files + +SRs may include auxiliary files such as diagrams. Such files must be named SR-XXXX-Y.ext, where “XXXX” is the SR number, “Y” is a serial number (starting at 1), and “ext” is replaced by the actual file extension (e.g. “png”). + +## SIP Editors + +The current SIP editors can be found listed in [SIP-1](https://github.com/Synthetixio/SIPs/blob/master/sips/sip-1.md) + +## SIP Editor Responsibilities + +For each new SR that comes in, an editor does the following: + +- Read the SR to check if it is ready: sound and complete. The ideas must make technical sense, even if they don't seem likely to get to final status. +- Ensure the SR meets the required criteria (e.g. soft quorum) +- The title should accurately describe the content. +- Check the SR for language (spelling, grammar, sentence structure, etc.), markup (Github flavored Markdown), code style + +If the SR isn't ready, the editor will send it back to the author for revision, with specific instructions. + +Once the SR is ready for the repository, the SIP editor will: + +- Assign an SR number (generally the PR number or, if preferred by the author, the Issue # if there was discussion in the Issues section of this repository about this SR) + +- Merge the corresponding pull request + +- Send a message back to the SR author with the next step. + +Many SRs are written and maintained by developers with write access to the Ethereum codebase. The SIP editors monitor SR changes, and correct any structure, grammar, spelling, or markup mistakes we see. + +The editors don't pass judgment on SRs. We merely do the administrative & editorial part. + +## History + +The SR document was derived heavily from the EIP Ethereum Improvement Proposal document in many places text was simply copied and modified. Any comments about the SR document should be directed to the SIP editors. The history of the EIP is quoted below from the EIP document for context: + +- _"This document (EIP) was derived heavily from [Bitcoin's BIP-0001] written by Amir Taaki which in turn was derived from [Python's PEP-0001]. In many places text was simply copied and modified. Although the PEP-0001 text was written by Barry Warsaw, Jeremy Hylton, and David Goodger, they are not responsible for its use..."_ \* + +June 10, 2019: SR-1 has been drafted and submitted as a PR. + +See [the revision history for further details](https://github.com/synthetixio/**), which is also available by clicking on the History button in the top right of the SR. + +### Bibliography + +[the synthetix discord]: https://discord.gg/a2E6uxk +[pull request]: https://github.com/Synthetixio/SIPs/pulls +[markdown]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet +[bitcoin's bip-0001]: https://github.com/bitcoin/bips +[python's pep-0001]: https://www.python.org/dev/peps/ +[synthetix engineering team]: https://github.com/orgs/Synthetixio/people + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 937385b768f7a7723ae0cac4696979b31b23e39d Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:05:45 +1000 Subject: [PATCH 12/18] Add SR template link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b15e2dcf..7a663660c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Synthetix Improvement Proposals (SIPs) describe standards for the Synthetix plat 1. Review [SIP-1](content/sips/sip-1.md). 2. Fork the repository by clicking "Fork" in the top right. -3. Add your SIP to your fork of the repository. There is a [template SIP here](sip-x.md) and a [template STP here](stp-x.md). +3. Add your SIP to your fork of the repository. There is a [template SIP here](sip-x.md), a [template STP here](stp-x.md) and a [template SR here](sr-x.md). 4. Submit a Pull Request to Synthetix's [SIPs repository](https://github.com/synthetixio/SIPs). Your first PR should be a first draft of the final SIP. It must meet the formatting criteria enforced by the build (largely, correct metadata in the header). An editor will manually review the first PR for a new SIP and assign it a number before merging it. Make sure you include a `discussions-to` header with the URL to a new thread on [research.synthetix.io](https://research.synthetix.io) where people can discuss the SIP as a whole. From 06485965a304ad47ae0c639e46db01973af50ffd Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:10:12 +1000 Subject: [PATCH 13/18] Fix typos --- content/srs/sr-1.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/srs/sr-1.md b/content/srs/sr-1.md index 83c2cfba8..834607709 100644 --- a/content/srs/sr-1.md +++ b/content/srs/sr-1.md @@ -24,7 +24,7 @@ A SR must meet certain minimum criteria, as outlined in SIP-408. It must be a cl Parties involved in the process are the _author_, the [_SIP editors_](#sip-editors), and the [Spartan Council](https://governance.synthetix.io/#/councils/spartan). -:warning: Before you begin, vet your idea, this will save you time. Ask the Synthetix community first if the proposed change is original to avoid wasting time on something that will be rejected based on prior research (searching the Internet does not always do the trick). It also helps to make sure the idea is applicable to the entire community and not just the author. Just because an idea sounds good to the author does not mean it will have the intend effect. The appropriate public forum to gauge interest around your SCCP is [the Synthetix Discord]. +:warning: Before you begin, vet your idea, this will save you time. Ask the Synthetix community first if the proposed change is original to avoid wasting time on something that will be rejected based on prior research (searching the Internet does not always do the trick). It also helps to make sure the idea is applicable to the entire community and not just the author. Just because an idea sounds good to the author does not mean it will have the intend effect. The appropriate public forum to gauge interest around your SR is [the Synthetix Discord]. Your role as the champion is to write the SR using the style and format described below, shepherd the discussions in the appropriate forums, and build community consensus around the idea. Following is the process that a successful SR will move along: @@ -53,7 +53,7 @@ Each SR should have the following parts: ## SR Formats and Templates -SCCPs should be written in [markdown] format. +SRs should be written in [markdown] format. Image files should be included in a subdirectory of the `assets` folder for that SR as follows: `assets/sr-X` (for sr **X**). When linking to an image in the SR, use relative links such as `../assets/sr-X/image.png`. ## SR Header Preamble @@ -82,7 +82,7 @@ Headers requiring dates will always do so in the format of ISO 8601 (yyyy-mm-dd) #### `author` header -The `author` header optionally lists the names, email addresses or usernames of the authors/owners of the SCCP. Those who prefer anonymity may use a username only, or a first name and a username. The format of the author header value must be: +The `author` header optionally lists the names, email addresses or usernames of the authors/owners of the SR. Those who prefer anonymity may use a username only, or a first name and a username. The format of the author header value must be: > Random J. User <address@dom.ain> @@ -106,11 +106,11 @@ The `created` header records the date that the SR was assigned a number. Both he #### `updated` header -The `updated` header records the date(s) when the SR was updated with "substantial" changes. This header is only valid for SCCPs of Draft and Active status. +The `updated` header records the date(s) when the SR was updated with "substantial" changes. This header is only valid for SRs of Draft and Active status. #### `requires` header -SRs may have a `requires` header, indicating the SR numbers that this SCCP depends on. +SRs may have a `requires` header, indicating the SR numbers that this SR depends on. ## Auxiliary Files From 17fbcc89e00cd21c546e4474b8a55ce61a1f6adc Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:14:58 +1000 Subject: [PATCH 14/18] Fix typos --- src/pages/all-sr.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/all-sr.tsx b/src/pages/all-sr.tsx index 53c29b914..b7bf07e90 100644 --- a/src/pages/all-sr.tsx +++ b/src/pages/all-sr.tsx @@ -57,6 +57,7 @@ export const pageQuery = graphql` nodes { id frontmatter { + sr ...Frontmatter } } From b2250677506e8164aa9ae598c4a4f4e126615de0 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:18:00 +1000 Subject: [PATCH 15/18] Add SR template link --- src/pages/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 91bc18a98..4bac00c1d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -45,6 +45,10 @@ const IndexPage = () => ( and a{' '} template STP here + {' '} + and a{' '} + + template SR here . From 8d3df4762f1ae8bad9683f9082bb6ef937b8996a Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:19:21 +1000 Subject: [PATCH 16/18] Fix typos --- src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx index 3f7ff09d2..e51227601 100644 --- a/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx +++ b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx @@ -9,7 +9,7 @@ import { SrPageQuery } from '../../../types/gql' import { getGithubLink } from '../../components/utils' interface Props { - frontmatter__sip: number + frontmatter__sr: number data: SrPageQuery } From e7e5e298566803ba1e1e5287e1d0a075df3e8e83 Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:26:49 +1000 Subject: [PATCH 17/18] Fix url reference typo --- src/components/StatusTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StatusTable.tsx b/src/components/StatusTable.tsx index d01f7af16..f215c20b8 100644 --- a/src/components/StatusTable.tsx +++ b/src/components/StatusTable.tsx @@ -31,7 +31,7 @@ const StatusTable: React.FC = ({ rows }) => { {row.frontmatter.stp} ) : row.frontmatter.sr ? ( - + {row.frontmatter.sr} ) : ( From 8c87a3a4d2ad3bd66512b3750b00807f6a90631a Mon Sep 17 00:00:00 2001 From: Fenway-snx <181822346+Fenway-snx@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:33:51 +1000 Subject: [PATCH 18/18] Fix typos --- src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx index e51227601..ccb04bc3a 100644 --- a/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx +++ b/src/pages/srs/sr-{MarkdownRemark.frontmatter__sr}.tsx @@ -41,6 +41,7 @@ export const pageQuery = graphql` markdownRemark(frontmatter: { sr: { eq: $frontmatter__sr } }) { fileAbsolutePath frontmatter { + sr ...Frontmatter } html