StarkNet BOOK Summary !
Introduction
Historically, societal roles like currency, property rights, and social status titles have been governed by protocols and registries. Their value stems from a widely accepted understanding of their integrity. These functions have predominantly been overseen by centralized entities prone to challenges such as corruption, agency conflicts, and exclusion (Eli Ben-Sasson, Bareli, Brandt, Volokh, 2023).
Defining Blockchain and Its Properties
In the ever-evolving realm of technology, defining a term as multifaceted as "Blockchain" can be challenging. Based on current understandings and applications, a Blockchain can be characterized by the following three properties (Eli Ben-Sasson, 2023): Public Protocol, Open P2P Network, and Value Distribution.
Starknet Definition and Mission
Starknet is a Layer-2 network that makes Ethereum transactions faster, cheaper, and more secure using zk-STARKs technology. Think of it as a boosted layer on top of Ethereum, optimized for speed and cost. Starknet's mission is to allow individuals to freely implement and use any social function they desire.
Starknet's Values and Key Features
Starknet's ethos is anchored in core principles (Eli Ben-Sasson, Bareli, Brandt, Volokh, 2023): Lasting Broadness, Neutrality, and Individual Empowerment. Key features include low costs, developer-friendly interface with Cairo language, speed and efficiency, and the unique Cairo VM allowing innovation beyond the Ethereum Virtual Machine (EVM).
Governance and SNIPs (Starknet Improvement Proposals)
The Starknet Foundation oversees Starknet’s governance, managing development, overseeing the Starknet DAO, and setting rules to maintain network integrity. SNIPs play a crucial role in proposing, discussing, and documenting changes. They serve as the main avenue for proposing new features or changes, act as a platform for technical discussions, and document the decision-making process, offering a historical view of how Starknet has evolved.
In conclusion, the article highlights Starknet's commitment to integrity, neutrality, and individual empowerment, emphasizing its unique features and the importance of transparent governance through SNIPs. The platform's development is driven by continuous improvement and open dialogue within the community.
Architecture
High-Level Overview:
Starknet's operation initiates with a transaction received by a gateway or managed by a Sequencer, progressing through states like "RECEIVED" and "ACCEPTED_ON_L2." The Prover then executes the new block's operating system, calculates proof, and submits it to Layer 1 (L1) for verification.
Starknet Architecture:
Starknet's architecture involves Sequencers, Provers, and Layer 1 (L1 - Ethereum). Sequencers order transactions, Provers generate proofs, and L1 hosts a smart contract verifying STARK proofs. Starknet's state, maintained through Merkle trees, establishes the architecture of validity roll-up.
Sequencers:
Sequencers, akin to Ethereum's validators, play a pivotal role in Validity rollups. They order transactions, process batches, and produce blocks. The roadmap includes decentralizing Sequencers to enhance network robustness.
Provers:
Provers validate Sequencers' work, processing blocks, generating proofs, and sending them to Ethereum for verification. Provers require significant computational power but can work asynchronously, allowing for parallelism and efficient proof generation.
Optimizing Sequencers and Provers: Debunking Common Misconceptions:
Starknet's optimization focus currently lies on Sequencers, as they operate sequentially. Provers, with their asynchronous and scalable nature, are not the primary bottleneck, contrary to a common misconception.
Nodes:
In Validity rollups, nodes act as auditors rather than transaction processors. They maintain the network state using API gateways or RPC protocols. Starknet plans to deprecate APIs, encouraging more people to run nodes for network resilience.
Conclusion:
Starknet's structure, involving Sequencers, Provers, and nodes, creates a highly scalable, efficient, and secure Layer 2 network. As Starknet progresses towards decentralization, understanding these roles provides valuable insights into the network's inner workings, paving the way for further exploration of the transaction lifecycle and coding with Cairo.
Account Abstraction
Account Abstraction (AA) in blockchain management introduces transaction flexibility and optimizes user experience. Key concepts involve smart contracts validating their transactions, moving away from a universal validation model.
Key Definitions and Technical Aspects:
AA replaces Externally Owned Accounts (EOA) with a broader account concept. It enables unique rules, behaviors, and extensive customization for each smart contract account. Two key definitions emphasize transaction payment by smart contracts and validation abstraction allowing various signature types.
Applications of Account Abstraction:
AA enhances self-custody in blockchain technology with features like hardware signers, social recovery, key rotation, session keys, and custom transaction validation schemes. It offers improved key management, diverse signature schemes, and custom security policies catering to individual security needs.
Understanding Ethereum's Account System:
Ethereum's current account system includes Externally Owned Accounts (EOAs) for individuals and wallets, identified by private and public keys, and Contract Accounts (CAs) representing smart contracts. Challenges in the existing model include key management, user experience issues, and limited flexibility in security measures.
Challenges in Implementing Account Abstraction in Ethereum's Layer 1:
Ethereum's Layer 1 (L1) faces challenges in implementing AA due to the entrenched nature of EOAs and limitations of the Ethereum Virtual Machine (EVM). Despite proposals, integration delays are attributed to the prioritization of critical updates.
Layer 2 Solutions and Shift in Advocacy:
Layer 2 (L2) solutions, focusing on scalability, offer a more accommodating environment for AA. Platforms like Starknet and ZKSync, inspired by EIP4337, lead native AA implementations. The shift in advocacy towards L2 solutions aims to expedite AA benefits for users and maintain Ethereum's competitiveness.
Conclusion:
While Account Abstraction presents significant opportunities for improving security, scalability, and user experience in blockchain, its integration into Ethereum's main layer has faced technical challenges. The emergence of Layer 2 solutions, particularly Starknet, signals a promising avenue for realizing the benefits of AA in a more expedited manner. The article concludes by hinting at a practical exploration of coding AA contracts in Starknet.