zips/protocol
Daira Hopwood 9515d73aac Regenerate PDFs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2018-11-14 02:05:26 +00:00
..
Makefile Makefile fixes and improvements. 2018-09-02 09:06:22 +01:00
README.rst Makefile fixes and improvements. 2018-09-02 09:06:22 +01:00
incremental_merkle.odg
incremental_merkle.pdf
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 Jubjub bird image to the title page and cite Carroll references. 2018-06-22 22:08:45 +01:00
key_components.odg
key_components.pdf
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
protocol.pdf Regenerate PDFs. 2018-11-14 02:05:26 +00:00
protocol.tex Fill in another constraint cost. 2018-11-14 02:02:17 +00:00
protocol.ver Regenerate PDFs. 2018-11-14 02:05:26 +00:00
sapling.pdf Regenerate PDFs. 2018-11-14 02:05:26 +00:00
sprout.pdf Regenerate PDFs. 2018-11-14 02:05:26 +00:00
zcash.bib The rest for beta-30 (sorry, I have a flight to catch). 2018-09-02 09:06:22 +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


Building
--------

Use:

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

By default these use ``latexmk``, which does not work on all systems.
Use ``make nolatexmk-pdf`` or ``make nolatexmk-sapling`` if you run into
problems with ``latexmk``, but 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`` or ``make pvcsprout``.
Manual intervention is still needed when there are LaTeX errors.


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

Optionally, you can use `Péter Szabó <https://github.com/pts>`_'s
``pdfsizeopt`` program to optimize the size of the resulting PDF files.

Use:

* ``make optsapling`` to make an optimized version of ``sapling.pdf``;
* ``make optsprout`` to make an optimized version of ``sprout.pdf``;
* ``make optimized`` to make both.

This will probably only work on Linux. The first time one of these
targets is run, it will automatically clone and build the necessary
dependencies (pinned by ``git`` hash) from GitHub.

This gives a size saving of about 40-50%.


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 both PDFs.

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

See `<https://github.com/zcash/zips/issues/127>`_ for limitations of
this conversion.