BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

IOSG Ventures: Different ZK Rollup user experience from the perspective of developers

星球君的朋友们
Odaily资深作者
2023-06-13 02:45
This article is about 3718 words, reading the full article takes about 6 minutes
Now is a perfect time to investigate the ZK Rollup development experience.
AI Summary
Expand
Now is a perfect time to investigate the ZK Rollup development experience.

Original author: Yiping, IOSG Ventures

TL;DR

Original author: Yiping, IOSG Ventures

Starknet launches Alpha Mainnet on November 29, 2022.

Scroll launches its Goerli Alpha Testnet on February 27, 2023.

zkSync launches zkSync Era Mainnet on March 24, 2023.

Polygon launches its zkEVM Mainnet Beta on March 27, 2023.

  • With these numerous ZK Rollups, as a Solidity developer, you may be curious:

  • Which provides a better developer experience for you?

  • Which provides the developer support you need more?

Which one is best for you if you plan to create your project?

With the launch of ZK Rollup one after another, now is the best time to study the development experience of ZK Rollup. Considering all ZK Rollups are promoting their EVM compatibility, our exploration of the developer experience will be from the perspective of a Solidity engineer, let's dig into these questions with data-driven answers ⬇️

🐙 ZK Rollup code open source comparison

Open source improves the developer experience by promoting quality, security, and collaboration. Its transparency allows developers around the world to address bugs and security issues, thereby continuously improving the software. GitHub acts as a learning platform, providing access to various coding styles, advanced techniques, and industry standards, enriching the developer's journey. Developers can modify the code according to specific needs. Open source encourages collaboration and innovation through diverse communities, driving projects forward.

Projects typically open-source their code after reaching key milestones, usually when the code reaches at least an alpha release. Code that is still undergoing significant development is not a good candidate for open source, as it may not provide expected benefits such as improved quality, improved security, and collaborative learning. Therefore, the amount of open source code is usually related to the stage of project development.

All ZK Rollups put a lot of work into their GitHub, although what they offer varies.

📕 Project language selection

Rust has become the language of choice for building compilers, node, toolchains, CLI tools, and virtual machines in many projects.

📄 Development Documentation

Development documentation is critical to the developer experience. These resources effectively bridge the gap between the complexity of Layer 2 solutions and an Ethereum Virtual Machine (EVM) compliant development ecosystem.

Different projects provide slightly different documentation structures and content.<>zkSync features AA and Layer 1

Layer 2 Communication provides detailed documentation and reference code.

  • We found the following room for improvement:

  • Include filename and path: At the beginning of any code block, mention the filename and its path. This helps the user know where to find or place the code.

  • Show CLI Execution Results: When command-line interface (CLI) commands are provided, include sample output from the command. This helps the user know what to expect and verify that they executed the command correctly.

  • Limit Code Line Length: Set a maximum line length for your code samples. This ensures your code is easy to read without horizontal scrolling.

  • Use real examples: Instead of using placeholders or 'xxx', provide example contract addresses or secret keys. This gives users a better understanding of what data they should be using.

  • Project view for complex tutorials: For more complex tutorials, project views are provided on the side of the tutorial. When the user navigates through the tutorial, highlight the corresponding part of the code.

  • Interactive Examples: Includes interactive examples to help guide developers quickly. This could be a play area where users can edit and run code snippets, or a cloud development environment.

  • Organize your documentation: Make sure your documentation is well-structured and easy to navigate. Use clear headings, table of contents.

Stay updated: As your project evolves, make sure your documentation is kept up to date. This might mean updating screenshots, revising code samples, or rewriting sections to reflect new features or changes.

🧑💻 Community and Team Contributions

The number of contributors reflects the level of engagement in the open source community. Frequency of updates and engagement are critical to maintaining current, comprehensive documentation.

The more contributors, the more active the open source community. Most projects reach their peak document update frequency when they first go live.

🧑💻 Coding experience

The coding experience depends on the toolchain, editor experience, and framework.

The associated toolchain determines how easy it is to set up a local development environment, debug, and run code.

The editor experience determines the speed of coding. A good editor experience should include clear syntax highlighting, definitions, and autocompletion.

Frameworks provide a structured environment that greatly speeds up the development process. They come with pre-configured functions and reusable libraries that developers can leverage to efficiently write smart contracts without having to write every line of code from scratch.

The support of Remix-like software can help developers start developing quickly without setting up their own local environment. Currently, this cloud-native development experience is only available for backend smart contracts. It also needs to be improved to accommodate Dapp development, including smart contracts and front-ends.

Warp is not doing well. Kakarot will be the only solution for a StarkNet compatible EVM. Kakarot provides a very smooth Solidity development experience. Compatible with all existing Ethereum tools such as Compiler, Remix and Hardhat.

Kakarot provides an EVM written in Cairo. As an EVM, Kakarot can execute EVM bytecode programs, enabling Ethereum smart contracts to run on StarkNet.

✍️ Test

Testing is an important aspect of smart contract development, which ensures the quality, functionality and reliability of smart contracts. This process includes verifying that each feature works as expected and identifying any bugs or issues that need to be fixed before deployment. By conducting thorough testing, developers can be confident that the software will function correctly in a variety of scenarios and conditions. This process not only prevents potential failures that could affect the user experience, but also helps maintain the integrity and security of smart contracts. Testing also informs developers of potential optimizations, thus contributing to the continuous improvement of smart contracts.

Tenderly is one of the best debugging tools for smart contract development. It provides smart contract execution simulation, debugger, gas analyzer, fork and warning functions to help developers better build Dapps. However, Tenderly does not support any ZK Rollup.

We hope that in the near future, we can see more smart contract development and debugging tools that support ZK Rollup, which will help promote the further development and application of blockchain technology.

🚢 deployment

The deployment process is critical in the smart contract development lifecycle. Good deployment tools provide an automated, consistent and reliable experience for deploying smart contracts from development to on-chain environments. Good deployment tools can significantly ease the burden of manual deployment tasks, resulting in faster delivery times and less human error.

The deployment steps of StarkNet are divided into two steps: Declare and Deploy, so it takes a long time.

✨Layer 2 new features

Layer 2 solutions play a vital role in solving the challenges of scalability, efficiency, and user experience. ZK Rollup is still in its early stages, but already shows great potential to unlock new possibilities for developers.

By providing breakthrough innovations such as State-diff, seamless Layer 1 and Layer 2 communication, and account abstraction, ZK Rollup enables developers to create innovative projects that push the boundaries of what is possible with blockchain. These advanced features not only enhance the capabilities of decentralized applications, but also pave the way for mainstream adoption of blockchain technology.

State-diff

StarkNet and zkSync Era use state diffing techniques, which, in theory, can result in lower fees. They only publish state differences, not transaction inputs, which allows for data compression and lower storage costs. This will benefit game developers.

Layer 1 <>The Polygon zkEVM publishes all transaction inputs on-chain, relying on the expected reduction in data storage costs in the next few years.

Layer 2 communication<>Most ZK Rollups provide Layer 1<>Layer 2 communication function. For example, zkSync Era provides a layer 1

Governance example of Layer 2 communication. On Layer 1, a contract can initiate the execution of a Layer 2 contract. On Layer 2, Layer 2 contracts can only send messages to Layer 1 contracts. We can then process the received message on Layer 1. Likewise, Polygon provided a coding example on Nft-bridge using cross-chain communication to share information between L1 and L2.

Account abstraction

Account abstraction is another exciting feature. zkSync Era provides native AA. Accounts in zkSync Era can initiate transactions, like EOA, but can also implement arbitrary logic in them, like smart contracts. Since zkSync natively implements AA, accounts do not need additional proxy contracts. Even normal EOA can have transactions without gas fee payments, which is not possible in EIP-4337 alone. Polygon zkEVM and Scroll implement EVM-compatible AA. StarkNet is also working on account abstraction. It seeks to abstract signatures and abstract payments.

💭 Future improvements to developer experience

In this research, we feel that these ZK Rollup projects have made great efforts to continuously improve the product and support the developers. However, considering that we are still in the early stages of blockchain application and facing a relatively small developer base, working on improving the developer experience will undoubtedly help the project attract future developers and ultimately shape the future of the industry .

Here are some common suggestions for improving development cycle support:

  • 1, Documentation:

  • High-quality documentation: Comprehensive, clear, and up-to-date documentation is critical to improving the developer experience. Make sure the documentation is complete, clear, contains examples, and is regularly updated.

  • Intuitive API design: APIs should be consistent, intuitive, and well documented. Evaluate the API design based on the clarity and accessibility of the API documentation, and the ease with which common tasks can be accomplished.

  • Full API Reference and Changelog: Provides a detailed API reference, including functions, parameters, return values, and error codes. Maintain a changelog that tracks updates, new features, bug fixes, and deprecated features.

  • Case studies: Showcase examples of product applications to inspire and educate developers on effective problem solving.

Smooth onboarding experience: Reduces the start-up time for new developers by simplifying environment setup, explaining core concepts, and facilitating the creation of basic applications.

  • 2. Availability and efficiency:

  • Usability of tools: Make sure the tools provided are user-friendly and intuitive. Ease of use is measured by evaluating the time it takes developers to perform common tasks.

  • Error messages and debugging support: Improve developer experience with helpful error messages and robust debugging support. You can measure this by intentionally creating common errors, and then checking how helpful the system's responses are.

Integration and Compatibility: Evaluate how well the tool or platform integrates with other commonly used tools in the ecosystem.

  • 3. Transparency and update:

Product Status: Timely updates on operational issues, maintenance schedules, and system outages help developers plan their work effectively.

With rapid technological advancements in the Web3 space, maintaining a consistent high level of developer experience in a scalable and sustainable manner is a significant challenge for Web3 projects.

  • To address this challenge, we recommend that projects explore two directions: leveraging AI to enhance automation and productivity, reducing the need for extensive human resources, and leveraging the power of the community to incentivize contributions.

  • AI-assisted: Generating and maintaining large volumes of documents can be resource-intensive. Large language models may help developers write and maintain high-quality documentation. Additionally, AI-powered Q&A bots can provide timely and accurate answers to developers' queries, further enhancing their experience.

Incentivize community participation: In order to promote community participation, projects can provide various incentives, including financial and non-financial incentives. For example, bounty-like programs can be expanded to include contributions in code, codebase testing, documentation improvements, translation efforts, and invaluable first-hand feedback coming directly from users, reflecting insights that can guide project teams to improve the product. Actual demand. This approach not only has the potential to improve the quality of resources, but can also help reduce maintenance costs. Acknowledge contributions and give credit to contributors through active community channels such as Discord, Substack, etc.

IOSG Ventures
ZK Rollup
Developer
Welcome to Join Odaily Official Community