Cairo gets better ++
Another basecamp done, more feature releases and much more. Cairo continues making gains and getting stronger so it can lift the entire blockchain industry out of this bear market.
tl;dr
Cairo compiler 2.0 now out
A note on breaking changes
Starknet <> Alchemy
Build your own proof based neural net
StarkGate upgrade, Protostar tutorials and more …
Cairo compiler 2.0 now out
A new release for the Cairo compiler, tagged v2.0.0-rc0
, just hit production. This upgrade introduces changes to the syntax of Cairo 1 to improve safety and extensibility of smart contracts.
The new syntax will come in two phases. Only the first phase includes breaking changes.
The first phase focuses on safety (e.g., enforcement on
view
functions, clear distinction between pure functions and functions that modify the state)The second phase focuses on extensibility - allowing smart contracts to use components written in external libraries.
To read more on these changes, feel free to go through the community forum post, or see our very own master Lieutaud explain it on YouTube.
Transitioning from existing Cairo 1 code to the new syntax should be fairly easy and straightforward; only the “outermost layer” of the contract is affected. To learn more, please see our exhaustive transition guide over here.
Frustrated with breaking changes ? We have good news
As a builder or business owner, we understand you feel frustrated with all these new changes to Cairo 1.0 and Starknet. Hell, we do too. And so, we have been working to solve this problem for you.
From now on, the existing and new Cairo 1 syntaxes will live side by side for at least six months. That is, we encourage developers to migrate over to the new Cairo 1 compiler syntax, and you have six months to do so.
This guarantee will hold for any future breaking changes on the compiler; contracts compiled with an old compiler version will be declarable on Starknet for at least six months after introduction of a new compiler.
Starknet supported on Alchemy
Any Starknet OG knows you download Postman and make API calls whenever you want to talk directly to the Starknet chain. But for the rest of us who are just getting started on that path - there is good news.
Alchemy announced support for Starknet; you can now do simple read and write calls to Starknet on their platform. Even better - they have provided several useful docs and examples to help new developers use a familiar platform on a new chain. Check all of this out here.
Build your first ZK Neural Net with Orion
Orion is a Cairo 1.0 library developed by the very talented developers at Giza platform. The library provides 2 core features -
Rensor computation (like Numpy) in Cairo 1.0.
Verifiable Machine Learning models using STARKS.
This uses the ONNX Runtime - which is an open source, high-performance inference engine for machine learning models in the Open Neural Network Exchange (ONNX) format. ONNX allows you to develop your model in python, and run it in another language. In our case, it’s Cairo!
To build your own neural network in Orion, follow along with an amazing tutorial provided by the Giza team.
Some other updates
Check out a tutorial by our very own David Barreto, if you want to learn how to develop a test a smart contract on Protostar.
StarkGate, our ecosystem’s flagship bridging solution, just released a alpha v1.12 version on testnet.
Starknet
v0.12
, with it’s highly performant rust based sequencer, is set to go into production within a month.
Events around the world
As always, we strive to bring an in person element to our fast growing blockchain community. Feel free to choose from any of these amazing meetups happening in a city near you -
Starknet Connect Hyderabad - 8th of July. Register here.
So Basically,
Now you know about the new changes to Cairo smart contract syntax and other infrastructural upgrades, you can write and test smart contracts in Protostar, like the changes to StarkGate, and understand how we are going to deal with breaking changes. Hopefully, you have tried to make your own neural network as well.
Finally, I hope you are excited about the events we are hosting worldwide in the coming few weeks, and will register yourself for the closest one as soon as possible.
interesting