From b1a10b077db6011f14ff923b644fb755d20a0914 Mon Sep 17 00:00:00 2001 From: dantaik <99078276+dantaik@users.noreply.github.com> Date: Thu, 17 Nov 2022 23:43:23 +0800 Subject: [PATCH] fix(whitepaper): fix whitepaper.yml (#281) --- .github/workflows/whitepaper.yml | 3 ++- .gitignore | 2 ++ packages/whitepaper/.gitignore | 4 +++- packages/whitepaper/build.sh | 11 +++++++---- ...aikoEcosystemFin2.png => taikoEcosystemFin2.png} | Bin packages/whitepaper/main.tex | 8 +++++--- 6 files changed, 19 insertions(+), 9 deletions(-) rename packages/whitepaper/fig/{TaikoEcosystemFin2.png => taikoEcosystemFin2.png} (100%) diff --git a/.github/workflows/whitepaper.yml b/.github/workflows/whitepaper.yml index ed186b7b4af..41351fb14e6 100644 --- a/.github/workflows/whitepaper.yml +++ b/.github/workflows/whitepaper.yml @@ -25,11 +25,12 @@ jobs: uses: xu-cheng/latex-action@v2 with: working_directory: ./packages/whitepaper + pre_compile: pdflatex -interaction=errorstopmode -halt-on-error main.tex && (bibtex main || true) root_file: main.tex - name: Rename working-directory: ./packages/whitepaper - run: mkdir -p build && mv main.pdf build/taiko-whitepaper.pdf + run: rm -rf build/ && mkdir build && mv main.pdf build/taiko-whitepaper.pdf - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 diff --git a/.gitignore b/.gitignore index 36727347951..6c624e2e1f7 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,5 @@ dist # vscode .vscode/ + +.pdf \ No newline at end of file diff --git a/packages/whitepaper/.gitignore b/packages/whitepaper/.gitignore index d16386367f7..e25ec5de97b 100644 --- a/packages/whitepaper/.gitignore +++ b/packages/whitepaper/.gitignore @@ -1 +1,3 @@ -build/ \ No newline at end of file +build/ +*.pdf +temp.* \ No newline at end of file diff --git a/packages/whitepaper/build.sh b/packages/whitepaper/build.sh index 4faed137878..deae0de8ab3 100755 --- a/packages/whitepaper/build.sh +++ b/packages/whitepaper/build.sh @@ -13,7 +13,10 @@ then exit 1 fi -rm -rf build -mkdir -p build -pdflatex -output-directory=build -interaction=errorstopmode -halt-on-error main.tex -mv build/main.pdf build/taiko-whitepaper.pdf \ No newline at end of file +rm -rf temp.* +rm -rf main.pdf +cp main.tex temp.tex +pdflatex -interaction=errorstopmode -halt-on-error temp.tex && (bibtex temp || true) +pdflatex -interaction=errorstopmode -halt-on-error temp.tex +mv temp.pdf main.pdf +rm -rf temp.* diff --git a/packages/whitepaper/fig/TaikoEcosystemFin2.png b/packages/whitepaper/fig/taikoEcosystemFin2.png similarity index 100% rename from packages/whitepaper/fig/TaikoEcosystemFin2.png rename to packages/whitepaper/fig/taikoEcosystemFin2.png diff --git a/packages/whitepaper/main.tex b/packages/whitepaper/main.tex index 2d23ca6a3f2..7f028dae1d9 100644 --- a/packages/whitepaper/main.tex +++ b/packages/whitepaper/main.tex @@ -10,6 +10,7 @@ \usepackage[a4paper,width=170mm,top=18mm,bottom=22mm,includeheadfoot]{geometry} \usepackage{booktabs} \usepackage{nicefrac} +\usepackage{datetime2} \usepackage{array} \usepackage{verbatim} \usepackage{caption} @@ -63,12 +64,12 @@ \newcommand*\eg{e.g.\@\xspace} \newcommand*\Eg{e.g.\@\xspace} \newcommand*\ie{i.e.\@\xspace} -\newcommand{\thedate}{October 6, 2022} +\date{\today} %\renewcommand{\itemhook}{\setlength{\topsep}{0pt} \setlength{\itemsep}{0pt}\setlength{\leftmargin}{15pt}} \title[TAIKO: A Type-1 Ethereum ZK-Rollup\\ \smaller -\textbf{{1.2.0}}]{TAIKO: A Type-1 Ethereum ZK-Rollup \\ \smaller \textbf{{1.2.0 (\thedate)}}} +\textbf{{1.2.1}}]{TAIKO: A Type-1 Ethereum ZK-Rollup \\ \smaller \textbf{{1.2.1 (\today)}}} \author{Taiko Labs (info@taiko.xyz)} @@ -410,7 +411,8 @@ \section{Cross-Chain Communication}\label{sec:bridges} On Ethereum, the \underline{TaikoL1} contract persists the height and hash of the L2 blocks. On Taiko, the anchor function in the \emph{\underline{TaikoL2}} contract is used to persist the height and block hash of the previous Ethereum block (from when the L2 block was proposed), as well as the previous L2 block hash (which allows L2 smart contracts to easily fetch the full history of L2 block hashes). -\subsection{Ether on L2}\label{eth-bridge} +\subsection{Ether on L2} +\label{eth-bridge} The Taiko Ether bridge will allow users to bridge Ether from and to Taiko. $2^{128}$ Ether is minted to a special vault contract called the \underline{TokenVault} in the genesis block. When a user deposits Ether to L2, the same amount of Ether will be transferred from the \underline{TokenVault} to the user on L2. When a user withdraws some Ether from L2, Ether on L2 will be transferred back to \underline{TokenVault} (no L2 Ether will ever be burnt). A small amount of Ether will also be minted to a few EOAs to bootstrap the L2 network, otherwise nobody would be able to transact. To make sure the Ether bridge is solvent, a corresponding amount of Ether will be deposited to the Ether bridge on L1.