Skip to content

Latest commit

 

History

History
310 lines (199 loc) · 23.5 KB

wip-0001.md

File metadata and controls

310 lines (199 loc) · 23.5 KB
  WIP: WIP-0001
  Title: WIP process
  Author: Adán SDPC 
  Comments-Summary: No comments yet.
  Comments-URI: https://github.com/witnet/wips/wiki/Comments:WIP-0001
  Status: Final
  Type: Process
  Created: 2018-02-11
  License: BSD-2-Clause

Abstract

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

We intend WIPs 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 Witnet. The WIP author is responsible for building consensus within the community and documenting dissenting opinions.

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

Copyright

This WIP is dual-licensed under the BSD 2-clause license.

WIP workflow

The WIP process begins with a new idea for Witnet. Each potential WIP must have a champion -- someone who writes the WIP using the style and format described below, shepherds the discussions in the appropriate forums, and attempts to build community consensus around the idea. The WIP champion (a.k.a. Author) should first attempt to ascertain whether the idea is WIP-able. Small enhancements or patches to a particular piece of software often don't require standardisation between multiple projects; these don't need a WIP 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 Witnet 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 Witnet community Discord server.

Vetting an idea publicly before going as far as writing a WIP is meant to save both the potential author and the wider community time. Asking the Witnet 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 Witnet is used.

Once the champion has asked the Witnet community as to whether an idea has any chance of acceptance, a draft WIP should be presented to the Witnet community Discord chat server. This gives the author a chance to flesh out the draft WIP 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 WIPs git repository as a pull request. This draft must be written in WIP style as described below, and named with an alias such as "WIP-champion-feature" until the editor has assigned it a WIP number (authors MUST NOT self-assign WIP numbers).

WIP authors are responsible for collecting community feedback on both the initial idea and the WIP before submitting it for review. However, wherever possible, long open-ended discussions should be avoided. Strategies to keep the discussions efficient include: setting up a separate chat room or channel for the topic, having the WIP author accept private comments in the early design phases, setting up a wiki page or git repository, etc. WIP authors should use their discretion here.

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

When the WIP draft is complete, the WIP editor will assign the WIP a number, label it as Standards Track, Informational, or Process, and merge the pull request to the WIPs git repository. The WIP editor will not unreasonably reject a WIP. Reasons for rejecting WIPs 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 Witnet philosophy. For a WIP 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 WIP 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 WIP Ownership

It occasionally becomes necessary to transfer ownership of WIPs to a new champion. In general, we'd like to retain the original author as a co-author of the transferred WIP, 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 WIP 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 WIP. We try to build consensus around a WIP, but if that's not possible, you can always submit a competing WIP.

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

WIP Editors

The current WIP editor is Adán SDPC from Witnet Foundation, who can be contacted via email.

WIP Editor Responsibilities & Workflow

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

  • Read the WIP 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 WIP draft must have been sent to the Witnet development community channels 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 WIPs.

If the WIP isn't ready, the editor will send it back to the author for revision, with specific instructions.

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

The WIP editor will:

  • Assign a WIP number in the pull request.

  • Merge the pull request when it is ready.

  • List the WIP in README.md.

The WIP editors are intended to fulfill administrative and editorial responsibilities. The WIP editors monitor WIP changes, and update WIP headers as appropriate.

WIP format and structure

Specification

WIPs should be written in Markdown format.

Each WIP should have the following parts:

  • Preamble -- Headers containing metadata about the WIP ([see below](#WIP header preamble)).

  • Abstract -- A short (~200 word) description of the technical issue being addressed.

  • Copyright -- The WIP must be explicitly licensed under acceptable copyright terms ([see below](#WIP licensing)).

  • 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 Witnet platforms.

  • Motivation -- The motivation is critical for WIPs that want to change the Witnet protocol. It should clearly explain why the existing protocol is inadequate to address the problem that the WIP 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 WIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The WIP must explain how the author proposes to deal with these incompatibilities.

  • Reference implementation -- The reference implementation must be completed before any WIP is given status "Final", but it need not be completed before the WIP 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 Witnet protocol.

WIP header preamble

Each WIP 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.

  WIP: <WIP number, or "?" before being assigned>
* Layer: <Consensus (soft fork) | Consensus (hard fork) | Peer Services | API/RPC | Applications>
  Title: <WIP title; maximum 44 characters>
  Author: <list of authors' real names and email addrs>
* Discussions-To: <email address>
* 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: <dates of postings to Witnet community channels, or link to thread in such channels>
* Requires: <WIP number(s)>
* Replaces: <WIP number>
* Superseded-By: <WIP number>

The Layer header (only for Standards Track WIPs) documents which layer of Witnet the WIP applies to.

The Author header lists the names and email addresses of all the authors/owners of the WIP. 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 WIP is in private discussions (usually during the initial Draft phase), a Discussions-To header will indicate the community discussion channels or URL where the WIP is being discussed. No Discussions-To header is necessary if the WIP is being discussed privately with the author, or on the Witnet community Discord server.

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

The Created header records the date that the WIP was assigned a number, while Post-History is used to record when new versions of the WIP are posted to Witnet community channels. 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 in a community channel.

WIPs may have a Requires header, indicating the WIP numbers that this WIP depends on.

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

Auxiliary Files

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

WIP types

There are three kinds of WIP:

  • A Standards Track WIP describes any change that affects most or all Witnet 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 Witnet. Standards Track WIPs consist of two parts, a design document and a reference implementation.
  • An Informational WIP describes a Witnet design issue, or provides general guidelines or information to the Witnet community, but does not propose a new feature. Informational WIPs do not necessarily represent a Witnet community consensus or recommendation, so users and implementors are free to ignore Informational WIPs or follow their advice.
  • A Process WIP describes a process surrounding Witnet, or proposes a change to (or an event in) a process. Process WIPs are like Standards Track WIPs but apply to areas other than the Witnet protocol itself. They may propose an implementation, but not to Witnet's codebase; they often require community consensus; unlike Informational WIPs, 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 Witnet development. Any meta-WIP is also considered a Process WIP.

WIP status field

Specification

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

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

A WIP 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.

WIPs 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 WIP 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.

An Proposed WIP may progress to Final only when specific criteria reflecting real-world adoption has occurred. This is different for each WIP 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 appropriate development community channel.

When a Final WIP 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 WIP may change status from Draft to Active when it achieves rough consensus on the community discussion channels. Such a proposal is said to have rough consensus if it has been open to discussion on the appropriate development community channels 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.

WIP comments

Specification

Each WIP should, in its preamble, link to a public wiki page with a summary tone of the comments on that page. Reviewers of the WIP 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 WIP. If a WIP is not yet completed, reviewers should instead post on the applicable development community channel thread to allow the WIP author(s) to address any concerns or problems pointed out by the review.

Some WIPs receive exposure outside the development community prior to completion, and other WIPs might not be completed at all. To avoid a situation where critical WIP 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 community discussion channels 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).

After some time, the WIP itself may be updated with a summary tone of the comments. Summary tones may be chosen from the following, but this WIP 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 WIP 1 might be updated to include the line:

Comments-Summary: No comments yet.
Comments-URI: https://github.com/Witnet/WIPs/wiki/Comments:WIP-0001
              https://some-other-wiki.org/WIP_1_Comments

These fields must follow the "Discussions-To" header defined in WIP 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 WIP, and neither should be directly influencing the other.

Rationale

What is the purpose of WIP comments?

  • Various WIPs have been adopted (the criteria required for "Final" Status) despite being considered generally inadvisable. Some presently regard WIPs as a "good idea" simply by virtue of them being assigned a WIP number. Due to the low barrier of entry for submission of new WIPs, 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 WIP 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.

WIP licensing

Specification

New WIPs may be accepted with the following licenses. Each new WIP 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 WIP 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 WIP text. A 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 WIP 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 WIP.

WIPs 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 WIP be dual-licensed under the same license terms as the project it modifies. For example, literal code intended for Witnet Core would ideally be dual-licensed under the MIT license terms as well as one of the above with the rest of the WIP text.

Not recommended, but acceptable licenses

Not acceptable licenses

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

Rationale

Why are there software licenses included?

  • Some WIPs, especially consensus layer, may include literal code in the WIP itself which may not be available under the exact license terms of the WIP.
  • Despite this, not all software licenses would be acceptable for content included in WIPs.

Why is Public Domain not acceptable for WIPs?

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

See Also