Bitget App
Trade smarter
Buy cryptoMarketsTradeFuturesCopyBotsEarn
Vitalik’s latest article: Inside Circle STARKs

Vitalik’s latest article: Inside Circle STARKs

BlockBeats2024/07/24 05:21
By:BlockBeats
Original title: Exploring circle STARKs
Original author: Vitalik Buterin,
Original translator: Kurt Pan, XPTY


This article assumes that you are familiar with the basics of how SNARKs and STARKs work; if you are not, I recommend reading the first few sections of this article. Special thanks to Eli ben-Sasson, Shahar Papini, Avihu Levy and others at starkware for feedback and discussions.


· https://vitalik.eth.limo/general/2024/04/29/binius.html


· https://en.wikipedia.org/wiki/Karatsuba_algorithm


· https://polygon.technology/blog/plonky2-a-deep-dive


· https://blog.icme.io/small-fields-for-zero-knowledge/


Vitalik’s latest article: Inside Circle STARKs image 0


This shift has already resulted in massive speedups in proofs, most notably Starkware being able to prove 620,000 Poseidon2 hashes per second on an M3 laptop. What this means in concrete terms is that, as long as we’re willing to trust Poseidon2 as part of the hash function, one of the hardest parts of building an efficient ZK-EVM is already efficiently solved. But how do these techniques work, and how are cryptographic proofs (which typically require large integers for security) constructed over these domains? And how do these protocols compare to more exotic constructions like Binius? This post will explore some of these subtleties, with a particular focus on a construction called Circle STARKs (implemented in Starkware’s stwo, Polygon’s plonky3, and my own python implementation), which have some unique properties designed to be compatible with efficient Mersenne31 domains.


Common Problems with Small Domains


One of the most important "tricks" when doing hash-based proofs (or really any kind of proofs) is to replace proving something about the underlying polynomial with proving something about the evaluation of the polynomial at a random point.


Vitalik’s latest article: Inside Circle STARKs image 1


· https://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic


Vitalik’s latest article: Inside Circle STARKs image 2


There are two natural solutions to this problem:


· Perform multiple random tests

· Expand the domain


Vitalik’s latest article: Inside Circle STARKs image 3


· https://www2.clarku.edu/faculty/djoyce/complex/mult.html


Vitalik’s latest article: Inside Circle STARKs image 4


This implementation is not optimal (you can use Karatsuba Optimization), just showing the principle


Vitalik’s latest article: Inside Circle STARKs image 5


Conventional FRI


Vitalik’s latest article: Inside Circle STARKs image 6


Vitalik’s latest article: Inside Circle STARKs image 7


· https://eccc.weizmann.ac.il/report/2017/134/


Vitalik’s latest article: Inside Circle STARKs image 8


Vitalik’s latest article: Inside Circle STARKs image 9


Vitalik’s latest article: Inside Circle STARKs image 10


Circle FRI


Vitalik’s latest article: Inside Circle STARKs image 11


· https://elibensasson.blog/why-im-excited-by-circle-stark-and-stwo/ Vitalik’s latest article: Inside Circle STARKs image 12 These points obey the addition law, which may look familiar to you if you’ve studied trigonometry or complex number multiplication recently: - https://unacademy.com/content/cbse-class-11/study-material/mathematics/algebra-of-complex-numbers-multiplication/


Vitalik’s latest article: Inside Circle STARKs image 13


Vitalik’s latest article: Inside Circle STARKs image 14


Vitalik’s latest article: Inside Circle STARKs image 15


Vitalik’s latest article: Inside Circle STARKs image 16


From the second round onwards, the mapping changes:


Vitalik’s latest article: Inside Circle STARKs image 17


Circle FFTs


Vitalik’s latest article: Inside Circle STARKs image 18


· https://vitalik.eth.limo/general/2019/05/12/fft.html Vitalik’s latest article: Inside Circle STARKs image 19 Vitalik’s latest article: Inside Circle STARKs image 20 https://www.researchgate.net/publication/353344649_Elliptic_Curve_Fast_Fourier_Transform_ECFFT_Part_I_Fast_Polynomial_Algorithms_over_all_Finite_Fields From here, let’s get into some of the more esoteric details that will be different for someone implementing a circle STARK compared to a regular STARK. Vitalik’s latest article: Inside Circle STARKs image 21 Vitalik’s latest article: Inside Circle STARKs image 22 · https://eprint.iacr.org/2019/336 Vitalik’s latest article: Inside Circle STARKs image 23 Vitalik’s latest article: Inside Circle STARKs image 24 Vanishing Polynomials Vitalik’s latest article: Inside Circle STARKs image 25 Reversing Bit Order Vitalik’s latest article: Inside Circle STARKs image 26 Vitalik’s latest article: Inside Circle STARKs image 27 Vitalik’s latest article: Inside Circle STARKs image 28 Efficiency Vitalik’s latest article: Inside Circle STARKs image 29 So circle STARKs are actually pretty close to optimal! Binius is even more powerful because it allows mixing and matching fields of different sizes, giving more efficient bit packing for everything. Binius also provides the option to perform 32-bit additions without the overhead of a lookup table. However, these gains come at the cost of (in my opinion) significantly higher theoretical complexity, whereas circle STARKs (and regular STARKs based on BabyBear) are conceptually quite simple.


Conclusion: What do I think of circle STARKs?


Circle STARKs don’t introduce a lot of additional complexity to developers compared to regular STARKs. In implementing, the three issues above are basically the only differences I see compared to regular FRI. The math behind the “polynomials” that Circle FRI operates on is quite counter-intuitive and takes a while to understand and appreciate. But it happens that this complexity is hidden so that developers don’t see it too much. The complexity of Circle math is encapsulated, not systematic.


Understanding circle FRI and circle FFT is also a good intellectual gateway to understanding other “exotic FFTs”: most notably the binary domain FFT, previously used in Binius and LibSTARK, but also more exotic constructions like the elliptic curve FFT, which uses a few-to-one mappings that play nicely with elliptic curve point operations.


By combining Mersenne31, BabyBear, and binary domain techniques like Binius, we do feel like we are approaching the limits of STARK "base layer" efficiency. At this point in time, I expect the forefront of STARK optimization to shift to the most efficient arithmeticization of primitives like hash functions and signatures (and optimizing these primitives themselves for this purpose), recursive constructions to unlock more parallelization, arithmeticization of virtual machines to improve developer experience, and other upper-level tasks.


Original link


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群: https://t.me/theblockbeats

Telegram 交流群: https://t.me/BlockBeats_App

Twitter 官方账号: https://twitter.com/BlockBeatsAsia

0

Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.

PoolX: Locked for new tokens.
APR up to 10%. Always on, always get airdrop.
Lock now!

You may also like

Navigating Crypto Volatility: How Bitcoin and Altcoins Influence Your Trading Choices

Understanding the Impact of Market Volatility on Crypto Trading: A Look at the Risk and Reward in Bitcoin and Altcoins

Coineagle2025/03/14 23:00

Bitcoin Plunge Signals Opportunity to Buy as USDT Flow Peaks in Six Months

Analyzing Stablecoin Spikes amid Bitcoin's Decline: A Sign of Impending Rally or a Word of Caution?

Coineagle2025/03/14 23:00

Keeping Faith in Bitcoin: Unraveling the 2017 Cycle and the Power of HODLing Strategy

Identifying Parallels Between BTC's Current Trends and Its Performance Four Years Prior - Should Investors Hold Firm or Alter Approaches?

Coineagle2025/03/14 23:00