What's New in o1js: Major Release v1.0

Welcome to the revamped "What's New in o1js" series! Keep reading to learn about other key changes and enhancements that can elevate your development workflow. These are just some of the major features released in o1js v1.0.

image

Welcome to the revamped "What's New in o1js" series! Starting with this edition, we're changing the format of our blog posts to provide a clearer and more concise update on the latest features, enhancements, and fixes in o1js. Our goal is to streamline the information while ensuring you get all the essential highlights of each release. This new format aims to keep you informed about the exciting developments in o1js, while saving you time… for more building!

o1js Highlights

These are just some of the major features released in o1js v1.0. Keep reading to learn about other key changes and enhancements that can elevate your development workflow. Down below you’ll also find links to our changelog and release notes, if you’d like to really dig deep!

Semantic Versioning Assurance

We are pleased to announce that o1js now adheres to semantic versioning. This ensures that zkApps built with version 1.0 will seamlessly integrate with the Mina mainnet following the Berkeley Upgrade, providing developers with stability and predictability in application deployments.

Async Circuits

Smart contracts and `ZkProgram`s now fully embrace asynchronous programming with the async/await syntax. This shift allows developers to leverage the `await` keyword within contract methods, allowing for more complex and efficient zkApps. To adapt your existing contracts, ensure that each method signature includes `async`, and remember to add `await` when calling contract methods, like `await MyContract.myMethod()`. To declare a return value from a method, use the new `@method.returns()` decorator.

Async Provable Witness Values

Introducing provable values from an asynchronous callback is now possible with the new `Provable.witnessAsync()` function. This feature provides a more flexible approach to dealing with async operations in provable contexts, offering greater control and efficiency.

Merkle Lists for Dynamic Operations

Experience greater flexibility with the new `MerkleList`, enabling provable operations on dynamically sized lists. This release also introduces `MerkleListIterator` for easy iteration over Merkle lists, providing a smoother experience when working with these data structures. With these improvements, developers can build more complex applications with enhanced efficiency.

Goodbye, Top-Level Await!

In a move to improve compatibility with popular bundlers like Webpack, o1js has removed the need for top-level `await`. This highly-requested change simplifies integration with popular web frameworks and contributes to a more seamless build process, reducing headaches when working with asynchronous APIs.

Performance Boosts

This release also brings significant performance improvements by reverting a workaround for an issue on Apple silicon. With the root problem now resolved upstream, developers can expect better overall performance and reduced friction when building and running zkApps on Apple machines.

This release aims to boost productivity and streamline your development workflow. If you haven't already, dive into the new features and experience the enhanced performance and functionality.

For a comprehensive view of everything we added, changed, and fixed in this release, please refer to the Release Notes and Changelogs for o1js and the zkapp-cli.

To stay up to date

Follow the official o1Labs @o1_labs on Twitter/X.

To participate

Mina Protocol Discord is the most popular place where Mina enthusiasts and technical contributors gather to share knowledge.

Join us in these zkApps channels:

- #o1js-news is where we notify the community about new releases and o1js announcements

- #zkapps-developers to meet other developers building zkApps with o1js

- #zkapps-general to ask general questions about zkApps, how to use a zkApp, and so on

- #zkapps-questions to ask zkApps-related questions and see Q&A history

To contribute

To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:

- o1js Contributing guidelines

- zkApp CLI Contributing guidelines

- Docs Contributing guidelines