COTI 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 4쪽

addr, then the authenticated storage, of address addr′, contains ct at the same location loc. We must ensure that a user cannot cause this to happen on invalid ciphertexts. The authenticated memory and storage adhere to the following rules, which are also depicted in Figure 9. 1. Load from storage. A ciphertext ct resulting from sload applied to a storage at location loc that is performed in depth d is first checked against the authenticated storage. If the authenticated storage has ct in location loc as well then ct is added to the set µ(d), otherwise ct is not add to µ(d) (but it is pushed to the normal memory). 2. Onboard. When Onboard is invoked by a function at depth d on cipher ct, if ct is authenticated for depth d (i.e., ct /∈ µ(d)) then it is being translated into a garbledtext and that garbledtext is returned to the caller; otherwise, the execution is reverted. 3. User input. As explained above, a user input is encrypted by its own symmetric key and upon verifi- cation (of authenticity) it is turned directly into a garbledtext, readily available for secure operations. 4. Public input. A contract might want to input some public input into the secure execution environment (GEE), which means that value has to be turned into a garbledtext. This is done via the special opcode ‘SetPublic’. 5. Offboard. A ciphertext ct resulting from the Offboard mechanism (applied to a garbledtext) that is performed by a function in depth = d is added to the set µ(d), upon which we say that ct is authenticated for depth d. 6. Offboard to user . When a contract wishes to disclose some value only to a specific user, that value is turned from garbledtext into a ciphertext that is encrypted under that user’s key (the symmetric key uk), and that ciphertext is not considered authenticated (it is placed in memory but is not added to µ(d)). 7. Decrypt. When a garbledtext is decrypted, the plaintext value is returned directly to the normal (non- authenticated) memory. 17 Figure 2: Overview of the gcEVM. The colored part represents the security and privacy extension to the normal EVM, which is represented by the white part. 8. Store to storage. When sstore is called by a function at depth = d, to store ct at location loc, if ct∈ µ(d) then, in addition to writing ct to location loc of the normal storage, write it to location loc in the authenticated storage as well, otherwise (if ct /∈ µ(d)) write it only to the normal storage, and make sure the authenticated storage at location loc is empty. 9. Cleaning memory. When depth is decreased from d to d′ < d (when a function returns, reverts, etc.) the set µ(d) in the authenticated memory is cleaned. Similarly, when depth is increased from d to d + 1 (on a function call), we make sure that µ(d + 1) is empty. 10. Immobility of ciphertexts. An authenticated ciphertext cannot transit between depths, namely, calling a function (on another contract) with an argument of type CT would deem that ciphertext invalid (i.e., it will not be considered as authenticated for the new depth); similarly, when returning an argument of type CT to a caller function from another contract the returned value would not be considered authenticated. The right way to move such private values is by using the GT type. The Garbled Execution Environment (GEE ™). As explained, a garbledtexts may be generated from an inputtext or a ciphertext, only upon confirming their authenticity. It is crucial to note that garbledtexts bear significance only in the course of the execution of the transaction. Additionally, their inherent safety is 18 derived from the negligible likelihood of predicting them, given that they are formed of random values that are revealed to the parties only at the very moment of execution. This property allows us to treat them with ease rather than keep tracking them across function calls. Since the next batch of transactions to run is fixed before the garbledtexts are revealed, it is not possible for a user or for a contract to hardcode a garbledtext in their transaction or state, as garbledtexts are unpredictable, furthermore, these garbledtexts become useless once the execution of the transaction is completed; the garbledtexts for the next transactions batch would be completely fresh. 3 Decentralizing Sequencers in COTI V2 3.1 Concept and Rationale The evolution of blockchain technology has ushered in the need for scalable and secure layer 2 solutions. COTI V2 aims to be at the forefront of this evolution by introducing a decentralized sequencer model. This model is inspired by shared sequencer frameworks, which have shown promise in enhancing network security and reducing centralization risks. A sequencer in a blockchain network is responsible for ordering transactions before they are finalized on the blockchain. Centralized sequencers, while efficient, pose risks including single points of failure and potential censorship. Decentralizing the sequencer function distributes these responsibilities across multiple participants, thereby enhancing security, redundancy, and resistance to censorship. 3.2 How It Works The decentralized sequencer model for COTI V2 involves the following key components: Figure 3: Decentralized sequencer model • Shared Sequencer Network: A cluster of sequencers that operate in a rollup-agnostic manner. This network ensures that valid transactions are included in the blockchain within a finite time frame, providing the necessary liveness and censorship resistance. • Operator Selection and Rotation: Sequencer operators are selected through a transparent and fair 19 consensus mechanism, possibly utilizing a Proof-of-Stake (PoS) model. The right to sequence trans- actions is rotated among operators to prevent centralization and ensure fairness. • Staking and Slashing Mechanisms: Operators are required to stake tokens as a form of security deposit. Misbehavior or failure to perform duties results in slashing of their stake, aligning operators’ interests with the network’s integrity. • Transaction Processing: Transactions are processed off-chain by the sequencers and batched together before being finalized on the blockchain. This approach maintains the scalability benefits of layer 2 solutions while leveraging the security of the underlying layer 1 blockchain. 3.3 Implementation Consensus Protocol: In COTI V2’s decentralized sequencer model, the modified Practical Byzantine Fault Tolerance (PBFT) algorithm plays a critical role. This consensus protocol operates in several key steps to ensure secure, fair, and transparent sequencer operation: Figure 4: Consensus protocol steps 1. Nomination: Token holders nominate candidates for the sequencer role. Any token holder can be- come a nominee by locking a specified amount of tokens as collateral, demonstrating their commit- ment. 20 2. V oting: Stakeholders vote on the nominated candidates, with the voting power of each stakeholder proportional to their token holdings. This ensures that the selection process is democratized and reflects the preference of the network’s participants. 3. Election: After the voting period concludes, the candidates with the highest votes are elected as sequencers for a predetermined term. This term is designed to be short enough to allow regular rotation but long enough to ensure stability. 4. Rotation: The right to sequence transactions is rotated among the elected sequencers based on a predefined schedule. This rotation can be deterministic, based on the order of election, or randomized to enhance security. 5. Operation: During their term, sequencers order transactions and propose blocks to the network. Their operations are continuously monitored for compliance with the network’s rules, ensuring reliability and integrity. 6. Slashing and Replacement: If a sequencer acts maliciously or fails to perform their duties, they can be slashed, meaning a portion of their staked tokens is forfeited. A new election process can be initiated to replace the slashed sequencer. 7. Rewards: Sequencers receive rewards for their service, typically in the form of transaction fees or newly minted tokens. This incentivizes participation and ensures that sequencers act in the network’s best interest. Smart Contracts for Staking and Slashing: The implementation of Smart Contracts for Staking and Slashing introduces a rigorous and automated frame- work designed to maintain integrity and accountability among sequencers within a blockchain network. This process begins with Stake Deposit, where operators commit a certain amount of $COTI tokens into a staking contract to qualify as sequencers, establishing a tangible investment in their role. The mechanism of Stake Locking further cements this commitment by ensuring the stake remains untouchable for a predetermined period, effectively binding operators to their obligations. Behavior Monitoring plays a crucial role in this ecosystem, employing automated systems to vigilantly over- see sequencer actions, ensuring adherence to the network’s protocol by evaluating criteria such as block production fidelity and transaction fairness. In the event of protocol deviation, Violation Detection mech- anisms promptly identify and log offenses, potentially triggering automated alerts or necessitating manual reports from network participants. Crucially, Consensus on Violation may be required for certain breaches, safeguarding against unwarranted penalties by ensuring any slashing decision is collectively agreed upon, thereby preventing misuse or errors in violation assertions. Upon verified breach of protocol, Slashing Execution is carried out, with the offending party’s stake being partially or fully confiscated, the severity of which is predefined or calculated based on the infraction’s gravity. However, an Appeal Process is available, allowing operators to challenge a slashing verdict through a structured governance mechanism, presenting evidence to contest the violation. For those who uphold the network’s standards throughout their term, Stake Return ensures the reimbursement of their commitment, with the contract facilitating the smooth reclamation of funds. Additionally, Reward Distribution recognizes and incentivizes exemplary participation, with rewards allocated based on factors such as staked amount, duration of commitment, and overall network contribution, underlining the system’s holistic approach to 21 fostering a secure, efficient, and accountable blockchain environment. Figure 5: Staking and validation process 1. Stake Deposit: Operators deposit a predefined amount of COTI tokens into the staking contract to be eligible as sequencers. This contract records the staked amount and the identity of the depositor. 2. Stake Locking: Once deposited, the stake is locked for a specified duration to ensure commitment. The contract prevents withdrawal of the stake during this period, ensuring that sequencers have skin in the game. 3. Behavior Monitoring: Sequencer actions are monitored against the network’s protocol rules. This could involve automated systems tracking block production fidelity, transaction inclusion fairness, and response times. 4. Violation Detection: If a sequencer violates predefined rules (e.g., censoring transactions, failing to produce blocks on time), the violation is detected and logged by the contract. This could trigger an automatic alert or require manual reporting by network participants. 5. Consensus on Violation: For certain types of violations, a consensus among other network par- ticipants may be required to confirm the offense. This ensures that the slashing mechanism is not triggered by false accusations or errors. 6. Slashing Execution: Upon confirmation of a violation, the contract partially or fully slashes the offender’s stake. The exact amount can be predetermined in the contract or calculated based on the severity of the violation. 7. Appeal Process: Operators may have the option to appeal a slashing decision through a governance mechanism, presenting evidence to dispute the detected violation. 8. Stake Return: For operators who complete their term without violations, their stake is returned post 22 the locking period. The contract handles the automatic release of funds. 9. Reward Distribution: Operators in good standing may receive rewards, distributed through another smart contract, which could factor in the staked amount, term length, and network performance. This structured approach ensures that staking and slashing mechanisms enforce network integrity and per- formance, deter malicious behavior, and promote a healthy, decentralized ecosystem. Each step involves specific smart contract functions that are transparently executed on the blockchain, providing a secure and automated system for managing sequencer operations in COTI V2. Infrastructure for Shared Sequencing: The development of an Infrastructure for Shared Sequencing represents a critical endeavor in enhancing the operational efficiency and interoperability of blockchain networks. At its core, this initiative involves the meticulous design of a software framework that sequencers will employ, ensuring a robust architecture for transaction processing, batch creation, and seamless communication across various rollups and the se- quencer network. Key to this framework is the establishment of interoperability protocols, which facilitate smooth interactions and standardized transaction processing across the ecosystem. Additionally, paramount importance is placed on implementing stringent security measures to safeguard against unauthorized access and maintain transaction integrity, alongside integrating scalability solutions to adeptly manage high vol- umes of transactions. This comprehensive approach not only fortifies the blockchain infrastructure but also significantly propels its capacity to support a growing array of applications. Figure 6: Shared sequencer framework 1. Software Framework Design: The initial step involves outlining the software architecture that se- quencers will utilize. This includes defining the protocols for transaction processing, batch creation, and communication between different rollups and the sequencer network. 2. Interoperability Protocols: Developing protocols that ensure seamless interaction between the shared sequencer infrastructure and multiple rollups is crucial. This involves creating standardized APIs and data formats that enable transactions to be universally processed and understood across the ecosystem. 3. Security Measures: Implement robust security protocols within the software to protect against unau- thorized access and ensure the integrity of transaction processing. This includes encryption, access 23 controls, and continuous security audits. 4. Scalability Solutions: Incorporate scalability solutions, such as sharding within the sequencer net- work or adopting layer 1 scalability technologies, to handle high transaction volumes efficiently. Operation Phase: The Operation Phase of deploying a Shared Sequencing Infrastructure marks a pivotal transition from the- oretical design to practical application within the blockchain network. This phase kicks off with the de- ployment and integration of sequencer software, ensuring its seamless incorporation with existing rollups through extensive compatibility and performance testing. Following deployment, sequencers commence the processing and batching of transactions, utilizing sophisticated algorithms to enhance network throughput and reduce latency by prioritizing transactions on various criteria. A significant focus is also placed on enabling fluid cross-rollup communication, thereby knitting together a unified and interoperable blockchain ecosystem that facilitates transactions across different rollups with ease. Moreover, an ongoing commitment to monitoring and maintenance ensures the sequencer network remains at the pinnacle of performance, se- curity, and reliability, with continual updates and optimizations driven by network analytics and emerging technological trends. This operational vigilance guarantees the infrastructure’s adaptability and enduring relevance in the fast-evolving blockchain landscape. Figure 7: Operation phase overview 1. Deployment and Integration: Roll out the sequencer software across the network, integrating it with existing rollups. This phase involves rigorous testing to ensure compatibility and performance benchmarks are met. 2. Transaction Processing and Batching: Sequencers begin processing individual transactions, batch- 24 ing them for efficient blockchain inclusion. Batching algorithms prioritize transactions based on cri- teria such as fees, age, and size to optimize network throughput and minimize latency. 3. Cross-Rollup Communication: Enable cross-rollup transactions through the shared sequencer in- frastructure, facilitating a cohesive and interoperable blockchain ecosystem. This involves routing transactions between rollups and resolving any cross-chain dependencies or conflicts. 4. Monitoring and Maintenance: Continuously monitor the sequencer network for performance, se- curity, and reliability. Implement updates and optimizations based on observed network activity and technological advancements. This detailed approach ensures that the shared sequencing infrastructure for COTI V2 is built on a foun- dation of security, scalability, and interoperability. By focusing on comprehensive software development and operational protocols, COTI V2 aims to achieve a decentralized, efficient, and user-friendly transaction processing network. 3.4 Network Fee Structure COTI V2 utilizes a dynamic fee model designed to strike a balance between affordability and network efficiency. This approach aims to keep fees lower than the Ethereum mainnet while ensuring transactions are processed promptly. Let’s delve into the factors that determine network fees: • Demand-Based Pricing: Similar to Ethereum’s gas fees, COTI V2 employs a demand-driven pricing model. When network congestion rises due to increased transaction volume, fees automatically adjust upwards. Conversely, during periods of low demand, fees decrease. This mechanism ensures resource allocation reflects actual network usage. • Decentralized Fee Rules: The COTI V2 protocol establishes the core principles for fee calculation. These pre-programmed rules autonomously adjust fees in response to network demand and usage patterns, eliminating the need for manual intervention. • User-Defined Maximum Fees: Users retain some control over transaction costs, particularly during peak demand periods. They can specify the maximum fee they are willing to pay for their transaction to be included in the next block. Transactions with higher fees are generally prioritized for inclusion by sequencers. It’s important to note that some fees may be denominated in the native $COTI token. Furthermore, fees can be tailored to meet the specific needs of network functionalities and resource demands, including support for certain privacy features and services, smart contract fees, and so on. The fees can be adjusted to facilitate access to advanced Zero-Knowledge (ZK) services within the network. These services may include specialized ZK computations, private information retrieval, or access to secure data feeds. • Sequencers and Fee Competition: Sequencers play a vital role by ordering transactions and submit- ting them to the Ethereum mainnet. While sequencers have some discretion in pricing transactions, the competitive market and pre-defined protocol rules contribute to ensuring fees remain fair and competitive. • Layer 1 Costs: A portion of the network fee covers the cost of submitting transaction data to the Ethereum mainnet (Layer 1). COTI V2, as a Layer 2 solution, batches multiple transactions together for submission to Layer 1, minimizing these costs. However, the overall fee structure incorporates 25 these Layer 1 gas prices, which are influenced by Ethereum network activity. In essence, COTI
프로젝트로 돌아가기