Skip to content

Commit

Permalink
Merge pull request #963 from daira/use-multimarkdown
Browse files Browse the repository at this point in the history
Use MultiMarkdown
  • Loading branch information
conradoplg authored Nov 29, 2024
2 parents f3d5eb0 + 2bbe652 commit 998a97f
Show file tree
Hide file tree
Showing 17 changed files with 1,762 additions and 1,688 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
.zipfilelist.*
.draftfilelist.*

MultiMarkdown-6

protocol/aux/
protocol/protocol.ver
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM debian:latest

RUN apt-get update
RUN apt-get install -y \
gawk \
perl \
sed \
git \
cmake \
python3 \
python3-pip \
pandoc \
Expand All @@ -18,7 +18,12 @@ RUN apt-get install -y \
texlive-bibtex-extra

RUN rm /usr/lib/python3.11/EXTERNALLY-MANAGED
RUN pip install rst2html5
RUN pip install 'docutils==0.21.2' 'rst2html5==2.0.1'

RUN git config --global --add safe.directory /zips

# Use a fork so that we're running pinned code.
RUN git clone -b develop https://github.com/Electric-Coin-Company/MultiMarkdown-6 && cd MultiMarkdown-6 && make release && cd build && make && make install

ENV PATH=${PATH}:/root/.local/bin

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies: see zip-guide.rst and protocol/README.rst
# Dependencies: see zips/zip-guide.rst and protocol/README.rst

MARKDOWN_OPTION?=--pandoc
MARKDOWN_OPTION?=--mmd

.PHONY: all-zips all tag-release protocol all-protocol discard
all-zips: .Makefile.uptodate
Expand Down
4 changes: 2 additions & 2 deletions protocol/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Build dependencies on Debian-based systems include, at least:

.. code::

apt install python3-pip pandoc perl sed perl \
apt install python3-pip perl sed cmake \
texlive texlive-science texlive-fonts-extra texlive-bibtex-extra biber latexmk

Prior to Bullseye you may also need the ``awk`` and ``texlive-generic-recommended``
Expand All @@ -16,7 +16,7 @@ For link checking, you will also need the following Python packages:

.. code::

pip3 install docutils==0.19 rst2html5 certifi PyPDF2
pip3 install 'docutils==0.21.2' 'rst2html5==2.0.1' certifi PyPDF2


Building
Expand Down
3 changes: 2 additions & 1 deletion render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ cat <(
s|<a href="rendered/|<a href="|g;
s|<a \(class=[^ ]* \)*href="zips/|<a \1href="|g' \
| perl -p0e \
's|<section id="([^"]*)">\s*.?\s*<h([1-9])>([^<]*(?:<code>[^<]*</code>[^<]*)?)</h([1-9])>|<section id="\1"><h\2><span class="section-heading">\3</span><span class="section-anchor"> <a rel="bookmark" href="#\1"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h\4>|g' \
's|<section id="([^"]*)">\s*.?\s*<h([1-9])>([^<]*(?:<code>[^<]*</code>[^<]*)?)</h([1-9])>|<section id="\1"><h\2><span class="section-heading">\3</span><span class="section-anchor"> <a rel="bookmark" href="#\1"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h\4>|g;
s|<h([1-9]) id="([^"]*)">([^<]*(?:<code>[^<]*</code>[^<]*)?)</h([1-9])>|<h\1 id="\2"><span class="section-heading">\3</span><span class="section-anchor"> <a rel="bookmark" href="#\2"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h\4>|g;' \
> "${outputfile}"
6 changes: 3 additions & 3 deletions rendered/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ span.section-heading:hover + span {
opacity: 1;
}

a.footnote_reference::before, a.footnote-ref::before {
a.footnote_reference::before, a.footnote-ref::before, a.footnote::before {
content: "[";
}

a.footnote_reference::after, a.footnote-ref::after {
a.footnote_reference::after, a.footnote-ref::after, a.footnote::after {
content: "]";
}

Expand Down Expand Up @@ -369,7 +369,7 @@ a.footnote_reference::after, a.footnote-ref::after {
/* }}} rst-specific */

/* {{{ md-specific */
a.footnote-ref sup {
a.footnote-ref sup, a.footnote sup {
vertical-align: baseline;
font-size: 100%;
}
Expand Down
1,186 changes: 594 additions & 592 deletions rendered/zip-0231.html

Large diffs are not rendered by default.

412 changes: 209 additions & 203 deletions rendered/zip-0233.html

Large diffs are not rendered by default.

515 changes: 265 additions & 250 deletions rendered/zip-0234.html

Large diffs are not rendered by default.

382 changes: 191 additions & 191 deletions rendered/zip-0235.html

Large diffs are not rendered by default.

223 changes: 102 additions & 121 deletions rendered/zip-0253.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,139 +13,120 @@
Category: Consensus / Network
Created: 2024-07-17
License: MIT
Discussions-To: &lt;<a href="https://github.com/zcash/zips/issues/806">https://github.com/zcash/zips/issues/806</a>&gt;</code></pre>
<h1 id="terminology">Terminology</h1>
<p>The key word “MUST” in this document are to be interpreted as
described in BCP 14 <a href="#fn1" class="footnote-ref" id="fnref1"
role="doc-noteref"><sup>1</sup></a> when, and only when, they appear in
all capitals.</p>
<p>The term “network upgrade” in this document is to be interpreted as
described in ZIP 200 <a href="#fn2" class="footnote-ref" id="fnref2"
role="doc-noteref"><sup>2</sup></a>.</p>
<p>The terms “Testnet” and “Mainnet” are to be interpreted as described
in section 3.12 of the Zcash Protocol Specification <a href="#fn3"
class="footnote-ref" id="fnref3"
role="doc-noteref"><sup>3</sup></a>.</p>
<h1 id="abstract">Abstract</h1>
Discussions-To: &lt;<a href="https://github.com/zcash/zips/issues/806">https://github.com/zcash/zips/issues/806</a>&gt;
</code></pre>

<h1 id="terminology"><span class="section-heading">Terminology</span><span class="section-anchor"> <a rel="bookmark" href="#terminology"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h1>

<p>The key word &#8220;MUST&#8221; in this document are to be interpreted as described in
BCP 14 <a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a> when, and only when, they appear in all capitals.</p>

<p>The term &#8220;network upgrade&#8221; in this document is to be interpreted as described in ZIP 200 <a href="#fn:2" id="fnref:2" title="see footnote" class="footnote"><sup>2</sup></a>.</p>

<p>The terms &#8220;Testnet&#8221; and &#8220;Mainnet&#8221; are to be interpreted as described in
section 3.12 of the Zcash Protocol Specification <a href="#fn:3" id="fnref:3" title="see footnote" class="footnote"><sup>3</sup></a>.</p>

<h1 id="abstract"><span class="section-heading">Abstract</span><span class="section-anchor"> <a rel="bookmark" href="#abstract"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h1>

<p>This proposal defines the deployment of the NU6 network upgrade.</p>
<h1 id="specification">Specification</h1>
<h2 id="nu6-deployment">NU6 deployment</h2>
<p>The primary sources of information about NU6 consensus protocol
changes are:</p>

<h1 id="specification"><span class="section-heading">Specification</span><span class="section-anchor"> <a rel="bookmark" href="#specification"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h1>

<h2 id="nu6deployment"><span class="section-heading">NU6 deployment</span><span class="section-anchor"> <a rel="bookmark" href="#nu6deployment"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h2>

<p>The primary sources of information about NU6 consensus protocol changes are:</p>

<ul>
<li>The Zcash Protocol Specification <a href="#fn4" class="footnote-ref"
id="fnref4" role="doc-noteref"><sup>4</sup></a>.</li>
<li>ZIP 200: Network Upgrade Mechanism <a href="#fn5"
class="footnote-ref" id="fnref5"
role="doc-noteref"><sup>5</sup></a>.</li>
<li>ZIP 236: Blocks should balance exactly <a href="#fn6"
class="footnote-ref" id="fnref6"
role="doc-noteref"><sup>6</sup></a>.</li>
<li>ZIP 1015: Block Reward Allocation for Non-Direct Development Funding
<a href="#fn7" class="footnote-ref" id="fnref7"
role="doc-noteref"><sup>7</sup></a>.</li>
<li>ZIP 2001: Lockbox Funding Streams <a href="#fn8"
class="footnote-ref" id="fnref8"
role="doc-noteref"><sup>8</sup></a>.</li>
<li>The Zcash Protocol Specification <a href="#fn:4" id="fnref:4" title="see footnote" class="footnote"><sup>4</sup></a>.</li>
<li>ZIP 200: Network Upgrade Mechanism <a href="#fn:2" title="see footnote" class="footnote"><sup>2</sup></a>.</li>
<li>ZIP 236: Blocks should balance exactly <a href="#fn:5" id="fnref:5" title="see footnote" class="footnote"><sup>5</sup></a>.</li>
<li>ZIP 1015: Block Reward Allocation for Non-Direct Development Funding <a href="#fn:6" id="fnref:6" title="see footnote" class="footnote"><sup>6</sup></a>.</li>
<li>ZIP 2001: Lockbox Funding Streams <a href="#fn:7" id="fnref:7" title="see footnote" class="footnote"><sup>7</sup></a>.</li>
</ul>
<p>The network handshake and peer management mechanisms defined in ZIP
201 <a href="#fn9" class="footnote-ref" id="fnref9"
role="doc-noteref"><sup>9</sup></a> also apply to this upgrade.</p>
<p>The following ZIPs have been updated in varying degrees to take into
account NU6:</p>

<p>The network handshake and peer management mechanisms defined in ZIP 201 <a href="#fn:8" id="fnref:8" title="see footnote" class="footnote"><sup>8</sup></a> also apply to this upgrade.</p>

<p>The following ZIPs have been updated in varying degrees to take into account NU6:</p>

<ul>
<li>ZIP 207: Funding Streams <a href="#fn10" class="footnote-ref"
id="fnref10" role="doc-noteref"><sup>10</sup></a>.</li>
<li>ZIP 214: Consensus rules for a Zcash Development Fund <a
href="#fn11" class="footnote-ref" id="fnref11"
role="doc-noteref"><sup>11</sup></a>.</li>
<li>ZIP 207: Funding Streams <a href="#fn:9" id="fnref:9" title="see footnote" class="footnote"><sup>9</sup></a>.</li>
<li>ZIP 214: Consensus rules for a Zcash Development Fund <a href="#fn:10" id="fnref:10" title="see footnote" class="footnote"><sup>10</sup></a>.</li>
</ul>
<p>The following network upgrade constants <a href="#fn12"
class="footnote-ref" id="fnref12" role="doc-noteref"><sup>12</sup></a>
are defined for the NU6 upgrade:</p>

<p>The following network upgrade constants <a href="#fn:2" title="see footnote" class="footnote"><sup>2</sup></a> are defined for the NU6 upgrade:</p>

<dl>
<dt>CONSENSUS_BRANCH_ID</dt>
<dd>
<code>0xC8E71055</code>
</dd>
<dd><code>0xC8E71055</code></dd>

<dt>ACTIVATION_HEIGHT (NU6)</dt>
<dd>
Testnet: 2976000
</dd>
<dd>
Mainnet: 2726400
</dd>
<dd>Testnet: 2976000</dd>

<dd>Mainnet: 2726400</dd>

<dt>MIN_NETWORK_PROTOCOL_VERSION (NU6)</dt>
<dd>
Testnet: <code>170110</code>
</dd>
<dd>
Mainnet: <code>170120</code>
</dd>
<dd>Testnet: <code>170110</code></dd>

<dd>Mainnet: <code>170120</code></dd>
</dl>
<p>For each network (Testnet and Mainnet), nodes compatible with NU6
activation on that network MUST advertise a network protocol version
that is greater than or equal to the MIN_NETWORK_PROTOCOL_VERSION (NU6)
for that activation.</p>
<h1 id="backward-compatibility">Backward compatibility</h1>
<p>Prior to the network upgrade activating on each network, NU6 and
pre-NU6 nodes are compatible and can connect to each other. However, NU6
nodes will have a preference for connecting to other NU6 nodes, so
pre-NU6 nodes will gradually be disconnected in the run up to
activation.</p>
<p>Once the network upgrades, even though pre-NU6 nodes can still accept
the numerically larger protocol version used by NU6 as being valid, NU6
nodes will always disconnect peers using lower protocol versions.</p>
<p>NU6 does not define a new transaction version or impose a new minimum
transaction version. NU6 transactions are therefore in the same v4 or v5
formats as NU5 transactions. This does not imply that transactions are
valid across the NU6 activation, since signatures MUST use the
appropriate consensus branch ID.</p>
<h1 id="references">References</h1>
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">

<p>For each network (Testnet and Mainnet), nodes compatible with NU6 activation on that network MUST advertise a network protocol version that is greater than or equal to the MIN_NETWORK_PROTOCOL_VERSION (NU6) for that activation.</p>

<h1 id="backwardcompatibility"><span class="section-heading">Backward compatibility</span><span class="section-anchor"> <a rel="bookmark" href="#backwardcompatibility"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h1>

<p>Prior to the network upgrade activating on each network, NU6 and pre-NU6 nodes are compatible and can connect to each other. However, NU6 nodes will have a preference for connecting to other NU6 nodes, so pre-NU6 nodes will gradually be disconnected in the run up to activation.</p>

<p>Once the network upgrades, even though pre-NU6 nodes can still accept the numerically larger protocol version used by NU6 as being valid, NU6 nodes will always disconnect peers using lower protocol versions.</p>

<p>NU6 does not define a new transaction version or impose a new minimum transaction version. NU6 transactions are therefore in the same v4 or v5 formats as NU5 transactions. This does not imply that transactions are valid across the NU6 activation, since signatures MUST use the appropriate consensus branch ID.</p>

<h1 id="references"><span class="section-heading">References</span><span class="section-anchor"> <a rel="bookmark" href="#references"><img width="24" height="24" class="section-anchor" src="assets/images/section-anchor.png" alt=""></a></span></h1>

<div class="footnotes">
<hr />
<ol>
<li id="fn1"><p><a
href="https://www.rfc-editor.org/info/bcp14">Information on BCP 14 —
“RFC 2119: Key words for use in RFCs to Indicate Requirement Levels” and
“RFC 8174: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key
Words”</a><a href="#fnref1" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn2"><p><a href="zip-0200">ZIP 200: Network Upgrade
Mechanism</a><a href="#fnref2" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn3"><p><a href="protocol/protocol.pdf#networks">Zcash Protocol
Specification, Version 2024.5.1 [NU6]. Section 3.12: Mainnet and
Testnet</a><a href="#fnref3" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn4"><p><a href="protocol/protocol.pdf">Zcash Protocol
Specification, Version 2024.5.1 or later</a><a href="#fnref4"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5"><p><a href="zip-0200">ZIP 200: Network Upgrade
Mechanism</a><a href="#fnref5" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn6"><p><a href="zip-0236">ZIP 236: Blocks should balance
exactly</a><a href="#fnref6" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn7"><p><a href="zip-1015">ZIP 1015: Block Reward Allocation
for Non-Direct Development Funding</a><a href="#fnref7"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn8"><p><a href="zip-2001">ZIP 2001: Lockbox Funding
Streams</a><a href="#fnref8" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn9"><p><a href="zip-0201">ZIP 201: Network Peer Management
for Overwinter</a><a href="#fnref9" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn10"><p><a href="zip-0207">ZIP 207: Funding Streams</a><a
href="#fnref10" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn11"><p><a href="zip-0214">ZIP 214: Consensus rules for a
Zcash Development Fund</a><a href="#fnref11" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn12"><p><a href="zip-0200">ZIP 200: Network Upgrade
Mechanism</a><a href="#fnref12" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>

<li id="fn:1">
<p><a href="https://www.rfc-editor.org/info/bcp14">Information on BCP 14 — &#8220;RFC 2119: Key words for use in RFCs to Indicate Requirement Levels&#8221; and &#8220;RFC 8174: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words&#8221;</a> <a href="#fnref:1" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:2">
<p><a href="zip-0200">ZIP 200: Network Upgrade Mechanism</a> <a href="#fnref:2" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:3">
<p><a href="protocol/protocol.pdf#networks">Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.12: Mainnet and Testnet</a> <a href="#fnref:3" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:4">
<p><a href="protocol/protocol.pdf">Zcash Protocol Specification, Version 2024.5.1 or later</a> <a href="#fnref:4" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:5">
<p><a href="zip-0236">ZIP 236: Blocks should balance exactly</a> <a href="#fnref:5" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:6">
<p><a href="zip-1015">ZIP 1015: Block Reward Allocation for Non-Direct Development Funding</a> <a href="#fnref:6" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:7">
<p><a href="zip-2001">ZIP 2001: Lockbox Funding Streams</a> <a href="#fnref:7" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:8">
<p><a href="zip-0201">ZIP 201: Network Peer Management for Overwinter</a> <a href="#fnref:8" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:9">
<p><a href="zip-0207">ZIP 207: Funding Streams</a> <a href="#fnref:9" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

<li id="fn:10">
<p><a href="zip-0214">ZIP 214: Consensus rules for a Zcash Development Fund</a> <a href="#fnref:10" title="return to body" class="reversefootnote">&#160;&#8617;&#xfe0e;</a></p>
</li>

</ol>
</section>
</div>
</body>
</html>
Loading

0 comments on commit 998a97f

Please sign in to comment.