Cointime

Download App
iOS & Android

Why Cairo 1.0 ?

Validated Project

Source: https://hackmd.io/@abdelhamid/stark-at-home-why-cairo-1

In a recent Stark @ Home Episode named Why Cairo 1.0 ?, the creators of Cairo programming language came together to discuss their vision for the future of Layer 2 scaling solutions. The episode featured a thorough conversation between:

  • Vitalik Buterin, the co-founder of Ethereum
  • Eli Ben-Sasson, ZK-STARK Co-Inventor and Co-Founder of StarkWare
  • Lior Goldberg, StarkWare engineer and co creator of Cairo
  • Shahar Papini, StarkWare engineer co creator of Cairo
  • Ori Ziv, StarkWare co creator of Sierra

Throughout the discussion, the panelists covered various aspects of StarkNet, Cairo, Sierra, and the ongoing improvements and optimizations of these technologies.

5 quotes from the Stark @ Home Episode - Why Cairo 1.0?

- Vitalik: "Level one is Cairo assembly, the base language that gets proven. Sierra adds safety and Cairo 1.0 adds Expressivity."

- Eli: "Making the proof ZK is relatively easy. Designing for a general purpose computation that is meaningful and composable is much harder."

- Lior: "With Cairo, you don't need to be a ZK expert to start writing programs."

- Shahar: "Sierra is an intermediate representation that allows us to make sure that the Cairo programs are consistently provable, addressing issues like reverted transactions, unsatisfiable AIRs, and DOS attacks."

- Ori: "Typed Starknet adds type safety, enabling better resource management & efficiency."

This post summarizes the main points of the webinar.

StarkNet: A Layer 2 Scaling Solution

StarkNet is a Layer 2 scaling solution designed to improve transaction throughput on Ethereum. The platform employs zk-STARKS, an advanced zero-knowledge proof technology, to enhance scalability and maintain strong security guarantees. The webinar offered a detailed introduction to Cairo and Sierra, two programming languages specifically developed for StarkNet.

Cairo: A High-Level Language for StarkNet

Cairo is a high-level programming language designed to make it easier for developers to write contracts and applications for StarkNet. It features a memory model and syntax that closely resemble conventional programming languages. During the webinar, the panelists discussed ongoing improvements and optimizations to Cairo, including:

  • Enhancements to the language for convenience and usability
  • Efforts to improve the efficiency of compiling Cairo to Sierra

Sierra: An intermediate representation bringing Safety

Sierra is designed to enhance the safety of the language, allowing the construction of Cairo programs that are consistently provable.

The addition of an extra layer between user-written Cairo 1.0 code and the proven Casm code is necessary due to the limitations of Cairo and the need to address issues like reverted transactions, unsatisfiable AIRs, and DOS attacks. Sequencers in L2 systems must be compensated for their work, even if a transaction fails. If they can’t charge for such transactions, it becomes an obvious DOS attack.

A possible solution is to include these transactions in a block, like Ethereum. However, this is difficult in a validity rollup with Cairo 0, as there’s no separation between user code and proven code, allowing users to write unprovable code. Sierra, the added layer, ensures all transactions are eventually provable, addressing these concerns.

Some of the future plans for Sierra include:

  • Adding library functions or extensions to improve functionality
  • Developing a Sierra-to-Casm compiler written in Sierra itself

Performance Improvements and Scaling

The panelists discussed various strategies for enhancing transaction processing speed and scaling StarkNet. These included:

  • Improving the performance of the sequencers
  • Implementing a fee market, similar to Ethereum
  • Exploring parallelization of transactions

In addition to these strategies, the speakers mentioned plans to transition from a Python-based implementation to a Rust-based implementation for better performance.

Future Directions for StarkNet

Some exciting future directions for StarkNet include:

Typed StarkNet

Typed StarkNet would involve adding type safety to contracts and state within the StarkNet ecosystem. This would enable better resource management and more efficient transaction processing.

Extensibility of Cairo and Sierra

The panelists emphasized that Cairo and Sierra’s extensible design offers the potential for adaptation and expansion into non-blockchain ecosystems. Sierra provides increased flexibility for future enhancements, such as employing a small field to accelerate arithmetic operations.

Q&A Highlights

The webinar concluded with a Q&A session, during which the panelists answered several interesting questions from the audience. Some of the main topics covered included:

  • The reasons behind the development of Cairo and Sierra as new languages
  • The potential for Cairo to be used as a standalone language, independent of StarkNet
  • The possibility of implementing “unsafe Cairo” with added hints for optimization
  • The prospect of employing Cairo on Ethereum L1 in the future

Conclusion

The episode offered a fascinating glimpse into the world of StarkNet and Cairo programming language. As the panelists continue to refine and optimize these technologies, developers can look forward to new features, improvements, and opportunities for innovation.

For those interested in learning more about Cairo, Sierra, and StarkNet, the panelists recommended exploring resources such as starklings, an interactive tutorial based on Rustlings. By exploring these tools and tutorials, developers can gain a deeper understanding of the potential of StarkNet and its associated technologies.

Call out StarkNet Beta Testers!

Reddio is building developer tools for StarkNet to help you accelerate the process to develop StarkNet applications. We are inviting all of StarkNet developers to join our beta testing group, try out brand-new features and tell us what you think.

https://share.hsforms.com/1E88oQkqMSJifUV1CqR_WrQd30xn

Comments

All Comments

Recommended for you

  • BTC Surpasses $70,000

    Market data shows that BTC has surpassed $70,000, currently priced at $70,003.25, with a 24-hour increase of 3.96%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Iran Responds to the U.S. via Pakistan, Rejects Ceasefire, Emphasizes Need for Permanent End to War

    According to the Islamic Republic News Agency (IRNA): Iran has responded to the United States through Pakistan, rejecting a ceasefire and emphasizing the necessity for a permanent end to the war.

  • US Media: 45-Day Ceasefire Plan is Just One of Many Proposals

    According to US media reports on the 6th, a White House official stated that the 45-day ceasefire plan between the US and Iran is just one of the 'many proposals' currently under discussion. The official indicated that President Trump has not yet approved the plan, and US military actions against Iran are still ongoing. (Xinhua News Agency)

  • Trump Has Not Approved Ceasefire Plan

    On April 6, the White House stated that President Trump has not yet approved the ceasefire plan. The potential ceasefire proposal is just one of many ideas.

  • Strategy Increases BTC Holdings by 4,871 Last Week, Total Holdings Exceed 766,000

    On April 6, Strategy officially disclosed that last week it purchased 4,871 BTC at an average price of approximately $67,718, with a total expenditure of about $329.9 million. As of 2026, Strategy has accumulated a total of 766,970 BTC, with a total holding cost of approximately $58.02 billion, resulting in an average price of about $75,644 per coin.

  • Iran Launches 98th Wave of 'True Commitment-4' Offensive Against US Amphibious Assault Ship

    On April 6, the Public Relations Department of the Iranian Islamic Revolutionary Guard Corps announced that Iran has launched the 98th wave of the 'True Commitment-4' operation. The statement indicated that the naval forces of the Islamic Revolutionary Guard Corps used cruise missiles to strike the container ship SDN7, which belongs to the 'Zionist regime.' Following its destruction, a large fire broke out. Additionally, missiles targeted strategic centers in northern and southern Tel Aviv, Haifa, chemical enterprises and factories in Be'er Sheva, as well as military installations in Batehfael. The statement also mentioned that the US amphibious assault ship LHA7, carrying over 5,000 sailors and Marines, was hit by missiles and was forced to retreat to deep waters in the southern Indian Ocean after the offensive. Furthermore, the UAE-Israel joint drone production center and several aircraft stationed at Ali Salim base were also subjected to drone and missile strikes.

  • Vessel Traffic in the Strait of Hormuz Reaches Highest Level Since Early March

    On April 6, foreign media reported that traffic through the Strait of Hormuz has risen to its highest level since the onset of the Middle East conflict, as more countries have reached security passage agreements with Iran. Over the weekend, a total of 21 vessels passed through the waterway, marking the highest two-day total since traffic began to decline in early March. Although the current number of vessels is still far below pre-war levels (approximately 135 vessels), more countries have obtained passage permits. A senior crude oil analyst at Singapore's Kpler stated, 'Iran is strengthening its control over Hormuz while responding to requests from its partners. Passage still depends on Iran's willingness, and the situation could change at any time if the conflict escalates.' So far, most of the vessels granted passage appear to be following the routes indicated by Tehran, navigating close to the Iranian coast. However, more vessels are also beginning to choose to travel along the opposite shore.

  • Iran Calls U.S. 15-Point Plan 'Highly Ambitious and Illogical'

    April 6 - According to the Islamic Republic News Agency (IRNA), Iranian Foreign Ministry spokesman Ismail Baghaei stated that in the context of recent proposals to end the war, Tehran has finalized its demands but will only announce them at the appropriate time, emphasizing that Iran will not succumb to pressure. He said, 'A few days ago, they proposed some plans through intermediaries, and this U.S. plan, which contains 15 points, was conveyed through Pakistan and other friendly countries.' He added, 'Such proposals are highly ambitious, unusual, and illogical.' He stressed that Iran has its own framework. 'Based on our own interests and considerations, we have organized and formulated a series of demands that we have presented in the past and present.' He also denied that engaging with mediators indicates weakness. 'The fact that Iran quickly and courageously expressed its position on a proposal should not be seen as a sign of submission to the enemy.' (Jinshi)

  • BTC Surpasses $70,000 Mark

    Market data shows that BTC has surpassed the $70,000 mark, currently priced at $70,071.01, with a 24-hour increase of 4.46%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Dollar Index Falls Below 100 Mark

    On April 6, the Dollar Index (DXY) dropped below 100, declining by 0.21% during the day to report at 99.99 points.