Skip to content

Latest commit

 

History

History
359 lines (232 loc) · 26.7 KB

qip-0001.mediawiki

File metadata and controls

359 lines (232 loc) · 26.7 KB

  QIP: 1
  Title: QIP process
  Author: wizeguyy <[email protected]>
  Comments-Summary: No comments yet.
  Comments-URI: https://github.com/quainetwork/qips/wiki/Comments:QIP-0001
  Status: Active
  Type: Process
  Created: 2023-09-06
  License: BSD-2-Clause
           OPL

Table of Contents

Abstract

A Quai Improvement Proposal (QIP) is a design document providing information to the Quai community, or describing a new feature for Quai or its processes or environment. The QIP should provide a concise technical specification of the feature and a rationale for the feature.

We intend QIPs to be the primary mechanisms for proposing new features, for collecting community input on an issue, and for documenting the design decisions that have gone into Quai. The QIP author is responsible for building consensus within the community and documenting dissenting opinions.

Because the QIPs are maintained as text files in a versioned repository, their revision history is the historical record of the feature proposal.

This particular QIP is derived heavily from Bitcoin's BIP2

Copyright

This QIP is dual-licensed under the Open Publication License and BSD 2-clause license.

QIP workflow

The QIP process begins with a new idea for Quai. Each potential QIP must have a champion -- someone who writes the QIP using the style and format described below, shepherds the discussions in the appropriate forums, and attempts to build community consensus around the idea. The QIP champion (a.k.a. Author) should first attempt to ascertain whether the idea is QIP-able. Small enhancements or patches to a particular piece of software often don't require standardisation between multiple projects; these don't need a QIP and should be injected into the relevant project-specific development workflow with a patch submission to the applicable issue tracker. Additionally, many ideas have been brought forward for changing Quai that have been rejected for various reasons. The first step should be to search past discussions to see if an idea has been considered before, and if so, what issues arose in its progression. After investigating past work, the best way to proceed is by posting about the new idea to the Quai forum.

Vetting an idea publicly before going as far as writing a QIP is meant to save both the potential author and the wider community time. Asking the Quai community first if an idea is original helps prevent too much time being spent on something that is guaranteed to be rejected based on prior discussions (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 work for most people in most areas where Quai is used.

Once the champion has asked the Quai community as to whether an idea has any chance of acceptance, a draft QIP should be presented on the Quai forum. This gives the author a chance to flesh out the draft QIP to make it properly formatted, of high quality, and to address additional concerns about the proposal. Following a discussion, the proposal should be submitted to the QIPs git repository as a pull request. This draft must be written in QIP style as described below, and named with an alias such as "qip-johndoe-infinitequais" until an editor has assigned it a QIP number (authors MUST NOT self-assign QIP numbers).

It is highly recommended that a single QIP contain a single key proposal or new idea. The more focused the QIP, the more successful it tends to be. If in doubt, split your QIP into several well-focused ones.

When the QIP draft is complete, a QIP editor will assign the QIP a number, label it as Standards Track, Informational, or Process, and merge the pull request to the QIPs git repository. The QIP editors will not unreasonably reject a QIP. Reasons for rejecting QIPs include duplication of effort, disregard for formatting rules, being too unfocused or too broad, being technically unsound, not providing proper motivation or addressing backwards compatibility, or not in keeping with the Quai philosophy. For a QIP to be accepted it must meet certain minimum criteria. It must be a clear and complete description of the proposed enhancement. The enhancement must represent a net improvement. The proposed implementation, if applicable, must be solid and must not complicate the protocol unduly.

The QIP author may update the draft as necessary in the git repository. Updates to drafts should also be submitted by the author as pull requests.

Transferring QIP Ownership

It occasionally becomes necessary to transfer ownership of QIPs to a new champion. In general, we'd like to retain the original author as a co-author of the transferred QIP, but that's really up to the original author. A good reason to transfer ownership is because the original author no longer has the time or interest in updating it or following through with the QIP process, or has fallen off the face of the 'net (i.e. is unreachable or not responding to email). A bad reason to transfer ownership is because you don't agree with the direction of the QIP. We try to build consensus around a QIP, but if that's not possible, you can always submit a competing QIP.

If you are interested in assuming ownership of a QIP, send a message asking to take over, addressed to both the original author and the QIP editors. If the original author doesn't respond to email in a timely manner, the QIP editors will make a unilateral decision (it's not like such decisions can't be reversed :).

QIP Editors

The current QIP editors are:

QIP Editor Responsibilities & Workflow

The QIP editors subscribe to the Quai forum. Off-list QIP-related correspondence should be sent (or CC'd) to the QIP editors.

For each new QIP that comes in an editor does the following:

  • Read the QIP to check if it is ready: sound and complete. The ideas must make technical sense, even if they don't seem likely to be accepted.
  • The title should accurately describe the content.
  • The QIP draft must have been sent shared on the Quai forum for discussion.
  • Motivation and backward compatibility (when applicable) must be addressed.
  • The defined Layer header must be correctly assigned for the given specification.
  • Licensing terms must be acceptable for QIPs.
If the QIP isn't ready, the editor will send it back to the author for revision, with specific instructions.

Once the QIP is ready for the repository it should be submitted as a "pull request" to the QIPs git repository where it may get further feedback.

The QIP editor will:

  • Assign a QIP number in the pull request.
  • Merge the pull request when it is ready.
  • List the QIP in README.mediawiki
The QIP editors are intended to fulfill administrative and editorial responsibilities. The QIP editors monitor QIP changes, and update QIP headers as appropriate.

QIP format and structure

Specification

QIPs should be written in mediawiki format.

Each QIP should have the following parts:

  • Preamble -- Headers containing metadata about the QIP (see below).
  • Abstract -- A short (~200 word) description of the technical issue being addressed.
  • Copyright -- The QIP must be explicitly licensed under acceptable copyright terms (see below).
  • Specification -- The technical specification should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current Quai platforms.
  • Motivation -- The motivation is critical for QIPs that want to change the Quai protocol. It should clearly explain why the existing protocol is inadequate to address the problem that the QIP solves.
  • Rationale -- The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work. The rationale should provide evidence of consensus within the community and discuss important objections or concerns raised during discussion.
  • Backwards compatibility -- All QIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The QIP must explain how the author proposes to deal with these incompatibilities.
  • Reference implementation -- The reference implementation must be completed before any QIP is given status "Final", but it need not be completed before the QIP is accepted. It is better to finish the specification and rationale first and reach consensus on it before writing code. The final implementation must include test code and documentation appropriate for the Quai protocol.

QIP header preamble

Each QIP must begin with an RFC 822 style header preamble. The headers must appear in the following order. Headers marked with "*" are optional and are described below. All other headers are required.

  QIP: <QIP number, or "?" before being assigned>
* Layer: <Consensus (soft fork) | Consensus (hard fork) | Peer Services | API/RPC | Applications>
  Title: <QIP title; maximum 44 characters>
  Author: <list of authors' real names and email addrs>
* Discussions-To: <link to forum post or forum>
* Comments-Summary: <summary tone>
  Comments-URI: <links to wiki page for comments>
  Status: <Draft | Active | Proposed | Deferred | Rejected |
           Withdrawn | Final | Replaced | Obsolete>
  Type: <Standards Track | Informational | Process>
  Created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
  License: <abbreviation for approved license(s)>
* License-Code: <abbreviation for code under different approved license(s)>
* Post-History: <link to thread in forum>
* Requires: <QIP number(s)>
* Replaces: <QIP number>
* Superseded-By: <QIP number>

The Layer header (only for Standards Track QIPs) documents which layer of Quai the QIP applies to. See QIP 123 for definitions of the various QIP layers. Activation of this QIP implies activation of QIP 123.

The Author header lists the names and email addresses of all the authors/owners of the QIP. The format of the Author header value must be

  Random J. User <[email protected]>

If there are multiple authors, each should be on a separate line following RFC 2822 continuation line conventions.

While a QIP is in private discussions (usually during the initial Draft phase), a Discussions-To header will indicate the forum or URL where the QIP is being discussed. No Discussions-To header is necessary if the QIP is being discussed privately with the author, or on the quai email forums.

The Type header specifies the type of QIP: Standards Track, Informational, or Process.

The Created header records the date that the QIP was assigned a number, while Post-History is used to record when new versions of the QIP are posted to quai forums. Dates should be in yyyy-mm-dd format, e.g. 2001-08-14. Post-History is permitted to be a link to a specific thread on the Quai forum.

QIPs may have a Requires header, indicating the QIP numbers that this QIP depends on.

QIPs may also have a Superseded-By header indicating that a QIP has been rendered obsolete by a later document; the value is the number of the QIP that replaces the current document. The newer QIP must have a Replaces header containing the number of the QIP that it rendered obsolete.

Auxiliary Files

QIPs may include auxiliary files such as diagrams. Auxiliary files should be included in a subdirectory for that QIP, or must be named QIP-XXXX-Y.ext, where "XXXX" is the QIP number, "Y" is a serial number (starting at 1), and "ext" is replaced by the actual file extension (e.g. "png").

QIP types

There are three kinds of QIP:

  • A Standards Track QIP describes any change that affects most or all Quai implementations, such as a change to the network protocol, a change in block or transaction validity rules, or any change or addition that affects the interoperability of applications using Quai. Standards Track QIPs consist of two parts, a design document and a reference implementation.
  • An Informational QIP describes a Quai design issue, or provides general guidelines or information to the Quai community, but does not propose a new feature. Informational QIPs do not necessarily represent a Quai community consensus or recommendation, so users and implementors are free to ignore Informational QIPs or follow their advice.
  • A Process QIP describes a process surrounding Quai, or proposes a change to (or an event in) a process. Process QIPs are like Standards Track QIPs but apply to areas other than the Quai protocol itself. They may propose an implementation, but not to Quai's codebase; they often require community consensus; unlike Informational QIPs, they are more than recommendations, and users are typically not free to ignore them. Examples include procedures, guidelines, changes to the decision-making process, and changes to the tools or environment used in Quai development. Any meta-QIP is also considered a Process QIP.

QIP status field

Specification

The typical paths of the status of QIPs are as follows:

Champions of a QIP may decide on their own to change the status between Draft, Deferred, or Withdrawn. A QIP editor may also change the status to Deferred when no progress is being made on the QIP.

A QIP may only change status from Draft (or Rejected) to Proposed, when the author deems it is complete, has a working implementation (where applicable), and has community plans to progress it to the Final status.

QIPs should be changed from Draft or Proposed status, to Rejected status, upon request by any person, if they have not made progress in three years. Such a QIP may be changed to Draft status if the champion provides revisions that meaningfully address public criticism of the proposal, or to Proposed status if it meets the criteria required as described in the previous paragraph.

A Proposed QIP may progress to Final only when specific criteria reflecting real-world adoption has occurred. This is different for each QIP depending on the nature of its proposed changes, which will be expanded on below. Evaluation of this status change should be objectively verifiable, and/or be discussed on the forum.

When a Final QIP is no longer relevant, its status may be changed to Replaced or Obsolete (which is equivalent to Replaced). This change must also be objectively verifiable and/or discussed.

A process QIP may change status from Draft to Active when it achieves rough consensus on the forum. Such a proposal is said to have rough consensus if it has been open to discussion on the forum for at least one month, and no person maintains any unaddressed substantiated objections to it. Addressed or obstructive objections may be ignored/overruled by general agreement that they have been sufficiently addressed, but clear reasoning must be given in such circumstances.

Progression to Final status

A hard-fork QIP requires adoption from the entire Quai economy, particularly including those selling desirable goods and services in exchange for quai payments, as well as Quai holders who wish to spend or would spend their quais (including selling for other currencies) differently in the event of such a hard-fork. Adoption must be expressed by de facto usage of the hard-fork in practice (ie, not merely expressing public support, although that is a good step to establish agreement before adoption of the QIP). This economic adoption cannot be established merely by a super-majority, except by literally forcing the minority to accept the hard-fork (whether this is viable or not is outside the scope of this document).

Peer services QIPs should be observed to be adopted by at least 1% of public listening nodes for one month.

API/RPC and application layer QIPs must be implemented by at least two independent and compatible software applications.

Software authors are encouraged to publish summaries of what QIPs their software supports to aid in verification of status changes. Good examples of this at the time of writing this QIP, can be observed in Quai Core's doc/qips.md file as well as Quai Wallet for Android's wallet/README.specs.md file.

These criteria are considered objective ways to observe the de facto adoption of the QIP, and are not to be used as reasons to oppose or reject a QIP. Should a QIP become actually and unambiguously adopted despite not meeting the criteria outlined here, it should still be updated to Final status.

Rationale

QIP comments

Specification

Each QIP should, in its preamble, link to a public wiki page with a summary tone of the comments on that page. Reviewers of the QIP who consider themselves qualified, should post their own comments on this wiki page. The comments page should generally only be used to post final comments for a completed QIP. If a QIP is not yet completed, reviewers should instead post on the applicable forum thread to allow the QIP author(s) to address any concerns or problems pointed out by the review.

Some QIPs receive exposure outside the development community prior to completion, and other QIPs might not be completed at all. To avoid a situation where critical QIP reviews may go unnoticed during this period, reviewers may, at their option, still post their review on the comments page, provided they first post it to the forum and plan to later remove or revise it as applicable based on the completed version. Such revisions should be made by editing the previous review and updating the timestamp. Reviews made prior to the complete version may be removed if they are no longer applicable and have not been updated in a timely manner (eg, within one month).

Pages must be named after the full QIP number (eg, "QIP 0001") and placed in the "Comments" namespace. For example, the link for QIP 1 will be https://github.com/quai/qips/wiki/Comments:QIP-0001 .

Comments posted to this wiki should use the following format:

    <Your opinion> --<Your name>, <Date of posting, as YYYY-MM-DD>

QIPs may also choose to list a second forum for QIP comments, in addition to the QIPs wiki. In this case, the second forum's URI should be listed below the primary wiki's URI.

After some time, the QIP itself may be updated with a summary tone of the comments. Summary tones may be chosen from the following, but this QIP does not intend to cover all possible nuances and other summaries may be used as needed:

  • No comments yet.
  • Unanimously Recommended for implementation
  • Unanimously Discourage for implementation
  • Mostly Recommended for implementation, with some Discouragement
  • Mostly Discouraged for implementation, with some Recommendation
For example, the preamble to QIP 1 might be updated to include the line:

    Comments-Summary: No comments yet.
    Comments-URI: https://github.com/quai/qips/wiki/Comments:QIP-0001
                  https://some-other-wiki.org/QIP_1_Comments

These fields must follow the "Discussions-To" header defined in QIP 1 (if that header is not present, it should follow the position where it would be present; generally this is immediately above the Status header).

To avoid doubt: comments and status are unrelated metrics to judge a QIP, and neither should be directly influencing the other.

Rationale

What is the purpose of QIP comments?

  • Various QIPs have been adopted (the criteria required for "Final" Status) despite being considered generally inadvisable. Some presently regard QIPs as a "good idea" simply by virtue of them being assigned a QIP number. Due to the low barrier of entry for submission of new QIPs, it seems advisable for a way for reviewers to express their opinions on them in a way that is consumable to the public without needing to review the entire development discussion.
Will QIP comments be censored or limited to particular participants/"experts"?

  • Participants should freely refrain from commenting outside of their area of knowledge or expertise. However, comments should not be censored, and participation should be open to the public.

QIP licensing

Specification

New QIPs may be accepted with the following licenses. Each new QIP must identify at least one acceptable license in its preamble. The License header in the preamble must be placed after the Created header. Each license must be referenced by their respective abbreviation given below.

For example, a preamble might include the following License header:

    License: BSD-2-Clause
             GNU-All-Permissive

In this case, the QIP text is fully licensed under both the OSI-approved BSD 2-clause license as well as the GNU All-Permissive License, and anyone may modify and redistribute the text provided they comply with the terms of *either* license. In other words, the license list is an "OR choice", not an "AND also" requirement.

It is also possible to license source code differently from the QIP text. An optional License-Code header is placed after the License header. Again, each license must be referenced by their respective abbreviation given below.

For example, a preamble specifying the optional License-Code header might look like:

    License: BSD-2-Clause
             GNU-All-Permissive
    License-Code: GPL-2.0+

In this case, the code in the QIP is not available under the BSD or All-Permissive licenses, but only under the terms of the GNU General Public License (GPL), version 2 or newer. If the code were to be available under *only* version 2 exactly, the "+" symbol should be removed from the license abbreviation. For a later version (eg, GPL 3.0), you would increase the version number (and retain or remove the "+" depending on intent).

    License-Code: GPL-2.0   # This refers to GPL v2.0 *only*, no later license versions are acceptable.
    License-Code: GPL-2.0+  # This refers to GPL v2.0 *or later*.
    License-Code: GPL-3.0   # This refers to GPL v3.0 *only*, no later license versions are acceptable.
    License-Code: GPL-3.0+  # This refers to GPL v3.0 *or later*.

In the event that the licensing for the text or code is too complicated to express with a simple list of alternatives, the list should instead be replaced with the single term "Complex". In all cases, details of the licensing terms must be provided in the Copyright section of the QIP.

QIPs are not required to be *exclusively* licensed under approved terms, and may also be licensed under unacceptable licenses *in addition to* at least one acceptable license. In this case, only the acceptable license(s) should be listed in the License and License-Code headers.

Recommended licenses

In addition, it is recommended that literal code included in the QIP be dual-licensed under the same license terms as the project it modifies. For example, literal code intended for Quai Core would ideally be dual-licensed under the MIT license terms as well as one of the above with the rest of the QIP text.

Not recommended, but acceptable licenses

Not acceptable licenses

All licenses not explicitly included in the above lists are not acceptable terms for a Quai Improvement Proposal unless a later QIP extends this one to add them.

Rationale

QIP 1 allowed the Open Publication License or releasing into the public domain; was this insufficient?

  • The OPL is generally regarded as obsolete, and not a license suitable for new publications.
  • Many are unfamiliar with the OPL terms, and may just prefer to use the public domain rather than license under uncertain terms.
  • The OPL license terms allowed for the author to prevent publication and derived works, which was widely considered inappropriate for Quai standards.
  • Public domain is not universally recognised as a legitimate action, thus it is inadvisable.
Why are there software licenses included?

  • Some QIPs, especially consensus layer, may include literal code in the QIP itself which may not be available under the exact license terms of the QIP.
  • Despite this, not all software licenses would be acceptable for content included in QIPs.
Why is Public Domain no longer acceptable for new QIPs?

  • In some jurisdictions, public domain is not recognised as a legitimate legal action, leaving the QIP simply copyrighted with no redistribution or modification allowed at all.

Changes from QIP 1

  • Acceptable licenses are entirely rechosen, allowing a wide variety of open licenses, while prohibiting the problematic older choices.
  • Accepted Status has been renamed to Proposed.
  • An implementation is now required (when applicable) before QIPs can proceed to Proposed Status.
  • QIP Comments are newly introduced.
  • The License preamble headers have been added.
  • The Layer header is included from QIP 123.
  • Non-image auxiliary files are permitted in the qip-XXXX subdirectory.
  • Email addresses are now required for authors.
  • The Post-History header may be provided as a link instead of a simple date.
  • Markdown format is no longer permitted for QIPs.
  • The Resolution header has been dropped, as it is not applicable to a decentralised system where no authority exists to make final decisions.

See Also