├── .gitignore ├── .travis.yml ├── BRANCHES.md ├── Biblio.bib ├── IEEEbib.bst ├── JS.tex ├── LICENCE.md ├── Paper.reflib ├── Paper.tex ├── README.md ├── Wire.tex ├── build.sh ├── cancel.sty ├── deploykey.enc └── travis_deploy.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Paper.aux 3 | Paper.bbl 4 | Paper.blg 5 | Paper.log 6 | Paper.out 7 | Paper.pdf 8 | Version.tex 9 | 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | before_install: 3 | - sudo apt-get -qq update 4 | - sudo apt-get install texlive texlive-latex3 5 | - sudo apt install texlive-latex-extra 6 | script: 7 | - ./build.sh 8 | deploy: 9 | provider: script 10 | script: ./travis_deploy.sh 11 | skip_cleanup: true 12 | on: 13 | branch: master 14 | env: 15 | global: 16 | - ENCRYPTION_LABEL="19a81de38b62" 17 | - COMMIT_AUTHOR_EMAIL="chris@ethereum.org" 18 | - COMMIT_AUTHOR="Travis CI" 19 | - PUSH_REPO="git@github.com:ethereum/yellowpaper.git" 20 | -------------------------------------------------------------------------------- /BRANCHES.md: -------------------------------------------------------------------------------- 1 | ## Protocol Versions 2 | 3 | Each protocol version is specified in `Paper.tex` found in a branch of this repository. 4 | 5 | | Branch | Version | Applicable Block Numbers | 6 | |-------------------|-------------------------------------------------------------------------------------------------------------------|-----------------------------------| 7 | | master | [Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) | 17,034,870 until 19,426,586 8 | | paris | [Paris](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md) | 15,537,394 until 17,034,869 9 | | london | [Gray Glacier](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md)
[Arrow Glacier](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md)
[London](https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md) | Since 15,050,000 until 15,537,393
Since 13,773,000 until 15,049,999
Since 12,965,000 until 13,772,999 | 10 | | berlin | [Berlin](https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md) | Since 12,244,000 until 12,964,999 | 11 | | istanbul | [Muir Glacier](https://eips.ethereum.org/EIPS/eip-2387)
[Istanbul](https://eips.ethereum.org/EIPS/eip-1679) | Since 9,200,000 until 12,243,999
Since 9,069,000 until 9,199,999 | 12 | | petersburg | [Constantinople](https://eips.ethereum.org/EIPS/eip-1013) + [Petersburg](https://eips.ethereum.org/EIPS/eip-1716) | Since 7,280,000 until 9,068,999 | 13 | | byzantium | [Byzantium](https://eips.ethereum.org/EIPS/eip-609) | Since 4,370,000 until 7,279,999 | 14 | | spurious-dragon | [Spurious Dragon](https://eips.ethereum.org/EIPS/eip-607) | Since 2,675,000 until 4,369,999 | 15 | | tangerine-whistle | [Tangerine Whistle](https://eips.ethereum.org/EIPS/eip-608) | Since 2,463,000 until 2,674,999 | 16 | | dao-fork | [DAO Fork](https://eips.ethereum.org/EIPS/eip-779) | Since 1,920,000 until 2,462,999 | 17 | | homestead | [Homestead](https://eips.ethereum.org/EIPS/eip-606) | Since 1,150,000 until 1,919,999 | 18 | | frontier | [Frontier](https://github.com/ethereum/yellowpaper/tree/frontier) | Since 1 until 1,149,999 | 19 | -------------------------------------------------------------------------------- /Biblio.bib: -------------------------------------------------------------------------------- 1 | @book{ASICSmithMJS, 2 | title = {{Application-Specific Integrated Circuits}}, 3 | author = "Smith, Michael John Sebastian", 4 | publisher = "Addison-Wesley", 5 | year = "1997", 6 | ISBN = "0201500221", 7 | } 8 | 9 | @misc{ECDSAcerticom, 10 | url = "https://web.archive.org/web/20170921160141/http://cs.ucsb.edu/~koc/ccs130h/notes/ecdsa-cert.pdf", 11 | note = "Accessed 21 September 2017, but the original link was inaccessible on 19 October 2017. Refer to section 6.2 for ECDSAPUBKEY, and section 7 for ECDSASIGN and ECDSARECOVER.", 12 | title = {{The Elliptic Curve Digital Signature Algorithm (ECDSA)}}, 13 | publisher = {{Certicom Research}}, 14 | location = "Canada", 15 | author = "Don Johnson 16 | and Alfred Menezes 17 | and Scott Vanstone", 18 | year = "2001", 19 | abstract = "The Elliptic Curve Digital Signature Algorithm (ECDSA) is the elliptic curve analogue of the Digital Signature Algorithm (DSA). It was accepted in 1999 as an ANSI standard, and was accepted in 2000 as IEEE and NIST standards. It was also accepted in 1998 as an ISO standard, and is under consideration for inclusion in some other ISO standards. Unlike the ordinary discrete logarithm problem and the integer factorization problem, no subexponential-time algorithm is known for the elliptic curve discrete logarithm problem. For this reason, the strength-per-key-bit is substantially greater in an algorithm that uses elliptic curves. This paper describes the ANSI X9.62 ECDSA, and discusses related security, implementation, and interoperability issues.", 20 | } 21 | 22 | @misc{commitdateforEthash, 23 | url = "https://github.com/ethereum/yellowpaper/commit/77a8cf2428ce245bf6e2c39c5e652ba58a278666#commitcomment-24644869", 24 | author = "Christoph Jentzsch", 25 | year = "2015", 26 | publisher = "Github", 27 | title = "Commit date for Ethash", 28 | } 29 | 30 | @misc{npmElectrum2017, 31 | url = "https://www.npmjs.com/package/electrum", 32 | author = "Arnaud, Pierre 33 | and Schroeter, Mathieu 34 | and Le Barbare, Sam", 35 | title = {{Electrum}}, 36 | year = {{2017}}, 37 | } 38 | 39 | @Inbook{Courtois2014, 40 | author="Courtois, Nicolas T. 41 | and Grajek, Marek 42 | and Naik, Rahul", 43 | editor="Kotulski, Zbigniew 44 | and Ksi{\k{e}}{\.{z}}opolski, Bogdan 45 | and Mazur, Katarzyna", 46 | title="Optimizing SHA256 in Bitcoin Mining", 47 | bookTitle="Cryptography and Security Systems: Third International Conference, CSS 2014, Lublin, Poland, September 22-24, 2014. Proceedings", 48 | year="2014", 49 | publisher="Springer Berlin Heidelberg", 50 | address="Berlin, Heidelberg", 51 | pages="131--144", 52 | abstract="Bitcoin is a ``crypto currency'', a decentralized electronic payment scheme based on cryptography. It implements a particular type of peer-to-peer payment system. Bitcoin depends on well-known cryptographic standards such as SHA-256. In this paper we revisit the cryptographic process which allows one to make money by producing new bitcoins. We reformulate this problem as a specific sort of Constrained Input Small Output (CISO) hashing problem and reduce the problem to a pure block cipher problem, cf. Fig. 1. We estimate the speed of this process and we show that the amortized cost of this process is less than it seems and it depends on a certain cryptographic constant which is estimated to be at most 1.89. These optimizations enable bitcoin miners to save countless millions of dollars per year in electricity bills.", 53 | isbn="978-3-662-44893-9", 54 | doi="10.1007/978-3-662-44893-9_12", 55 | url="https://doi.org/10.1007/978-3-662-44893-9_12", 56 | } 57 | 58 | @misc{Keccak, 59 | url = "https://keccak.team/files/Keccak-submission-3.pdf", 60 | _note = "Accessed 1 July 2019.", 61 | author = "Guido Bertoni 62 | and Joan Daemen 63 | and Michaël Peeters 64 | and Gilles Van Assche", 65 | title = {{The KECCAK SHA-3 submission}}, 66 | year = "2011", 67 | } 68 | 69 | @Book{Davey2002_zbMATH01748069, 70 | Author = "B.A. {Davey} and H.A. {Priestley}", 71 | Title = "Introduction to lattices and order. 2nd ed.", 72 | Edition = "2nd ed.", 73 | ISBN = "0-521-78451-4/pbk", 74 | Pages = "xii + 298", 75 | Year = "2002", 76 | Publisher = "Cambridge: Cambridge University Press", 77 | Language = "English", 78 | MSC2010 = "06-01", 79 | Zbl = "1002.06001", 80 | } 81 | 82 | @Misc{EIP-2, 83 | url = "https://eips.ethereum.org/EIPS/eip-2", 84 | title = "{EIP}-2: Homestead Hard-fork Changes", 85 | author = "Vitalik Buterin", 86 | year = "2015", 87 | } 88 | 89 | @Misc{EIP-100, 90 | url = "https://eips.ethereum.org/EIPS/eip-100", 91 | author = "Vitalik Buterin", 92 | title = "{EIP}-100: Change difficulty adjustment to target mean block time including uncles", 93 | year = "2016", 94 | month = "April", 95 | } 96 | 97 | @Misc{EIP-152, 98 | url = "https://eips.ethereum.org/EIPS/eip-152", 99 | author = "Hess, Tjaden and Luongo, Matt and Dyraga, Piotr and Hancock, James", 100 | title = "{EIP}-152: Add {BLAKE2} compression function `{F}` precompile", 101 | year = "2016", 102 | month = "October", 103 | } 104 | 105 | @Misc{EIP-155, 106 | url = "https://eips.ethereum.org/EIPS/eip-155", 107 | author = "Vitalik Buterin", 108 | title = "{EIP}-155: Simple replay attack protection", 109 | year = "2016", 110 | month = "October", 111 | } 112 | 113 | @Misc{EIP-649, 114 | url = "https://eips.ethereum.org/EIPS/eip-649", 115 | author = "Afri Schoedon and Vitalik Buterin", 116 | title = "{EIP}-649: Metropolis Difficulty Bomb Delay and Block Reward Reduction", 117 | year = "2017", 118 | month = "June", 119 | } 120 | 121 | @Misc{EIP-1014, 122 | url = "https://eips.ethereum.org/EIPS/eip-1014", 123 | author = "Vitalik Buterin", 124 | title = "{EIP}-1014: Skinny {CREATE2}", 125 | year = "2018", 126 | month = "April", 127 | } 128 | 129 | @Misc{EIP-1234, 130 | url = "https://eips.ethereum.org/EIPS/eip-1234", 131 | title = "{EIP}-1234: Constantinople Difficulty Bomb Delay and Block Reward Adjustment", 132 | author = "Afri Schoedon", 133 | year = "2018", 134 | } 135 | 136 | @Misc{EIP-1559, 137 | url = "https://eips.ethereum.org/EIPS/eip-1559", 138 | title = "{EIP}-1559: Fee market change for ETH 1.0 chain", 139 | author = "Buterin, Vitalik and Conner, Eric and Dudley, Rick and Slipper, Matthew and Norden, Ian and Bakhta, Abdelhamid", 140 | year = "2019", 141 | } 142 | 143 | @Misc{EIP-1679, 144 | url = "https://eips.ethereum.org/EIPS/eip-1679", 145 | title = "{EIP}-1679: Hardfork Meta: Istanbul", 146 | author = "Beregszaszi, Alex and Schoedon, Afri", 147 | year = "2019", 148 | } 149 | 150 | @Misc{EIP-2200, 151 | url = "https://eips.ethereum.org/EIPS/eip-2200", 152 | title = "{EIP}-2200: Structured Definitions for Net Gas Metering", 153 | author = "Wei Tang", 154 | year = "2019", 155 | } 156 | 157 | @Misc{EIP-2384, 158 | url = "https://eips.ethereum.org/EIPS/eip-2384", 159 | title = "{EIP}-2384: {Muir Glacier} Difficulty Bomb Delay", 160 | author = "Eric Conner", 161 | year = "2019", 162 | month = "November", 163 | } 164 | 165 | @Misc{EIP-2718, 166 | url = "https://eips.ethereum.org/EIPS/eip-2718", 167 | title = "{EIP}-2718: Typed Transaction Envelope", 168 | author = "Zoltu, Micah", 169 | year = "2020", 170 | month = "June", 171 | } 172 | 173 | @Misc{EIP-2929, 174 | url = "https://eips.ethereum.org/EIPS/eip-2929", 175 | title = "{EIP}-2929: Gas cost increases for state access opcodes", 176 | author = "Buterin, Vitalik and Swende, Martin", 177 | year = "2020", 178 | month = "September", 179 | } 180 | 181 | @Misc{EIP-2930, 182 | url = "https://eips.ethereum.org/EIPS/eip-2930", 183 | title = "{EIP}-2930: Optional access lists", 184 | author = "Buterin, Vitalik and Swende, Martin", 185 | year = "2020", 186 | month = "August", 187 | } 188 | 189 | @Misc{EIP-3529, 190 | url = "https://eips.ethereum.org/EIPS/eip-3529", 191 | title = "{EIP}-3529: Reduction in refunds", 192 | author = "Buterin, Vitalik and Swende, Martin", 193 | year = "2021", 194 | month = "April", 195 | } 196 | 197 | @Misc{EIP-3541, 198 | url = "https://eips.ethereum.org/EIPS/eip-3541", 199 | title = "{EIP}-3541: Reject new contract code starting with the 0xEF byte", 200 | author = "Beregszaszi, Alex and Bylica, Pawe\l{} and Maiboroda, Andrei and Akhunov, Alexey and Reitwiessner, Christian and Swende, Martin", 201 | year = "2021", 202 | month = "March", 203 | } 204 | 205 | @Misc{EIP-3554, 206 | url = "https://eips.ethereum.org/EIPS/eip-3554", 207 | title = "{EIP}-3554: Difficulty Bomb Delay to {December} 2021", 208 | author = "Hancock, James", 209 | year = "2021", 210 | month = "May", 211 | } 212 | 213 | @Misc{EIP-3607, 214 | url = "https://eips.ethereum.org/EIPS/eip-3607", 215 | title = "{EIP}-3607: Reject transactions from senders with deployed code", 216 | author = "Feist, Dankrad and Khovratovich, Dmitry and van der Wijden, Marius", 217 | year = "2021", 218 | month = "June", 219 | } 220 | 221 | @Misc{EIP-4345, 222 | url = "https://eips.ethereum.org/EIPS/eip-4345", 223 | title = "{EIP}-4345: Difficulty Bomb Delay to {June} 2022", 224 | author = "Beiko, Tim and Hancock, James and Rush, Thomas Jay", 225 | year = "2021", 226 | month = "October", 227 | } 228 | 229 | @misc{EIP-5133, 230 | url = {https://eips.ethereum.org/EIPS/eip-5133}, 231 | title = {{EIP}-5133: Delaying Difficulty Bomb to mid-{September} 2022}, 232 | author = {Tomasz Kajetan Stanczak 233 | and Eric Marti Haynes 234 | and Josh Klopfenstein 235 | and Abhimanyu Nag}, 236 | year = {2022}, 237 | month = {June} 238 | } 239 | 240 | @Misc{cryptoeprint:2013:881, 241 | url = "https://eprint.iacr.org/2013/881", 242 | author = "Sompolinsky, Yonatan and Zohar, Aviv", 243 | title = "Accelerating Bitcoin{'}s Transaction Processing. Fast Money Grows on Trees, Not Chains", 244 | year = "2013", 245 | } 246 | 247 | @InCollection{gura2004comparing, 248 | url = "https://www.iacr.org/archive/ches2004/31560117/31560117.pdf", 249 | _note = "\url{https://web.archive.org/web/20170810035057/https://www.iacr.org/archive/ches2004/31560117/31560117.pdf}", 250 | BookTitle = "Cryptographic Hardware and Embedded Systems-CHES 2004", 251 | Publisher = "Springer", 252 | author = "Gura, Nils and Patel, Arun and Wander, Arvinderpal and Eberle, Hans and Shantz, Sheueling Chang", 253 | title = "Comparing elliptic curve cryptography and {RSA} on 8-bit {CPUs}", 254 | pages = "119-132", 255 | year = "2004", 256 | } 257 | 258 | @InProceedings{laurie2004proof, 259 | BookTitle = "Workshop on Economics and Information, Security", 260 | author = "Laurie, Ben and Clayton, Richard", 261 | title = "{``}Proof-of-Work{''} proves not to work; version 0.2", 262 | year = "2004", 263 | } 264 | 265 | @Misc{vishnumurthy03karma:a, 266 | url = "https://www.cs.cornell.edu/people/egs/papers/karma.pdf", 267 | _note = "\url{https://web.archive.org/web/20170810031834/https://www.cs.cornell.edu/people/egs/papers/karma.pdf}", 268 | author = "Vivek Vishnumurthy and Sangeeth Chandrakumar and Emin Gün Sirer", 269 | title = "{KARMA}: A Secure Economic Framework for Peer-to-Peer Resource Sharing", 270 | year = "2003", 271 | } 272 | 273 | @InProceedings{dwork92pricingvia, 274 | _note = "\url{https://web.archive.org/web/20170810035254/http://www.wisdom.weizmann.ac.il/~naor/PAPERS/pvp.pdf}", 275 | url = "http://www.wisdom.weizmann.ac.il/~naor/PAPERS/pvp.pdf", 276 | author = "Cynthia Dwork and Moni Naor", 277 | title = {Pricing via processing or combatting junk mail}, 278 | booktitle = {In 12th Annual International Cryptology Conference}, 279 | year = {1992}, 280 | pages = {139--147}, 281 | } 282 | 283 | @misc{nakamoto2008bitcoin, 284 | url = {{http://www.bitcoin.org/bitcoin.pdf}}, 285 | _note = "The above URL is recommended by the author here: https://www.mail-archive.com/cryptography@metzdowd.com/msg09959.html.", 286 | title = {{Bitcoin: A peer-to-peer electronic cash system}}, 287 | author = {Nakamoto, Satoshi}, 288 | _journal = {{Consulted}}, 289 | _volume = {{1}}, 290 | _pages = {2012}, 291 | year = {{2008}}, 292 | } 293 | 294 | @Misc{sprankel2013technical, 295 | url = {{http://www.coderblog.de/wp-content/uploads/technical-basis-of-digital-currencies.pdf}}, 296 | _note = {{\url{https://web.archive.org/web/20170810025028/http://www.coderblog.de/wp-content/uploads/technical-basis-of-digital-currencies.pdf}}}, 297 | author = {Sprankel, Simon}, 298 | title = {{Technical Basis of Digital Currencies}}, 299 | year = {{2013}}, 300 | } 301 | 302 | @Article{aron2012bitcoin, 303 | url = {{http://www.sciencedirect.com/science/article/pii/S0262407912601055}}, 304 | Publisher = {{Elsevier}}, 305 | author = {Aron, Jacob}, 306 | title = {{BitCoin software finds new life}}, 307 | journal = {{New Scientist}}, 308 | volume = {{213}}, 309 | number = {{2847}}, 310 | pages = {20}, 311 | year = {{2012}}, 312 | } 313 | 314 | @misc{mastercoin2013willett, 315 | url = {{https://github.com/mastercoin-MSC/spec}}, 316 | _note = {{\url{https://web.archive.org/web/20170810035927/https://github.com/OmniLayer/spec}}}, 317 | author = {Willett, J. R.}, 318 | title = {{MasterCoin Complete Specification}}, 319 | year = {{2013}}, 320 | } 321 | 322 | @misc{colouredcoins2012rosenfeld, 323 | url = {{https://github.com/Colored-Coins/Colored-Coins-Protocol-Specification}}, 324 | _note = {{Archive: \url{https://web.archive.org/web/20180220235952/https://github.com/Colored-Coins/Colored-Coins-Protocol-Specification}. Earlier version: \url{https://docs.google.com/document/d/1AnkP_cVZTCMLIzw4DvsW6M8Q2JC0lIzrTLuoWu2z1BE/}}}, 325 | author = {Meni Rosenfeld and Yoni Assia and Vitalik Buterin and m liorhakiLior and Oded Leiba and Assaf Shomer and Eliran Zach}, 326 | title = {{Colored Coins Protocol Specification}}, 327 | year = {{2012}}, 328 | } 329 | 330 | @incollection{boutellier2014pirates, 331 | url = {{https://www.springer.com/gb/book/9783319040158}}, 332 | _note = {{\url{http://wiki.erights.org/wiki/Documentation} and \url{https://web.archive.org/web/20170810040208/https://www.springer.com/gb/book/9783319040158}}}, 333 | booktitle = {{Growth Through Innovation}}, 334 | publisher = {{Springer}}, 335 | author = {Boutellier, Roman and Heinzen, Mareike}, 336 | title = {{Pirates, Pioneers, Innovators and Imitators}}, 337 | pages = {85-96}, 338 | year = {{2014}}, 339 | } 340 | 341 | @Article{szabo1997formalizing, 342 | url = {{http://firstmonday.org/ojs/index.php/fm/article/view/548}}, 343 | _note = {{\url{https://web.archive.org/web/20170810042659/http://firstmonday.org/ojs/index.php/fm/article/view/548}}}, 344 | author = {Szabo, Nick}, 345 | title = {{Formalizing and securing relationships on public networks}}, 346 | journal = {{First Monday}}, 347 | volume = {{2}}, 348 | number = {{9}}, 349 | year = {{1997}}, 350 | } 351 | 352 | @InProceedings{miller1997future, 353 | url = {{https://drive.google.com/file/d/0Bw0VXJKBgYPMS0J2VGIyWWlocms/edit?usp=sharing}}, 354 | BookTitle = {{paper delivered at the Extro 3 Conference (August 9)}}, 355 | author = {Miller, Mark}, 356 | title = {{The Future of Law}}, 357 | year = {{1997}}, 358 | } 359 | 360 | @misc{buterin2013ethereum, 361 | url = {{https://github.com/ethereum/wiki/wiki/White-Paper}}, 362 | author = {Vitalik Buterin}, 363 | title = {{Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform}}, 364 | year = {{2013}}, 365 | } 366 | 367 | @misc{back2002hashcash, 368 | url = {{http://www.hashcash.org/papers/amortizable.pdf}}, 369 | _note = {{\url{https://web.archive.org/web/20170810043047/http://www.hashcash.org/papers/amortizable.pdf}}}, 370 | author = {Adam Back}, 371 | title = {{Hashcash - Amortizable Publicly Auditable Cost-Functions}}, 372 | year = {{2002}}, 373 | } 374 | 375 | @misc{hashimoto, 376 | url = {{http://diyhpl.us/~bryan/papers2/bitcoin/meh/hashimoto.pdf}}, 377 | _note = "Using the ~bryan link after an affirmative reply from the author. If that doesn't work anymore, consider https://web.archive.org/web/20170810043640/https://pdfs.semanticscholar.org/3b23/7cc60c1b9650e260318d33bec471b8202d5e.pdf", 378 | author = {Thaddeus Dryja}, 379 | title = {{Hashimoto: I/O bound proof of work}}, 380 | year = {{2014}}, 381 | } 382 | 383 | @misc{dagger, 384 | url = {{http://www.hashcash.org/papers/dagger.html}}, 385 | _note = {{\url{https://web.archive.org/web/20170810043955/http://www.hashcash.org/papers/dagger.html}. Dead original link as of 10 August 2017: \url{http://vitalik.ca/ethereum/dagger.html}}}, 386 | author = {Vitalik Buterin}, 387 | title = {{Dagger: A Memory-Hard to Compute, Memory-Easy to Verify Scrypt Alternative}}, 388 | year = {{2013}}, 389 | } 390 | 391 | @misc{lerner2014randmemohash, 392 | url = {{http://www.hashcash.org/papers/memohash.pdf}}, 393 | _note = {{\url{https://web.archive.org/web/20170810044110/http://www.hashcash.org/papers/memohash.pdf}}}, 394 | author = {Sergio Demian Lerner}, 395 | title = {{Strict Memory Hard Hashing Functions}}, 396 | year = {{2014}}, 397 | } 398 | 399 | @misc{FowlerNollVo1991FNVHash, 400 | url = {{http://www.isthe.com/chongo/tech/comp/fnv/index.html}}, 401 | _note = {{\url{https://web.archive.org/web/20180205025406/http://www.isthe.com/chongo/tech/comp/fnv/index.html}}}, 402 | author = {Glenn Fowler, Landon Curt Noll, Phong Vo}, 403 | title = {{Fowler–Noll–Vo hash function}}, 404 | year = {{1991}}, 405 | } 406 | 407 | @misc{RFC-7693, 408 | url = "https://tools.ietf.org/html/rfc7693", 409 | author = "Markku--Juhani Saarinen and Jean--Philippe Aumasson", 410 | title = "{RFC} 7693: The {BLAKE2} Cryptographic Hash and Message Authentication Code ({MAC})", 411 | year = "2015", 412 | month = "November", 413 | } 414 | 415 | @misc{BeikoBerlin, 416 | url = "https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md", 417 | author = "Beiko, Tim and others", 418 | title = "Berlin Network Upgrade Specification", 419 | year = "2021", 420 | } 421 | 422 | @misc{BeikoLondon, 423 | url = "https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md", 424 | author = "Beiko, Tim and others", 425 | title = "London Network Upgrade Specification", 426 | year = "2021", 427 | } 428 | -------------------------------------------------------------------------------- /IEEEbib.bst: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IEEE.bst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % Bibliography Syle file for articles according to IEEE instructions 3 | % balemi@aut.ee.ethz.ch <22-JUN-93> 4 | % modified from unsrt.bib. Contributions by Richard H. Roy 5 | 6 | ENTRY 7 | { address 8 | author 9 | booktitle 10 | chapter 11 | edition 12 | editor 13 | howpublished 14 | institution 15 | journal 16 | key 17 | month 18 | note 19 | number 20 | organization 21 | pages 22 | publisher 23 | school 24 | series 25 | title 26 | type 27 | volume 28 | year 29 | } 30 | {} 31 | { label } 32 | 33 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 34 | 35 | FUNCTION {init.state.consts} 36 | { #0 'before.all := 37 | #1 'mid.sentence := 38 | #2 'after.sentence := 39 | #3 'after.block := 40 | } 41 | 42 | STRINGS { s t } 43 | 44 | FUNCTION {output.nonnull} 45 | { 's := 46 | output.state mid.sentence = 47 | { ", " * write$ } 48 | { output.state after.block = 49 | % next line commented out by rhr and changed to write comma 50 | % { add.period$ write$ 51 | { ", " * write$ 52 | newline$ 53 | "\newblock " write$ 54 | } 55 | { output.state before.all = 56 | 'write$ 57 | { add.period$ " " * write$ } 58 | if$ 59 | } 60 | if$ 61 | mid.sentence 'output.state := 62 | } 63 | if$ 64 | s 65 | } 66 | 67 | FUNCTION {output} 68 | { duplicate$ empty$ 69 | 'pop$ 70 | 'output.nonnull 71 | if$ 72 | } 73 | 74 | FUNCTION {output.check} 75 | { 't := 76 | duplicate$ empty$ 77 | { pop$ "empty " t * " in " * cite$ * warning$ } 78 | 'output.nonnull 79 | if$ 80 | } 81 | 82 | FUNCTION {output.bibitem} 83 | { newline$ 84 | "\bibitem{" write$ 85 | cite$ write$ 86 | "}" write$ 87 | newline$ 88 | "" 89 | before.all 'output.state := 90 | } 91 | 92 | FUNCTION {fin.entry} 93 | { add.period$ 94 | write$ 95 | newline$ 96 | } 97 | 98 | % 5/24/89 rhr 99 | % modified fin.entry function - prints note field after body of entry 100 | %FUNCTION {fin.entry} 101 | %{ add.period$ 102 | % note empty$ 103 | % 'write$ 104 | % { "\par\bgroup\parindent=0em " * annote * "\par\egroup " * write$ 105 | % } 106 | % if$ 107 | % newline$ 108 | %} 109 | 110 | FUNCTION {new.block} 111 | { output.state before.all = 112 | 'skip$ 113 | { after.block 'output.state := } 114 | if$ 115 | } 116 | 117 | % new block without terminating last block with a comma 118 | FUNCTION {new.ncblock} 119 | { 120 | write$ 121 | newline$ 122 | "\newblock " 123 | before.all 'output.state := 124 | } 125 | 126 | FUNCTION {new.nccont} 127 | { 128 | write$ 129 | " " 130 | before.all 'output.state := 131 | } 132 | 133 | FUNCTION {new.sentence} 134 | { output.state after.block = 135 | 'skip$ 136 | { output.state before.all = 137 | 'skip$ 138 | { after.sentence 'output.state := } 139 | if$ 140 | } 141 | if$ 142 | } 143 | 144 | FUNCTION {not} 145 | { { #0 } 146 | { #1 } 147 | if$ 148 | } 149 | 150 | FUNCTION {and} 151 | { 'skip$ 152 | { pop$ #0 } 153 | if$ 154 | } 155 | 156 | FUNCTION {or} 157 | { { pop$ #1 } 158 | 'skip$ 159 | if$ 160 | } 161 | 162 | FUNCTION {new.block.checka} 163 | { empty$ 164 | 'skip$ 165 | 'new.block 166 | if$ 167 | } 168 | 169 | FUNCTION {new.block.checkb} 170 | { empty$ 171 | swap$ empty$ 172 | and 173 | 'skip$ 174 | 'new.block 175 | if$ 176 | } 177 | 178 | FUNCTION {new.sentence.checka} 179 | { empty$ 180 | 'skip$ 181 | 'new.sentence 182 | if$ 183 | } 184 | 185 | FUNCTION {new.sentence.checkb} 186 | { empty$ 187 | swap$ empty$ 188 | and 189 | 'skip$ 190 | 'new.sentence 191 | if$ 192 | } 193 | 194 | FUNCTION {field.or.null} 195 | { duplicate$ empty$ 196 | { pop$ "" } 197 | 'skip$ 198 | if$ 199 | } 200 | 201 | FUNCTION {emphasize} 202 | { duplicate$ empty$ 203 | { pop$ "" } 204 | { "{\em " swap$ * "}" * } 205 | if$ 206 | } 207 | 208 | FUNCTION {boldface} 209 | { duplicate$ empty$ 210 | { pop$ "" } 211 | { "{\bf " swap$ * "}" * } 212 | if$ 213 | } 214 | 215 | %FUNCTION {boldface} 216 | %{ 's swap$ := 217 | % s "" = 218 | % { "" } 219 | % { "{\bf " s * "}" * } 220 | % if$ 221 | %} 222 | % 223 | INTEGERS { nameptr namesleft numnames } 224 | 225 | FUNCTION {format.names} 226 | { 's := 227 | #1 'nameptr := 228 | s num.names$ 'numnames := 229 | numnames 'namesleft := 230 | { namesleft #0 > } 231 | { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := 232 | nameptr #1 > 233 | { namesleft #1 > 234 | { ", " * t * } 235 | { numnames #2 > 236 | { "," * } 237 | 'skip$ 238 | if$ 239 | t "others" = 240 | { " et~al." * } 241 | { " and " * t * } 242 | if$ 243 | } 244 | if$ 245 | } 246 | 't 247 | if$ 248 | nameptr #1 + 'nameptr := 249 | namesleft #1 - 'namesleft := 250 | } 251 | while$ 252 | } 253 | 254 | FUNCTION {format.authors} 255 | { author empty$ 256 | { "" } 257 | { author format.names } 258 | if$ 259 | } 260 | 261 | FUNCTION {format.editors} 262 | { editor empty$ 263 | { "" } 264 | { editor format.names 265 | editor num.names$ #1 > 266 | { ", Eds." * } 267 | { ", Ed." * } 268 | if$ 269 | } 270 | if$ 271 | } 272 | 273 | FUNCTION {format.title} 274 | { title empty$ 275 | { "" } 276 | { "``" title "t" change.case$ * } 277 | if$ 278 | } 279 | 280 | FUNCTION {n.dashify} 281 | { 't := 282 | "" 283 | { t empty$ not } 284 | { t #1 #1 substring$ "-" = 285 | { t #1 #2 substring$ "--" = not 286 | { "--" * 287 | t #2 global.max$ substring$ 't := 288 | } 289 | { { t #1 #1 substring$ "-" = } 290 | { "-" * 291 | t #2 global.max$ substring$ 't := 292 | } 293 | while$ 294 | } 295 | if$ 296 | } 297 | { t #1 #1 substring$ * 298 | t #2 global.max$ substring$ 't := 299 | } 300 | if$ 301 | } 302 | while$ 303 | } 304 | 305 | FUNCTION {format.date} 306 | { year empty$ 307 | { month empty$ 308 | { "" } 309 | { "there's a month but no year in " cite$ * warning$ 310 | month 311 | } 312 | if$ 313 | } 314 | { month empty$ 315 | 'year 316 | { month " " * year * } 317 | if$ 318 | } 319 | if$ 320 | } 321 | 322 | % FUNCTION {format.date} 323 | % { year empty$ 324 | % 'year 325 | % { " " year * } 326 | % if$ 327 | % } 328 | 329 | FUNCTION {format.btitle} 330 | { title emphasize 331 | } 332 | 333 | FUNCTION {tie.or.space.connect} 334 | { duplicate$ text.length$ #3 < 335 | { "~" } 336 | { " " } 337 | if$ 338 | swap$ * * 339 | } 340 | 341 | FUNCTION {either.or.check} 342 | { empty$ 343 | 'pop$ 344 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 345 | if$ 346 | } 347 | 348 | FUNCTION {format.bvolume} 349 | { volume empty$ 350 | { "" } 351 | { "vol." volume tie.or.space.connect 352 | series empty$ 353 | 'skip$ 354 | { " of " * series emphasize * } 355 | if$ 356 | "volume and number" number either.or.check 357 | } 358 | if$ 359 | } 360 | 361 | FUNCTION {format.number.series} 362 | { volume empty$ 363 | { number empty$ 364 | { series field.or.null } 365 | { output.state mid.sentence = 366 | { "number" } 367 | { "Number" } 368 | if$ 369 | number tie.or.space.connect 370 | series empty$ 371 | { "there's a number but no series in " cite$ * warning$ } 372 | { " in " * series * } 373 | if$ 374 | } 375 | if$ 376 | } 377 | { "" } 378 | if$ 379 | } 380 | 381 | FUNCTION {format.edition} 382 | { edition empty$ 383 | { "" } 384 | { output.state mid.sentence = 385 | { edition "l" change.case$ " edition" * } 386 | { edition "t" change.case$ " edition" * } 387 | if$ 388 | } 389 | if$ 390 | } 391 | 392 | INTEGERS { multiresult } 393 | 394 | FUNCTION {multi.page.check} 395 | { 't := 396 | #0 'multiresult := 397 | { multiresult not 398 | t empty$ not 399 | and 400 | } 401 | { t #1 #1 substring$ 402 | duplicate$ "-" = 403 | swap$ duplicate$ "," = 404 | swap$ "+" = 405 | or or 406 | { #1 'multiresult := } 407 | { t #2 global.max$ substring$ 't := } 408 | if$ 409 | } 410 | while$ 411 | multiresult 412 | } 413 | 414 | FUNCTION {format.pages} 415 | { pages empty$ 416 | { "" } 417 | { pages multi.page.check 418 | { "pp." pages n.dashify tie.or.space.connect } 419 | { "p." pages tie.or.space.connect } 420 | if$ 421 | } 422 | if$ 423 | } 424 | 425 | FUNCTION {format.vol.num.pages} 426 | { 427 | volume empty$ 428 | {"" } 429 | {"vol. " volume *} 430 | if$ 431 | number empty$ 432 | 'skip$ 433 | {", no. " number * *} 434 | if$ 435 | pages empty$ 436 | 'skip$ 437 | { duplicate$ empty$ 438 | { pop$ format.pages } 439 | { ", pp. " * pages n.dashify * } 440 | if$ 441 | } 442 | if$ 443 | } 444 | 445 | %FUNCTION {format.vol.num.pages} 446 | %%boldface added 3/17/87 rhr 447 | %{ volume field.or.null boldface 448 | % number empty$ 449 | % 'skip$ 450 | % { "(" number * ")" * * 451 | % volume empty$ 452 | % { "there's a number but no volume in " cite$ * warning$ } 453 | % 'skip$ 454 | % if$ 455 | % } 456 | % if$ 457 | % pages empty$ 458 | % 'skip$ 459 | % { duplicate$ empty$ 460 | % { pop$ format.pages } 461 | % { ":" * pages n.dashify * } 462 | % if$ 463 | % } 464 | % if$ 465 | %} 466 | 467 | FUNCTION {format.chapter.pages} 468 | { chapter empty$ 469 | 'format.pages 470 | { type empty$ 471 | { "chapter" } 472 | { type "l" change.case$ } 473 | if$ 474 | chapter tie.or.space.connect 475 | pages empty$ 476 | 'skip$ 477 | { ", " * format.pages * } 478 | if$ 479 | } 480 | if$ 481 | } 482 | 483 | FUNCTION {format.in.ed.booktitle} 484 | { booktitle empty$ 485 | { "" } 486 | { editor empty$ 487 | { "in " booktitle emphasize * } 488 | { "in " booktitle emphasize * ", " * format.editors * } 489 | if$ 490 | } 491 | if$ 492 | } 493 | 494 | FUNCTION {empty.misc.check} 495 | { author empty$ title empty$ howpublished empty$ 496 | month empty$ year empty$ note empty$ 497 | and and and and and 498 | { "all relevant fields are empty in " cite$ * warning$ } 499 | 'skip$ 500 | if$ 501 | } 502 | 503 | FUNCTION {format.thesis.type} 504 | { type empty$ 505 | 'skip$ 506 | { pop$ 507 | type "t" change.case$ 508 | } 509 | if$ 510 | } 511 | 512 | FUNCTION {format.tr.number} 513 | { type empty$ 514 | { "Tech. {R}ep." } 515 | 'type 516 | if$ 517 | number empty$ 518 | { "t" change.case$ } 519 | { number tie.or.space.connect } 520 | if$ 521 | } 522 | 523 | FUNCTION {format.article.crossref} 524 | { key empty$ 525 | { journal empty$ 526 | { "need key or journal for " cite$ * " to crossref " * crossref * 527 | warning$ 528 | "" 529 | } 530 | { "In {\em " journal * "\/}" * } 531 | if$ 532 | } 533 | { "In " key * } 534 | if$ 535 | " \cite{" * crossref * "}" * 536 | } 537 | 538 | FUNCTION {format.crossref.editor} 539 | { editor #1 "{vv~}{ll}" format.name$ 540 | editor num.names$ duplicate$ 541 | #2 > 542 | { pop$ " et~al." * } 543 | { #2 < 544 | 'skip$ 545 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 546 | { " et~al." * } 547 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } 548 | if$ 549 | } 550 | if$ 551 | } 552 | if$ 553 | } 554 | 555 | FUNCTION {format.book.crossref} 556 | { volume empty$ 557 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 558 | "In " 559 | } 560 | { "vol." volume tie.or.space.connect 561 | " of " * 562 | } 563 | if$ 564 | editor empty$ 565 | editor field.or.null author field.or.null = 566 | or 567 | { key empty$ 568 | { series empty$ 569 | { "need editor, key, or series for " cite$ * " to crossref " * 570 | crossref * warning$ 571 | "" * 572 | } 573 | { "{\em " * series * "\/}" * } 574 | if$ 575 | } 576 | { key * } 577 | if$ 578 | } 579 | { format.crossref.editor * } 580 | if$ 581 | " \cite{" * crossref * "}" * 582 | } 583 | 584 | FUNCTION {format.incoll.inproc.crossref} 585 | { editor empty$ 586 | editor field.or.null author field.or.null = 587 | or 588 | { key empty$ 589 | { booktitle empty$ 590 | { "need editor, key, or booktitle for " cite$ * " to crossref " * 591 | crossref * warning$ 592 | "" 593 | } 594 | { "In {\em " booktitle * "\/}" * } 595 | if$ 596 | } 597 | { "In " key * } 598 | if$ 599 | } 600 | { "In " format.crossref.editor * } 601 | if$ 602 | " \cite{" * crossref * "}" * 603 | } 604 | 605 | FUNCTION {article} 606 | { output.bibitem 607 | format.authors "author" output.check 608 | new.block 609 | format.title ",''" * "title" output.check 610 | new.ncblock 611 | crossref missing$ 612 | { journal emphasize "journal" output.check 613 | format.vol.num.pages output 614 | format.date "year" output.check 615 | } 616 | { format.article.crossref output.nonnull 617 | format.pages output 618 | } 619 | if$ 620 | new.block 621 | note output 622 | fin.entry 623 | } 624 | 625 | FUNCTION {book} 626 | { output.bibitem 627 | author empty$ 628 | { format.editors "author and editor" output.check } 629 | { format.authors output.nonnull 630 | crossref missing$ 631 | { "author and editor" editor either.or.check } 632 | 'skip$ 633 | if$ 634 | } 635 | if$ 636 | new.block 637 | format.btitle "title" output.check 638 | crossref missing$ 639 | { format.bvolume output 640 | new.block 641 | format.number.series output 642 | new.sentence 643 | publisher "publisher" output.check 644 | address output 645 | } 646 | { new.block 647 | format.book.crossref output.nonnull 648 | } 649 | if$ 650 | format.edition output 651 | format.date "year" output.check 652 | new.block 653 | note output 654 | fin.entry 655 | } 656 | 657 | FUNCTION {booklet} 658 | { output.bibitem 659 | format.authors output 660 | new.block 661 | format.title ",''" * "title" output.check 662 | new.nccont 663 | howpublished address new.block.checkb 664 | howpublished output 665 | address output 666 | format.date output 667 | new.block 668 | note output 669 | fin.entry 670 | } 671 | 672 | FUNCTION {inbook} 673 | { output.bibitem 674 | author empty$ 675 | { format.editors "author and editor" output.check } 676 | { format.authors output.nonnull 677 | crossref missing$ 678 | { "author and editor" editor either.or.check } 679 | 'skip$ 680 | if$ 681 | } 682 | if$ 683 | new.block 684 | format.btitle "title" output.check 685 | crossref missing$ 686 | { format.bvolume output 687 | format.chapter.pages "chapter and pages" output.check 688 | new.block 689 | format.number.series output 690 | new.sentence 691 | publisher "publisher" output.check 692 | address output 693 | } 694 | { format.chapter.pages "chapter and pages" output.check 695 | new.block 696 | format.book.crossref output.nonnull 697 | } 698 | if$ 699 | format.edition output 700 | format.date "year" output.check 701 | new.block 702 | note output 703 | fin.entry 704 | } 705 | 706 | FUNCTION {incollection} 707 | { output.bibitem 708 | format.authors "author" output.check 709 | new.block 710 | format.title ",''" * "title" output.check 711 | new.ncblock 712 | crossref missing$ 713 | { format.in.ed.booktitle "booktitle" output.check 714 | format.bvolume output 715 | format.number.series output 716 | format.chapter.pages output 717 | new.sentence 718 | publisher "publisher" output.check 719 | address output 720 | format.edition output 721 | format.date "year" output.check 722 | } 723 | { format.incoll.inproc.crossref output.nonnull 724 | format.chapter.pages output 725 | } 726 | if$ 727 | new.block 728 | note output 729 | fin.entry 730 | } 731 | 732 | FUNCTION {inproceedings} 733 | { output.bibitem 734 | format.authors "author" output.check 735 | new.block 736 | format.title ",''" * "title" output.check 737 | new.ncblock 738 | crossref missing$ 739 | { format.in.ed.booktitle "booktitle" output.check 740 | address empty$ 741 | { organization publisher new.sentence.checkb 742 | organization output 743 | format.date "year" output.check 744 | } 745 | { address output.nonnull 746 | format.date "year" output.check 747 | organization output 748 | } 749 | if$ 750 | format.bvolume output 751 | format.number.series output 752 | format.pages output 753 | publisher output 754 | } 755 | { format.incoll.inproc.crossref output.nonnull 756 | format.pages output 757 | } 758 | if$ 759 | new.block 760 | note output 761 | fin.entry 762 | } 763 | 764 | FUNCTION {conference} { inproceedings } 765 | 766 | FUNCTION {manual} 767 | { output.bibitem 768 | author empty$ 769 | { organization empty$ 770 | 'skip$ 771 | { organization output.nonnull 772 | address output 773 | } 774 | if$ 775 | } 776 | { format.authors output.nonnull } 777 | if$ 778 | new.block 779 | format.btitle "title" output.check 780 | author empty$ 781 | { organization empty$ 782 | { address new.block.checka 783 | address output 784 | } 785 | 'skip$ 786 | if$ 787 | } 788 | { organization address new.block.checkb 789 | organization output 790 | address output 791 | } 792 | if$ 793 | format.edition output 794 | format.date output 795 | new.block 796 | note output 797 | fin.entry 798 | } 799 | 800 | FUNCTION {mastersthesis} 801 | { output.bibitem 802 | format.authors "author" output.check 803 | new.block 804 | format.title ",''" * "title" output.check 805 | new.ncblock 806 | "M.S. thesis" format.thesis.type output.nonnull 807 | school "school" output.check 808 | address output 809 | format.date "year" output.check 810 | new.block 811 | note output 812 | fin.entry 813 | } 814 | 815 | FUNCTION {misc} 816 | { output.bibitem 817 | format.authors output 818 | title howpublished new.block.checkb 819 | format.title ",''" * output 820 | new.nccont 821 | howpublished new.block.checka 822 | howpublished output 823 | format.date output 824 | new.block 825 | note output 826 | fin.entry 827 | empty.misc.check 828 | } 829 | 830 | FUNCTION {phdthesis} 831 | { output.bibitem 832 | format.authors "author" output.check 833 | new.block 834 | format.btitle "title" output.check 835 | new.block 836 | "Ph.D. thesis" format.thesis.type output.nonnull 837 | school "school" output.check 838 | address output 839 | format.date "year" output.check 840 | new.block 841 | note output 842 | fin.entry 843 | } 844 | 845 | FUNCTION {proceedings} 846 | { output.bibitem 847 | editor empty$ 848 | { organization output } 849 | { format.editors output.nonnull } 850 | if$ 851 | new.block 852 | format.btitle "title" output.check 853 | format.bvolume output 854 | format.number.series output 855 | address empty$ 856 | { editor empty$ 857 | { publisher new.sentence.checka } 858 | { organization publisher new.sentence.checkb 859 | organization output 860 | } 861 | if$ 862 | publisher output 863 | format.date "year" output.check 864 | } 865 | { address output.nonnull 866 | format.date "year" output.check 867 | new.sentence 868 | editor empty$ 869 | 'skip$ 870 | { organization output } 871 | if$ 872 | publisher output 873 | } 874 | if$ 875 | new.block 876 | note output 877 | fin.entry 878 | } 879 | 880 | FUNCTION {techreport} 881 | { output.bibitem 882 | format.authors "author" output.check 883 | new.block 884 | format.title ",''" * "title" output.check 885 | new.ncblock 886 | format.tr.number output.nonnull 887 | institution "institution" output.check 888 | address output 889 | format.date "year" output.check 890 | new.block 891 | note output 892 | fin.entry 893 | } 894 | 895 | FUNCTION {unpublished} 896 | { output.bibitem 897 | format.authors "author" output.check 898 | new.block 899 | format.title ",''" * "title" output.check 900 | new.ncblock 901 | note "note" output.check 902 | format.date output 903 | fin.entry 904 | } 905 | 906 | FUNCTION {default.type} { misc } 907 | 908 | MACRO {jan} {"Jan."} 909 | 910 | MACRO {feb} {"Feb."} 911 | 912 | MACRO {mar} {"Mar."} 913 | 914 | MACRO {apr} {"Apr."} 915 | 916 | MACRO {may} {"May"} 917 | 918 | MACRO {jun} {"June"} 919 | 920 | MACRO {jul} {"July"} 921 | 922 | MACRO {aug} {"Aug."} 923 | 924 | MACRO {sep} {"Sept."} 925 | 926 | MACRO {oct} {"Oct."} 927 | 928 | MACRO {nov} {"Nov."} 929 | 930 | MACRO {dec} {"Dec."} 931 | 932 | MACRO {acmcs} {"ACM Computing Surveys"} 933 | 934 | MACRO {acta} {"Acta Informatica"} 935 | 936 | MACRO {cacm} {"Communications of the ACM"} 937 | 938 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 939 | 940 | MACRO {ibmsj} {"IBM Systems Journal"} 941 | 942 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 943 | 944 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 945 | 946 | MACRO {ieeetcad} 947 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 948 | 949 | MACRO {ipl} {"Information Processing Letters"} 950 | 951 | MACRO {jacm} {"Journal of the ACM"} 952 | 953 | MACRO {jcss} {"Journal of Computer and System Sciences"} 954 | 955 | MACRO {scp} {"Science of Computer Programming"} 956 | 957 | MACRO {sicomp} {"SIAM Journal on Computing"} 958 | 959 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 960 | 961 | MACRO {tods} {"ACM Transactions on Database Systems"} 962 | 963 | MACRO {tog} {"ACM Transactions on Graphics"} 964 | 965 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 966 | 967 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 968 | 969 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 970 | 971 | MACRO {tcs} {"Theoretical Computer Science"} 972 | 973 | READ 974 | 975 | STRINGS { longest.label } 976 | 977 | INTEGERS { number.label longest.label.width } 978 | 979 | FUNCTION {initialize.longest.label} 980 | { "" 'longest.label := 981 | #1 'number.label := 982 | #0 'longest.label.width := 983 | } 984 | 985 | FUNCTION {longest.label.pass} 986 | { number.label int.to.str$ 'label := 987 | number.label #1 + 'number.label := 988 | label width$ longest.label.width > 989 | { label 'longest.label := 990 | label width$ 'longest.label.width := 991 | } 992 | 'skip$ 993 | if$ 994 | } 995 | 996 | EXECUTE {initialize.longest.label} 997 | 998 | ITERATE {longest.label.pass} 999 | 1000 | FUNCTION {begin.bib} 1001 | { preamble$ empty$ 1002 | 'skip$ 1003 | { preamble$ write$ newline$ } 1004 | if$ 1005 | "\begin{thebibliography}{" longest.label * "}" * write$ newline$ 1006 | } 1007 | 1008 | EXECUTE {begin.bib} 1009 | 1010 | EXECUTE {init.state.consts} 1011 | 1012 | ITERATE {call.type$} 1013 | 1014 | FUNCTION {end.bib} 1015 | { newline$ 1016 | "\end{thebibliography}" write$ newline$ 1017 | } 1018 | 1019 | EXECUTE {end.bib} 1020 | 1021 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEE.bst %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1022 | -------------------------------------------------------------------------------- /JS.tex: -------------------------------------------------------------------------------- 1 | \section{Javascript API}\label{app:jsapi} 2 | 3 | The JavaScript API provides a consistent API across multiple scenarios including each of the clients' web-based in-process \DH{}App frameworks and the out-of-process RPC-based infrastructure. All key access takes places though the special \texttt{eth} object, part of the global namespace. 4 | 5 | \subsection{Values} 6 | There are no special object types in the API; all values are strings. As strings, values may be of several forms, and are interpreted by the API according to a series of rules: 7 | 8 | \begin{enumerate} 9 | \item If the string contains only digits from 0-9, then it is interpreted as a decimal integer; 10 | \item if the string begins with the characters \texttt{0x}, then it is interpreted as a hexadecimal integer; 11 | \item it is interpreted as a binary string otherwise. 12 | \end{enumerate} 13 | 14 | The only exception to this are for parameters that expect a binary string; in this case the string is always interpreted as such. 15 | 16 | Values are implicitly converted between integers and hashes/byte-arrays; when this happens, integers are interpreted as big-endian as is standard for Ethereum. The following forms are allowed; they are all interpreted in the same way: 17 | 18 | \begin{enumerate} 19 | \item \texttt{"4276803"} 20 | \item \texttt{"0x414243"} 21 | \item \texttt{"ABC"} 22 | \end{enumerate} 23 | 24 | In each case, they are interpreted as the number 4276803. The first two values may be alternated between with the additional String methods \texttt{bin()} and \texttt{unbin()}. 25 | 26 | As byte arrays, values may be concatenated with the \texttt{+} operator as is normal for strings. 27 | 28 | Strings also have a number of additional methods to help with conversion and alignment when switching between addresses, 256-bit integers and free-form byte-arrays for transaction data: 29 | 30 | \begin{itemize} 31 | \item \texttt{bin()}: Converts the string to binary format. 32 | \item \texttt{pad(l)}: Converts the string to binary format (ready for data parameters) and pads with zeroes until it is of width \texttt{l}. Will pad to the left if the original string is numeric, or to the right if binary. If \texttt{l} is less than the width of the string, it is resized accordingly. 33 | \item \texttt{pad(a, b)}: Converts the string to binary format (ready for data parameters) and pads with zeroes on the left size until it is of width \texttt{a}. Then pads with zeroes on the right side until it has grown to size \texttt{b}. If \texttt{b} is less hat the width of the string, it is resized accordingly. 34 | \item \texttt{unbin()}: Converts the string from binary format to hex format. 35 | \item \texttt{unpad()}: Converts the string from binary format to hex format, first removing any zeroes from the right side. 36 | \item \texttt{dec()}: Converts the string to decimal format (typically from hex). 37 | \end{itemize} 38 | 39 | \subsection{The \texttt{eth} object} 40 | 41 | \subsubsection{Properties} 42 | 43 | For each such item, there is also an asynchronous method, taking a parameter of the callback function, itself taking a single parameter of the property's return value and of the same name but prefixed with get and recapitalised, e.g. \texttt{getCoinbase(fn)}. 44 | 45 | \begin{itemize} 46 | \item \texttt{coinbase} Returns the coinbase address of the client. 47 | \item \texttt{isListening} Returns true if and only if the client is actively listening for network connections. 48 | \item \texttt{isMining} Returns true if and only if the client is actively mining new blocks. 49 | \item \texttt{gasPrice} Returns the client's present price of gas. 50 | \item \texttt{key} Returns the special key-pair object corresponding to the preferred account owned by the client. 51 | \item \texttt{keys} Returns a list of the special key-pair objects corresponding to all accounts owned by the client. 52 | \item \texttt{peerCount} Returns the number of peers currently connected to the client. 53 | \end{itemize} 54 | 55 | \subsubsection{Synchronous Getters} 56 | For each such item, there is also an asynchronous method, taking an additional parameter of the callback function, itself taking a single parameter of the synchronous method's return value and of the same name but prefixed with get and recapitalised, e.g. \texttt{getBalanceAt(a, fn)}. 57 | 58 | \begin{itemize} 59 | \item \texttt{balanceAt(a)} Returns the balance of the account of address given by the address \texttt{a}. 60 | \item \texttt{storageAt(a, x)} Returns the value in storage at position given by the number x of the account of address given by the address \texttt{a}. 61 | \item \texttt{txCountAt(a)} Returns the number of transactions send from the account of address given by \texttt{a}. 62 | \item \texttt{isContractAt(a)} Returns true if the account of address given by \texttt{a} has associated code. 63 | \end{itemize} 64 | 65 | \subsubsection{Transactions} 66 | 67 | \begin{itemize} 68 | \item \texttt{create(sec, xEndowment, bCode, xGas, xGasPrice, fn)} Creates a new contract-creation transaction, given parameters: 69 | \begin{itemize} 70 | \item \texttt{sec}, the secret-key for the sender; 71 | \item \texttt{xEndowment}, the number equal to the account's endowment; 72 | \item \texttt{bCode}, the binary string (byte array) of EVM-bytecode for the initialisation of the account; 73 | \item \texttt{xGas}, the number equal to the amount of gas to purchase for the transaction (unused gas is refunded); 74 | \item \texttt{xGasPrice}, the number equal to the price of gas for this transaction. Returns the special address object representing the new account; and 75 | \item \texttt{fn}, the callback function, called on completion of the transaction. 76 | \end{itemize} 77 | \item \texttt{transact(sec, xValue, aDest, bData, xGas, xGasPrice, fn)} Creates a new message-call transaction, given parameters: 78 | \begin{itemize} 79 | \item \texttt{sec}, the secret-key for the sender; 80 | \item \texttt{xValue}, the value transferred for the transaction (in Wei); 81 | \item \texttt{aDest}, the address representing the destination address of the message; 82 | \item \texttt{bData}, the binary string (byte array), containing the associated data of the message; 83 | \item \texttt{xGas}, the amount of gas to purchase for the transaction (unused gas is refunded); 84 | \item \texttt{xGasPrice}, the price of gas for this transaction; and 85 | \item \texttt{fn}, the callback function, called on completion of the transaction. 86 | \end{itemize} 87 | \end{itemize} 88 | 89 | \subsubsection{Events} 90 | 91 | \begin{itemize} 92 | \item \texttt{watch(a, fn)}: Registers \texttt{fn} as a callback for whenever anything about the state of the account at address \texttt{a} changes, and also on the initial load. 93 | \item \texttt{watch(a, x, fn)}: Registers \texttt{fn} as a callback for whenever the storage location \texttt{x} of the account at address \texttt{a} changes, and also on the initial load. 94 | \item \texttt{newBlock(fn)}: Registers \texttt{fn} as a callback for whenever the state changes, and also on the initial load. 95 | \end{itemize} 96 | 97 | \subsubsection{Misc} 98 | 99 | \begin{itemize} 100 | \item \texttt{secretToAddress(a)}: Determines the address from the secret key \texttt{a}. 101 | \end{itemize} 102 | 103 | -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | ## creative commons 2 | 3 | # Attribution-ShareAlike 4.0 International 4 | 5 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 6 | 7 | ### Using Creative Commons Public Licenses 8 | 9 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 10 | 11 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 12 | 13 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 14 | 15 | ## Creative Commons Attribution-ShareAlike 4.0 International Public License 16 | 17 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 18 | 19 | ### Section 1 – Definitions. 20 | 21 | a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 22 | 23 | b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 24 | 25 | c. __BY-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License. 26 | 27 | d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 28 | 29 | e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 30 | 31 | f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 32 | 33 | g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. 34 | 35 | h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 36 | 37 | i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 38 | 39 | j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. 40 | 41 | k. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 42 | 43 | l. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 44 | 45 | m. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 46 | 47 | ### Section 2 – Scope. 48 | 49 | a. ___License grant.___ 50 | 51 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 52 | 53 | A. reproduce and Share the Licensed Material, in whole or in part; and 54 | 55 | B. produce, reproduce, and Share Adapted Material. 56 | 57 | 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 58 | 59 | 3. __Term.__ The term of this Public License is specified in Section 6(a). 60 | 61 | 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 62 | 63 | 5. __Downstream recipients.__ 64 | 65 | A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 66 | 67 | B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. 68 | 69 | C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 70 | 71 | 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 72 | 73 | b. ___Other rights.___ 74 | 75 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 76 | 77 | 2. Patent and trademark rights are not licensed under this Public License. 78 | 79 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. 80 | 81 | ### Section 3 – License Conditions. 82 | 83 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 84 | 85 | a. ___Attribution.___ 86 | 87 | 1. If You Share the Licensed Material (including in modified form), You must: 88 | 89 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 90 | 91 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 92 | 93 | ii. a copyright notice; 94 | 95 | iii. a notice that refers to this Public License; 96 | 97 | iv. a notice that refers to the disclaimer of warranties; 98 | 99 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 100 | 101 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 102 | 103 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 104 | 105 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 106 | 107 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 108 | 109 | b. ___ShareAlike.___ 110 | 111 | In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 112 | 113 | 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 114 | 115 | 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 116 | 117 | 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. 118 | 119 | ### Section 4 – Sui Generis Database Rights. 120 | 121 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 122 | 123 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; 124 | 125 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and 126 | 127 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 128 | 129 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 130 | 131 | ### Section 5 – Disclaimer of Warranties and Limitation of Liability. 132 | 133 | a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ 134 | 135 | b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ 136 | 137 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 138 | 139 | ### Section 6 – Term and Termination. 140 | 141 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 142 | 143 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 144 | 145 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 146 | 147 | 2. upon express reinstatement by the Licensor. 148 | 149 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 150 | 151 | c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 152 | 153 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 154 | 155 | ### Section 7 – Other Terms and Conditions. 156 | 157 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 158 | 159 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.t stated herein are separate from and independent of the terms and conditions of this Public License. 160 | 161 | ### Section 8 – Interpretation. 162 | 163 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 164 | 165 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 166 | 167 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 168 | 169 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 170 | 171 | ``` 172 | Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 173 | 174 | Creative Commons may be contacted at [creativecommons.org](http://creativecommons.org/). 175 | ``` 176 | -------------------------------------------------------------------------------- /Paper.reflib: -------------------------------------------------------------------------------- 1 | 2 | 3 | Biblio.bib 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | cryptoeprint:2013:881 12 | 13 | Misc 14 | 15 | Accelerating Bitcoin’s Transaction Processing. Fast Money Grows on Trees, Not Chains 16 | Sompolinsky, Yonatan and Zohar, Aviv 17 | 18 | 19 | 20 | 21 | 2013 22 | http://eprint.iacr.org/ 23 | Cryptology ePrint Archive, Report 2013/881 24 | 25 | 26 | 27 | 28 | gura2004comparing 29 | 30 | InCollection 31 | 32 | Comparing elliptic curve cryptography and RSA on 8-bit CPUs 33 | Gura, Nils and Patel, Arun and Wander, Arvinderpal and Eberle, Hans and Shantz, Sheueling Chang 34 | 35 | 36 | 37 | 119-132 38 | 2004 39 | Cryptographic Hardware and Embedded Systems-CHES 2004 40 | Springer 41 | 42 | 43 | 44 | 45 | laurie2004proof 46 | 47 | InProceedings 48 | 49 | Proof-of-Work” proves not to work; version 0.2 50 | Laurie, Ben and Clayton, Richard 51 | 52 | 53 | 54 | 55 | 2004 56 | Workshop on Economics and Information, Security 57 | 58 | 59 | 60 | 61 | nakamoto2008bitcoin 62 | 63 | Article 64 | 65 | Bitcoin: A peer-to-peer electronic cash system 66 | Nakamoto, Satoshi 67 | Consulted 68 | 1 69 | 70 | 2012 71 | 2008 72 | 73 | 74 | 75 | 76 | sprankel2013technical 77 | 78 | Misc 79 | 80 | Technical Basis of Digital Currencies 81 | Sprankel, Simon 82 | 83 | 84 | 85 | 86 | 2013 87 | 88 | 89 | 90 | 91 | aron2012bitcoin 92 | 93 | Article 94 | 95 | BitCoin software finds new life 96 | Aron, Jacob 97 | New Scientist 98 | 213 99 | 2847 100 | 20 101 | 2012 102 | Elsevier 103 | 104 | 105 | 106 | 107 | mastercoin2013willett 108 | 109 | article 110 | 111 | MasterCoin Complete Specification 112 | J. R. Willett 113 | 114 | 115 | 116 | 117 | 2013 118 | https://github.com/mastercoin-MSC/spec 119 | 120 | 121 | 122 | 123 | colouredcoins2012rosenfeld 124 | 125 | article 126 | 127 | Overview of Colored Coins 128 | Meni Rosenfeld 129 | 130 | 131 | 132 | 133 | 2012 134 | https://bitcoil.co.il/BitcoinX.pdf 135 | 136 | 137 | 138 | 139 | boutellier2014pirates 140 | 141 | incollection 142 | 143 | Pirates, Pioneers, Innovators and Imitators 144 | Boutellier, Roman and Heinzen, Mareike 145 | 146 | 147 | 148 | 85-96 149 | 2014 150 | Growth Through Innovation 151 | Springer 152 | 153 | 154 | 155 | 156 | szabo1997formalizing 157 | 158 | Article 159 | 160 | Formalizing and securing relationships on public networks 161 | Szabo, Nick 162 | First Monday 163 | 2 164 | 9 165 | 166 | 1997 167 | 168 | 169 | 170 | 171 | miller1997future 172 | 173 | InProceedings 174 | 175 | The Future of Law 176 | Miller, Mark 177 | 178 | 179 | 180 | 181 | 1997 182 | paper delivered at the Extro 3 Conference (August 9) 183 | 184 | 185 | 186 | 187 | buterin2013ethereum 188 | 189 | article 190 | 191 | Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform 192 | Vitalik Buterin 193 | 194 | 195 | 196 | 197 | 2013 198 | http://ethereum.org/ethereum.html 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ethereum Yellow Paper 2 | 3 | [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/) 4 | [![Gitter](https://badges.gitter.im/ethereum/yellowpaper.svg)](https://gitter.im/ethereum/yellowpaper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 5 | [![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/ethereum/yellowpaper/badge)](https://www.gitpoap.io/gh/ethereum/yellowpaper) 6 | 7 | The Yellow Paper is a formal definition of the Ethereum protocol, originally by Gavin Wood, currently maintained by Andrew Ashikhmin and with contributions from many people around the world. 8 | 9 | It is a free culture work, licensed under Creative Commons Attribution Share-Alike (CC-BY-SA) Version 4.0. 10 | 11 | ## Repository Currently Outdated 12 | 13 | The Yellow Paper is out of date. It reflects the Ethereum specification up to the [Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) network upgrade, activated on the Ethereum mainnet at block `17_034_870` (April 2023). 14 | 15 | It does **not** yet contain changes introduced by the Cancun upgrade. 16 | 17 | An alternative [Python Execution Layer specification](https://ethereum.github.io/execution-specs/) is actively maintained and up to date. 18 | 19 | ## Usage 20 | 21 | If you just want to read the paper, the latest version is generally available as a PDF at https://ethereum.github.io/yellowpaper/paper.pdf. If you find that the borders for links block too much text when viewing the PDF in the browser, you can instead download it and open and view it with a PDF viewer application such as Adobe Acrobat or Evince, where the borders are less likely to display over text. 22 | 23 | However, if you want to edit the paper, then read on. The paper comes as a single ``latex`` file ``Paper.tex``. 24 | 25 | It is recommended to use an IDE such as [Visual Studio Code](https://code.visualstudio.com/) with the LaTeX Workshop extension, to edit the tex file, and show the PDF. 26 | 27 | Another option is to separately edit the `tex` file and build as follows (you'll still need to clone the repo then open the yellowpaper folder): 28 | 29 | ``` 30 | git clone https://github.com/ethereum/yellowpaper.git 31 | cd yellowpaper 32 | ./build.sh 33 | ``` 34 | This will create a PDF version of the Yellow Paper. Following building, you can also use standard `pdflatex` tools for compiling/preview, like http://latex.informatik.uni-halle.de/latex-online/latex.php. 35 | 36 | ## Tips on editing 37 | 38 | You can use [TeX Stack Exchange](https://tex.stackexchange.com/); https://en.wikibooks.org/wiki/LaTeX/ (e.g. [Bibliography Management](https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management) and [Hyperlinks](https://en.wikibooks.org/wiki/LaTeX/Hyperlinks)); and [BibTeX editor](http://truben.no/latex/bibtex/). 39 | 40 | ## Versions 41 | 42 | The previous protocol versions are listed in [BRANCHES.md](./BRANCHES.md). 43 | 44 | ### Other language versions 45 | - [Chinese](https://github.com/yuange1024/ethereum_yellowpaper) translated by YuanGe and GaoTianlu. 46 | - [French](https://github.com/asseth/yellowpaper) translated by Asseth (checkout to branch 'french' ). 47 | - [Vietnamese](https://github.com/kodyfanz/ethereum_yellowpaper_vn) translated by KodyFanz (checkout to branch 'vietnamese'). 48 | -------------------------------------------------------------------------------- /Wire.tex: -------------------------------------------------------------------------------- 1 | \section{Wire Protocol}\label{app:wire} 2 | The wire-protocol specifies a network-level protocol for how two peers can communicate. It includes handshake procedures and the means for transferring information such as peers, blocks and transactions. Peer-to-peer communications between nodes running Ethereum clients are designed to be governed by a simple wire-protocol making use of existing Ethereum technologies and standards such as RLP wherever practical. 3 | 4 | Ethereum nodes may connect to each other over TCP only. Peers are free to advertise and accept connections on any port(s) they wish, however, a default port on which the connection may be listened and made will be 30303. 5 | 6 | Though TCP provides a connection-oriented medium, Ethereum nodes communicate in terms of packets. These packets are formed as a 4-byte synchronisation token (0x22400891), a 4-byte "payload size", to be interpreted as a big-endian integer and finally an N-byte \textbf{RLP-serialised} data structure, where N is the aforementioned "payload size". To be clear, the payload size specifies the number of bytes in the packet ''following'' the first 8. 7 | 8 | There are a number of different types of message that may be sent. This ``type'' is always determined by the first entry of the structure, represented as a scalar. The structure of each message type is described below. 9 | 10 | \begin{tabular*}{\columnwidth}[h]{rlll} 11 | \toprule 12 | \multicolumn{4}{c}{\textbf{00s: Session control}} \vspace{5pt} \\ 13 | \textbf{Value} & \textbf{Mnemonic} & \textbf{Expected Reply} & \textbf{Packet Format} \vspace{5pt} \\ 14 | 0x00 & \textsc{Hello} & & $(\text{0x}00, v \in \mathbb{P}, n \in \mathbb{P}, \mathbf{i} \in \mathbb{B}, c \in \mathbb{P}, p \in \mathbb{P}, u \in \mathbb{B}_{64})$ \\ 15 | & \multicolumn{3}{p{0.8\columnwidth}}{ 16 | This is the first packet sent over the connection, and sent once by both sides. No other messages may be sent until a \textsc{Hello} is received. 17 | \begin{itemize} 18 | \item $v$ is the Protocol Version. See the latest documentation for which version is current. 19 | \item $n$ is the Network Id should be 0. 20 | \item $\mathbf{i}$ is the Client Id and specifies the client software identity as a human-readable string (e.g. ``Ethereum(++)/1.0.0''). 21 | \item $c$ is the client's Capabilities and specifies the capabilities of the client as a set of flags; presently three bits are used: 22 | \begin{description} 23 | \item[0x01] Client provides peer discovery service; 24 | \item[0x02] Client provides transaction relaying service; 25 | \item[0x04] Client provides block-chain querying service. 26 | \end{description} 27 | \item $p$ is the Listen Port and specifies the port that the client is listening on (on the interface that the present connection traverses). If 0 it indicates the client is not listening. 28 | \item $u$ is the Unique Identity of the node and specifies a 512-bit hash that identifies this node. 29 | \end{itemize} 30 | }\\ 31 | \midrule 32 | 0x01 & \textsc{Disconnect} && $(\text{0x}01, r \in \mathbb{P})$ \\ 33 | & \multicolumn{3}{p{0.8\columnwidth}}{ 34 | Inform the peer that a disconnection is imminent; if received, a peer should disconnect immediately. When sending, well-behaved hosts give their peers a fighting chance (read: wait 2 seconds) to disconnect to before disconnecting themselves. 35 | \begin{itemize} 36 | \item $r$ is an integer specifying one of a number of reasons for disconnect: 37 | \begin{description} 38 | \item[0x00] Disconnect requested; 39 | \item[0x01] TCP sub-system error; 40 | \item[0x02] Bad protocol; 41 | \item[0x03] Useless peer; 42 | \item[0x04] Too many peers; 43 | \item[0x05] Already connected; 44 | \item[0x06] Incompatible network protocols; 45 | \item[0x07] Client quitting. 46 | \end{description} 47 | \end{itemize} 48 | }\\ 49 | \midrule 50 | 0x02 & \textsc{Ping} & \textsc{Pong} & $(\text{0x}02)$ \\ 51 | & \multicolumn{3}{p{0.8\columnwidth}}{Requests an immediate reply of \textsc{Pong} from the peer.}\\ 52 | \midrule 53 | 0x03 & \textsc{Pong} && $(\text{0x}03)$ \\ 54 | & \multicolumn{3}{p{0.8\columnwidth}}{Reply to peer's \textsc{Ping} packet.}\\ 55 | \bottomrule 56 | \end{tabular*} 57 | 58 | 59 | \begin{tabular*}{\columnwidth}[h]{rlll} 60 | \toprule 61 | \multicolumn{4}{c}{\textbf{10s: Information}} \vspace{5pt} \\ 62 | \textbf{Value} & \textbf{Mnemonic} & \textbf{Expected Reply} & \textbf{Packet Format} \vspace{5pt} \\ 63 | 0x10 & \textsc{GetPeers} & \textsc{Peers} & $(\text{0x}10)$ \\ 64 | & \multicolumn{3}{p{0.8\columnwidth}}{Request the peer to enumerate some known peers for us to connect to. This should include the peer itself.}\\ 65 | \midrule 66 | 0x11 & \textsc{Peers} & & $(\text{0x}11, (a_0 \in \mathbb{B}_4, p_0 \in \mathbb{P}, i_0 \in \mathbb{B}_{64}), (a_1 \in \mathbb{B}_4, p_1 \in \mathbb{P}, i_1 \in \mathbb{B}_{64}), ...)$ \\ 67 | & \multicolumn{3}{p{0.8\columnwidth}}{ 68 | Specifies a number of known peers. 69 | \begin{itemize} 70 | \item $a_0$, $a_1$, ... is the node's IPv4 address, a 4-byte array that should be interpreted as the IP address $a_0[0]$.$a_0[1]$.$a_0[2]$.$a_0[3]$. 71 | \item $p_0$, $p_1$, ... is the node's Port and is an integer. 72 | \item $i_0$, $i_1$, ... is the node's Unique Identifier and is the 512-bit hash that serves to identify the node. 73 | \end{itemize} 74 | }\\ 75 | \midrule 76 | 0x12 & \textsc{Transactions} & & $(\text{0x}12, L_T(T_0), L_T(T_1), ...)$ \\ 77 | & \multicolumn{3}{p{0.8\columnwidth}}{ 78 | where $L_T$ is the transaction preparation function, as specified in section \ref{ch:block}. 79 | 80 | Specify a transaction or transactions that the peer should make sure is included on its transaction queue. The items in the list (following the first item 0x12) are transactions in the format described in the main Ethereum specification. 81 | \begin{itemize} 82 | \item $T_0$, $T_1$, ... are the transactions that should be assimilated. 83 | \end{itemize} 84 | }\\ 85 | \midrule 86 | 0x13 & \textsc{Blocks} && $(\text{0x}13, L_B(b_0), L_B(b_1), ...)$ \\ 87 | & \multicolumn{3}{p{0.8\columnwidth}}{ 88 | Where $L_B$ is the block preparation function, as specified in section \ref{ch:block}. 89 | 90 | Specify a block or blocks that the peer should know about. The items in the list (following the first item, 0x13) are blocks as described in the format described in the main specification. 91 | \begin{itemize} 92 | \item $b_0$, $b_1$, ... are the blocks that should be assimilated. 93 | \end{itemize} 94 | }\\ 95 | \midrule 96 | 0x14 & \textsc{GetChain} & \textsc{Blocks} or \textsc{NotInChain} & $(\text{0x}14, p_0 \in \mathbb{B}_{32}, p_1 \in \mathbb{B}_{32}, ..., c \in \mathbb{P})$ \\ 97 | & \multicolumn{3}{p{0.8\columnwidth}}{ 98 | Request the peer to send $c$ blocks in the current canonical block chain that are children of one of a number of given blocks, according to a preferential order with $p_0$ being the most prefered. If the designated parent is the present block chain head, an empty reply should be sent. If none of the parents are in the current canonical block chain, then a NotInChain message should be sent along with $p_n$, the least preferential parent. If no parents are passed, then a reply need not be made. 99 | \begin{itemize} 100 | \item $p_0$, $p_1$, ... are the SHA3 hashes of the parents of blocks that we should be informed of with a \textsc{Blocks} reply. Typically, these will be specified in increasing age (or decreasing block number). 101 | \item $c$ is the number of children blocks of the most preferred parent that we should be informed of through the corresponding \textsc{Blocks} reply. 102 | \end{itemize} 103 | }\\ 104 | \midrule 105 | 0x15 & \textsc{NotInChain} && $(\text{0x}15, p \in \mathbb{B}_{32})$ \\ 106 | & \multicolumn{3}{p{0.8\columnwidth}}{Inform the peer that a particular block was not found in its block chain. 107 | \begin{itemize} 108 | \item $p$ is the SHA3 hash of the block that was not found in the block chain. Typically, this will be the least preferential (oldest) block hash given in a previous \textsc{GetChain} message. 109 | \end{itemize} 110 | }\\ 111 | \midrule 112 | 0x16 & \textsc{GetTransactions} & \textsc{Transactions} & $(\text{0x}16)$ \\ 113 | & \multicolumn{3}{p{0.8\columnwidth}}{Request the peer to send all transactions currently in the queue. See \textsc{Transactions}.}\\ 114 | \bottomrule 115 | \end{tabular*} 116 | 117 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## 4 | ## Usage: build.sh [white] 5 | ## 6 | 7 | 8 | set -e 9 | 10 | rm -rf Options.tex 11 | 12 | if [ -d ".git" ]; then 13 | 14 | SHA=`git rev-parse --short --verify HEAD` 15 | DATE=`git show -s --format="%cd" --date=short HEAD` 16 | REV="$SHA -- $DATE" 17 | echo "\def\YellowPaperVersionNumber{$REV}" >> Options.tex 18 | 19 | fi 20 | 21 | 22 | if [ "$1" == "white" ]; then 23 | 24 | echo "\definecolor{pagecolor}{rgb}{1,1,1}" >> Options.tex 25 | 26 | fi 27 | 28 | 29 | 30 | echo "\newcommand{\YellowPaperVersionNumber}{$REV}" > Version.tex 31 | 32 | if grep '=========' Paper.tex 33 | then 34 | echo "merge conflict?" 35 | exit 1 36 | fi 37 | 38 | mkdir -p build 39 | pdflatex -output-directory=build -interaction=errorstopmode -halt-on-error Paper.tex && \ 40 | bibtex build/Paper && \ 41 | pdflatex -output-directory=build -interaction=errorstopmode -halt-on-error Paper.tex && \ 42 | pdflatex -output-directory=build -interaction=errorstopmode -halt-on-error Paper.tex && \ 43 | pdflatex -output-directory=build -interaction=errorstopmode -halt-on-error Paper.tex && \ 44 | rm -rf Options.tex 45 | -------------------------------------------------------------------------------- /cancel.sty: -------------------------------------------------------------------------------- 1 | % cancel.sty version 2.2 12-Apr-2013. 2 | % Donald Arseneau asnd@triumf.ca 3 | % This software is contributed to the public domain by its author, 4 | % who disclaims all copyrights. For people and jurisdictions that 5 | % do not recognize contribution to the public domain, this software 6 | % is licensed by the terms of the unlicense, . 7 | % 8 | % Commands: 9 | % ~~~~~~~~~ 10 | % \cancel draws a diagonal line (slash) through its argument. 11 | % \bcancel uses the negative slope (a backslash). 12 | % \xcancel draws an X (actually \cancel plus \bcancel). 13 | % \cancelto{}{} draws a diagonal arrow through the 14 | % expression, pointing to the value. 15 | % 16 | % The first three work in math and text mode, but \cancelto is only 17 | % for math mode. 18 | % The slope of the line or arrow depends on what is being cancelled. 19 | % 20 | % Options: 21 | % ~~~~~~~~ 22 | % By default, none of these commands affects the horizontal spacing, 23 | % so they might over-print neighboring parts of the formula (or text). 24 | % They do add their height to the expression, so there should never be 25 | % unintended vertical overlap. There is a package option [makeroom] to 26 | % increase the horizontal spacing to make room for the cancellation value. 27 | % 28 | % If you use the color package, then you can declare 29 | % \renewcommand{\CancelColor}{} 30 | % and the cancellation marks will be printed in that color (e.g., \blue). 31 | % However, if you are using color, I recommend lightly shaded blocks rather 32 | % than diagonal arrows for cancelling. 33 | % 34 | % The option [thicklines] asks for heavier lines and arrows. This may be 35 | % useful when the lines are colored a light shade. 36 | % 37 | % The size (math style) of the \cancelto value depends on package options 38 | % according to this table: 39 | % 40 | % Current style [samesize] [smaller] [Smaller] 41 | % ------------- ---------------- ---------------- ---------------- 42 | % \displaystyle \displaystyle \textstyle \scriptstyle 43 | % \textstyle \textstyle \scriptstyle \scriptstyle 44 | % \scriptstyle \scriptstyle \scriptscriptstyle \scriptscriptstyle 45 | % \scriptscriptstyle \scriptscriptstyle \scriptscriptstyle \scriptscriptstyle 46 | % 47 | % ("smaller" is the default behavior. It gives textstyle limits in 48 | % displaystyle, whereas "Smaller" gives scriptstyle limits.) 49 | % 50 | % This package is provided without guarantees or support. Drawing slashes 51 | % through math to indicate "cancellation" is poor design. I don't recommend 52 | % that you use this package at all. 53 | 54 | \ProvidesPackage{cancel}[2013/04/12 v2.2 Cancel math terms] 55 | 56 | \newcommand{\CancelColor}{} 57 | \newcommand{\cancelto}{1}% default option = smaller 58 | \let\canto@fil\hidewidth 59 | \let\canc@thinlines\thinlines 60 | 61 | \DeclareOption{samesize}{\def\cancelto{999}} 62 | \DeclareOption{smaller}{\def\cancelto{1}} 63 | \DeclareOption{Smaller}{\def\cancelto{0}} 64 | \DeclareOption{makeroom}{\def\canto@fil{\hfil}} 65 | \DeclareOption{overlap}{\let\canto@fil\hidewidth} 66 | \DeclareOption{thicklines}{\let\canc@thinlines\thicklines} 67 | 68 | \ProcessOptions 69 | 70 | \DeclareRobustCommand\cancel[1]{\ifmmode 71 | \mathpalette{\@cancel{\@can@slash{}}}{#1}\else 72 | \@cancel{\@can@slash{}}\hbox{#1}\fi} 73 | \DeclareRobustCommand\bcancel[1]{\ifmmode 74 | \mathpalette{\@cancel{\@can@slash{-}}}{#1}\else 75 | \@cancel{\@can@slash{-}}\hbox{#1}\fi} 76 | \DeclareRobustCommand\xcancel[1]{\ifmmode 77 | \mathpalette{\@cancel{\@can@slash{+}\@can@slash{-}}}{#1}\else 78 | \@cancel{\@can@slash{+}\@can@slash{-}}\hbox{#1}\fi} 79 | 80 | \newcommand\@cancel[3]{% 81 | \OriginalPictureCmds\@begin@tempboxa\hbox{\m@th$#2{#3}$}% 82 | \dimen@\height 83 | \setbox\@tempboxa\hbox{$\m@th\vcenter{\box\@tempboxa}$}% 84 | \advance\dimen@-\height % the difference in height 85 | \unitlength\p@ \canc@thinlines 86 | {\/\raise\dimen@\hbox{\ooalign{#1\hfil\box\@tempboxa\hfil \cr}}}% 87 | \@end@tempboxa 88 | } 89 | 90 | \def\@can@slash#1{\canto@fil$\m@th \CancelColor\vcenter{\hbox{% 91 | \dimen@\width \@min@pt\dimen@ 2\@min@pt\totalheight6% 92 | \ifdim\totalheight<\dimen@ % wide 93 | \@min@pt\dimen@ 8% 94 | \@tempcnta\totalheight \multiply\@tempcnta 5 \divide\@tempcnta\dimen@ 95 | \advance\dimen@ 2\p@ % "+2" 96 | \edef\@tempa{(\ifcase\@tempcnta 6,#11\or 4,#11\or 2,#11\or 4,#13\else 1,#11\fi 97 | ){\strip@pt\dimen@}}% 98 | \else % tall 99 | \@min@pt\totalheight8% 100 | \advance\totalheight2\p@ % "+2" 101 | \@tempcnta\dimen@ \multiply\@tempcnta 5 \divide\@tempcnta\totalheight 102 | \dimen@ \ifcase\@tempcnta .16\or .25\or .5\or .75\else 1\fi \totalheight 103 | \edef\@tempa{(\ifcase\@tempcnta 1,#16\or 1,#14\or 1,#12\or 3,#14\else 1,#11\fi 104 | ){\strip@pt\dimen@}}% 105 | \fi 106 | \expandafter\line\@tempa}}$\canto@fil \cr} 107 | 108 | \ifcase\cancelto 109 | \def\cancelto#1#2{\mathchoice % Smaller option 110 | {\@cancelto\scriptstyle{#1}\displaystyle{#2}}% 111 | {\@cancelto\scriptstyle{#1}\textstyle{#2}}% 112 | {\@cancelto\scriptscriptstyle{#1}\scriptstyle{#2}}% 113 | {\@cancelto\scriptscriptstyle{#1}\scriptscriptstyle{#2}}% 114 | } 115 | \or 116 | \def\cancelto#1#2{\mathchoice % smaller option (default) 117 | {\@cancelto\textstyle{#1}\displaystyle{#2}}% 118 | {\@cancelto\scriptstyle{#1}\textstyle{#2}}% 119 | {\@cancelto\scriptscriptstyle{#1}\scriptstyle{#2}}% 120 | {\@cancelto\scriptscriptstyle{#1}\scriptscriptstyle{#2}}% 121 | } 122 | \else 123 | \def\cancelto#1#2{\mathchoice % samesize option 124 | {\@cancelto\textstyle{#1}\displaystyle{#2}}% 125 | {\@cancelto\textstyle{#1}\textstyle{#2}}% 126 | {\@cancelto\scriptstyle{#1}\scriptstyle{#2}}% 127 | {\@cancelto\scriptscriptstyle{#1}\scriptscriptstyle{#2}}% 128 | } 129 | \fi 130 | 131 | \newcommand\@cancelto[4]{% 132 | \OriginalPictureCmds\@begin@tempboxa\hbox{\m@th$#3{#4}$}% 133 | \dimen@\width % wide 134 | \@min@pt\dimen@ 2\@min@pt\totalheight4 135 | \ifdim\totalheight<\dimen@ 136 | \@tempcnta\totalheight \multiply\@tempcnta 5 \divide\@tempcnta\dimen@ 137 | \@tempdimb 3\p@ % extra width for arrowhead ("+2") 138 | \advance\dimen@ \ifcase\@tempcnta 5\or 5\or 4\or 3\else 2\fi \p@ 139 | \@min@pt\dimen@9\advance\dimen@\p@ 140 | \edef\@tempa{\ifcase\@tempcnta 5441\or 5441\or 5421\or 4443\else 3611\fi 141 | {\strip@pt\dimen@}{\strip@pt\@tempdimb}}% 142 | \def\@tempb{Cancel #4 to #2; case wide }% 143 | \else % tall 144 | \advance\totalheight3\p@ % "+2" 145 | \@tempcnta\dimen@ \multiply\@tempcnta 5 \divide\@tempcnta\totalheight 146 | \advance\totalheight3\p@ % "+2" 147 | \dimen@ \ifcase\@tempcnta .25\or .25\or .5\or .75\else 1\fi \totalheight 148 | \@tempdimb \ifcase\@tempcnta .8\or .8\or 1.2\or 1.5\else 2\fi \p@ 149 | \edef\@tempa{\ifcase\@tempcnta 0814\or 0814\or 1812\or 2734\else 3611\fi 150 | {\strip@pt\dimen@}{\strip@pt\@tempdimb}}% 151 | \fi 152 | \dimen@\height 153 | \setbox\@tempboxa\hbox{$\m@th\vcenter{\box\@tempboxa}$}% 154 | \advance\dimen@-\height % the difference in height 155 | \unitlength\p@ \canc@thinlines 156 | {\/\raise\dimen@\hbox{\expandafter\canto@vector\@tempa{#1}{#2}}}% 157 | \@end@tempboxa 158 | } 159 | 160 | % #1, #2 offset of label #6 extra width to clear arrowhead 161 | % #3, #4 vector direction #7 superscript label style 162 | % #5 vector width #8 superscript label 163 | \def\canto@vector#1#2#3#4#5#6#7#8{% 164 | \dimen@.5\p@ 165 | \setbox\z@\vbox{\boxmaxdepth.5\p@ 166 | \hbox{\kern-1.2\p@\kern#1\dimen@$#7{#8}\m@th$}}% 167 | \ifx\canto@fil\hidewidth \wd\z@\z@ \else \kern-#6\unitlength \fi 168 | \ooalign{% 169 | \canto@fil$\m@th \CancelColor 170 | \vcenter{\hbox{\dimen@#6\unitlength \kern\dimen@ 171 | \multiply\dimen@#4\divide\dimen@#3 \vrule\@depth\dimen@\@width\z@ 172 | \vector(#3,#4){#5}% 173 | }}^{\raise#2\dimen@\copy\z@\kern-\scriptspace}$% 174 | \canto@fil \cr 175 | \hfil \box\@tempboxa \kern\wd\z@ \hfil \cr}} 176 | 177 | \def\@min@pt#1#2{\ifdim#1<#2\p@ #1#2\p@ \relax\fi} 178 | 179 | % pict2e removes bounding box from line and vector, so use original 180 | % versions by declaring \OriginalPictureCmds; make it a no-op if undefined 181 | 182 | \@ifundefined{OriginalPictureCmds}{\let\OriginalPictureCmds\relax}{} 183 | 184 | % Sometime maybe find a better solution that uses all slopes with pict2e 185 | -------------------------------------------------------------------------------- /deploykey.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/yellowpaper/efc5f9a1f356cba376c978eedb63cb0363c2aa85/deploykey.enc -------------------------------------------------------------------------------- /travis_deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | SHA=`git rev-parse --verify HEAD` 6 | 7 | git config user.name "$COMMIT_AUTHOR" 8 | git config user.email "$COMMIT_AUTHOR_EMAIL" 9 | git checkout --orphan gh-pages 10 | git rm --cached -r . 11 | echo "# Automatic build" > README.md 12 | echo "Built pdf from \`$SHA\`. See https://github.com/ethereum/yellowpaper/ for details." >> README.md 13 | echo "The generated pdf is here: https://ethereum.github.io/yellowpaper/paper.pdf" >> README.md 14 | echo '' > index.html 15 | mv build/Paper.pdf paper.pdf 16 | git add -f README.md index.html paper.pdf 17 | git commit -m "Built pdf from {$SHA}." 18 | 19 | ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" 20 | ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" 21 | ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} 22 | ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} 23 | openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in deploykey.enc -out deploykey -d 24 | chmod 600 deploykey 25 | eval `ssh-agent -s` 26 | ssh-add deploykey 27 | 28 | git push -f "$PUSH_REPO" gh-pages 29 | --------------------------------------------------------------------------------