zips/protocol
Daira Hopwood fa484ecbeb Regenerate PDFs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-23 15:07:29 +01:00
..
Makefile Changes needed to support TeXLive 2019. 2019-07-11 17:57:22 +01:00
README.rst Changes needed to support TeXLive 2019. 2019-07-11 17:57:22 +01:00
blossom.pdf Regenerate PDFs. 2019-07-23 15:07:29 +01:00
incremental_merkle.odg Change coin commitments in Merkle tree diagram back to cm. 2016-02-11 18:37:28 +00:00
incremental_merkle.pdf Change coin commitments in Merkle tree diagram back to cm. 2016-02-11 18:37:28 +00:00
incremental_merkle.png Cosmetics. 2018-03-18 21:00:16 +00:00
incremental_merkle.svg Regenerate PDFs. 2017-12-02 02:11:41 +00:00
jubjub.png Add macros and Makefile support for building the Blossom specification. 2019-02-22 13:49:08 +00:00
key_components.odg Remove viewing keys (except for sk_enc) for now. 2016-03-13 02:16:30 +00:00
key_components.pdf Cosmetics. 2016-09-04 04:33:45 +01:00
key_components.png Cosmetics. 2018-03-18 21:00:16 +00:00
key_components.svg Separate viewing keys (a_pk, sk_enc) from receiving keys sk_enc. 2017-12-16 23:40:34 +00:00
key_components_sapling.png Sapling consensus changes. 2018-04-20 04:22:06 +01:00
key_components_sapling.svg Sapling consensus changes. 2018-04-20 04:22:06 +01:00
latexmkrc Protocol spec: Initial index support. 2019-07-08 22:42:16 +01:00
mymakeindex.sh Protocol spec: Initial index support. 2019-07-08 22:42:16 +01:00
protocol.pdf Regenerate PDFs. 2019-07-23 15:07:29 +01:00
protocol.tex Protocol spec: set date of Change History entry. Also fix a typo. 2019-07-23 15:04:31 +01:00
protocol.ver Regenerate PDFs. 2019-07-23 15:07:29 +01:00
sprout.pdf Regenerate PDFs. 2019-07-23 15:07:29 +01:00
zcash.bib Protocol spec: resolve bibliography warnings. 2019-06-18 22:33:10 +01:00

README.rst

==============================
 Zcash Protocol Specification
==============================

Build dependencies on Debian-based systems include, at least:

.. code::

   apt-get install texlive texlive-science texlive-fonts-extra \
     texlive-generic-recommended texlive-bibtex-extra biber latexmk perl


Building
--------

Use:

* ``make sapling`` to make the specification for the Overwinter and
  Sapling upgrades (``protocol.pdf``);
* ``make blossom`` to make the draft specification for the Blossom upgrade
  (``blossom.pdf``);
* ``make sprout`` to make a version of the specification that does not
  include Overwinter or Sapling.

``make all`` is equivalent to ``make sapling blossom sprout``.

By default these use ``latexmk``. If you have trouble getting ``latexmk`` to
work, you can instead use ``make nolatexmk-sapling``, etc. That is not the
preferred way of building because it may not run ``pdflatex`` enough times.

There is also support for using the incremental (``-pvc``) mode of
``latexmk`` to automatically rebuild when changes in the source files are
detected: ``make pvcsapling``, ``make pvcblossom``, or ``make pvcsprout``.
Manual intervention is still needed when there are LaTeX errors.


Optimizing PDF size
-------------------

Optionally, you can use Ghostscript to attempt to optimize the size of the
resulting PDF files. Note that this is not recommended with recent versions
of TeXLive that produce smaller PDFs in any case, since then it may increase
the size. (Debian Buster includes TeXLive 2019.)

For this option you will need to ensure the `ghostscript`, `extractpdfmark`,
and `awk` packages are installed. Then use:

* ``make optsapling`` to make an optimized version of ``protocol.pdf``;
* ``make optblossom`` to make an optimized version of ``blossom.pdf``;
* ``make optsprout`` to make an optimized version of ``sprout.pdf``;
* ``make optimized`` to make all optimized PDFs.


Alternative TeX engines
-----------------------

There is experimental support for building the specification using LuaTeX
or XeTeX; see the comments at the top of the `Makefile`. However, this will
`currently produce poor output <https://github.com/zcash/zips/issues/249>`_.
A warning is included below the Abstract to indicate this.


Converting to HTML
------------------

To convert to HTML you will first need to install ``pdf2htmlEX``. On Debian:

.. code::

   apt-get install pdf2htmlex

Then use ``make html`` (or ``make optimized html``) to convert all PDFs.

The results are placed in the ``html`` directory at ``html/sapling.html``,
``html/blossom.html``, and ``html/sprout.html``.

See `<https://github.com/zcash/zips/issues/127>`_ for limitations of
this conversion. In particular, the resulting files are very large (over
7 MiB for the Sapling spec), and external linking into the document does
not work correctly.