Skip to main content

6 posts tagged with "engineering"

View All Tags

· 3 min read
Dora Noda

The Sui Foundation recently conducted a series of tests to determine the current peak throughput and time to finality for various workloads on the Sui network. A year after its announcement, the Sui network has made significant strides in performance, becoming a promising decentralized protocol for the future.

Key Findings

  • The Sui network, consisting of 100 globally distributed validators, achieved peak throughput ranging from 10,871 TPS to 297,000 TPS on different workloads.
  • Sui's time to finality is approximately 480 milliseconds, providing rapid transaction confirmations.

Performance Evaluation

To measure the performance of the Sui protocol, the foundation used a globally-distributed setup that closely mirrors the mainnet in terms of hardware configurations, number of validators, geographic distribution, and voting power distribution. The tests were conducted using 100 validators, 24-core AMD hardware, 256GB memory, and 25Gbps NIC.

Measuring Throughput with Programmable Transaction Blocks (PTB)

Sui's core developer primitive, PTB, allows for a complex and composable sequence of transactions. Chained transactions in a PTB can execute and fail atomically, providing increased efficiency and expressivity. Each PTB can support up to 1024 transactions, enabling Sui to handle large workloads and reduce transaction fees for users.

The Challenge of Measuring Throughput

Transactions Per Second (TPS) is a commonly used metric to measure a blockchain protocol's capacity. However, measuring the number of PTBs executed per second doesn't accurately reflect Sui's computational capacity. As the average PTB size increases, Sui's throughput increases, but the PTB/second metric would remain unchanged. Therefore, the foundation has chosen to measure the number of individual transactions within a PTB executed per second as a more consistent and practical metric.

Time to Finality

Finality in blockchain refers to the point where a transaction is considered irrevocable and cannot be modified or reverted. For this performance update, the Time to Finality measures the point in the transaction lifecycle where both the transaction itself and its effects are final and can be used in subsequent transactions. Sui's Time to Finality is approximately 480 milliseconds, with a 95th percentile latency of around 550 milliseconds.

Future Optimization and Scalability

The Sui protocol has made significant progress in its performance, but there are still many opportunities for optimization and scalability. In the near future, the Sui Foundation plans to refine the following aspects:

  • Scalability and coverage of benchmark tooling
  • Horizontal scalability to support intra-validator scaling across multiple machines
  • Resilience to under-performance of individual validators

As the Sui protocol evolves and its performance improves, the Sui Foundation will continue to share updates with the community for feedback and consideration. With its impressive throughput and time to finality, the Sui network is poised to make a significant impact in the world of decentralized systems.

· 2 min read
Dora Noda

Sui Blockchain is a promising Layer-1 (L1) project that employs a unique set of technical innovations and tokenomics to deliver a scalable and efficient platform. This article will explore Sui's core innovations and evaluate its potential as a solution for mass adoption of Web 3.0 applications.

Key Innovations

  • Sui Move: A custom version of the Move language optimized for parallel execution, enabling frictionless mass asset creation and a smoother programming experience.
  • Single-Writer Transactions: A novel approach to handling simple transactions without consensus, using Byzantine Consistent Broadcast for security and efficiency.
  • Narwhal-Tusk Consensus Engine: A cutting-edge consensus mechanism using directed acyclic graph (DAG) data structures for high throughput and low latency.
  • Unique Tokenomics: Sui's tokenomics model addresses storage costs on the network by implementing a storage fund, which helps maintain relatively constant gas prices throughout the blockchain's lifetime. This design incentivizes validators and ensures ample storage space is available.

Evaluation

Sui Blockchain stands out with its innovative solutions to scalability, particularly the unlimited upper bound for single-write transactions. This makes it suitable for applications that rely heavily on single-writer transactions, like social media apps and mass NFT distribution.

Sui's scalability solutions unlock the potential for NFTs with low intrinsic value but high social purpose, such as on-chain coupons, decentralized IDs, and credit cards. Furthermore, Sui Move's language features can enable structurally storing objects on a blockchain with the security and permanence guarantees of the blockchain.

Conclusion

Sui Blockchain provides a viable blueprint for an L1 blockchain that can handle Web 2.0 level scalability. It symbolizes Web 3.0's growing maturity and the potential for a billion-user scale. Regardless of its long-term success, Sui's innovative approach to blockchain technology already represents a significant achievement.

· 4 min read
Tian Pan

Optimism is an EVM equivalent, optimistic rollup protocol designed to scale Ethereum. Scaling Ethereum means increasing the number of useful transactions the Ethereum network can process. Optimistic rollup is a layer 2 scalability technique which increases the computation & storage capacity of Ethereum without sacrificing security or decentralization. EVM Equivalence is complete compliance with the state transition function described in the Ethereum yellow paper, the formal definition of the protocol.

Optimistic rollup works by bundling multiple transactions into a single transaction, which is then verified by a smart contract on the Ethereum network. This process is called “rolling up” because the individual transactions are combined into a larger transaction that is submitted to the Ethereum network. The term “optimistic” refers to the fact that the system assumes that transactions are valid unless proven otherwise, which allows for faster and more efficient processing of transactions.

Overall Architecture

Optimism Architecture

op-node + op-geth

The rollup node can run either in validator or sequencer mode:

  1. validator (aka verifier): Similar to running an Ethereum node, it simulates L2 transactions locally, without rate limiting. It also lets the validator verify the work of the sequencer, by re-deriving output roots and comparing them against those submitted by the sequencer. In case of a mismatch, the validator can perform a fault proof.
  2. sequencer: The sequencer is a priviledged actor, which receives L2 transactions from L2 users, creates L2 blocks accordingly, and then submits to data availability provider (via a batcher). It also submits output roots to L1. There is only one sequencer in the entire stack for now, and it's where people critisize that OP stack is not decenralized.

op-batcher

The batch submitter, also referred to as the batcher, is the entity submitting the L2 sequencer data to L1, to make it available for verifiers.

op-proposer

Proposer generates and submitting L2 Output checkpoints to the L2 output oracle contract on Ethereum. After finalization period has passed, this data enables withdrawals.

Both batcher and proposer submit states to L1. Why are they separated?

Batcher collect and submit tx data into L1 with a batch, while proposer submits the commitments (output roots) to the L2's state, which finalizes the view of L2 account states. They are decoupled so that they can work in parallel for efficiency.

contracts-bedrock

Various contracts for L2 to interact with the L1:

  • OptimismPortal: A feed of L2 transactions which originated as smart contract calls in the L1 state.
  • Batch inbox: An L1 address to which the Batch Submitter submits transaction batches.
  • L2 output oracle: A smart contract that stores L2 output roots for use with withdrawals and fault proofs.

Optimism components

How to deposit?

How to withdraw?

Feedback to Optimism's Documentation

Understanding the OP stack can be challenging due to a number of factors. One such factor is the numerous components that are referred to multiple times with slightly different names in code and documentation. For example, the terms "op-batcher" and "batch-submitter" / "verifiers" and "validators" may be used interchangeably, leading to confusion and difficulty in understanding the exact function of each component.

Another challenge in understanding the OP stack is the evolving architecture, which may result in some design elements becoming deprecated over time. Unfortunately, the documentation may not always be updated to reflect these changes. This can lead to further confusion and difficulty in understanding the system, as users may be working with outdated or inaccurate information.

To overcome these challenges, it is important to carefully review all available documentation, to keep concepts consistently across places, and to stay up-to-date with any changes or updates to the OP stack. This may require additional research and collaboration with other users or developers, but it is essential in order to fully understand and effectively utilize this complex system.

· 7 min read
Dora Noda

Optimism is an optimistic rollup protocol that provides a solution for scaling Ethereum without sacrificing security or decentralization. The protocol achieves this by increasing the computation and storage capacity of Ethereum, while remaining maximally compatible with existing Ethereum infrastructure.

Introduction to Optimism: Scaling Ethereum with Optimistic Rollup

Basics

What is Ethereum scalability?

Ethereum scalability refers to the ability of the Ethereum network to process a greater number of useful transactions. The current limited resources of Ethereum, specifically bandwidth, computation, and storage, make it challenging to process a high volume of transactions. Computation and storage are the most significant bottlenecks, leading to extremely high fees. To scale Ethereum and reduce fees, it is necessary to better utilize bandwidth, computation, and storage.

What is an Optimistic Rollup?

Optimistic rollup is a layer 2 scalability technique that allows for off-chain execution of transactions while maintaining security and decentralization. Transaction data is submitted on-chain, but executed off-chain. In case of an error in the off-chain execution, a fault proof can be submitted on-chain to correct the error and protect user funds. This approach is similar to going to court only if there is a dispute, and executing transactions on-chain only if there is an error.

What is EVM Equivalence?

EVM Equivalence refers to complete compliance with the state transition function described in the Ethereum yellow paper, which is the formal definition of the Ethereum protocol. An EVM equivalent rollup protocol adheres to the Ethereum standard across EVMs, ensuring that smart contract developers can write code once and deploy it anywhere. This means that any smart contract written for the Ethereum mainnet can be deployed to an EVM equivalent rollup protocol with little to no modification.

Optimism = EVM equivalent + optimistic rollup + scaling Ethereum

Optimism is an EVM equivalent optimistic rollup protocol designed to scale Ethereum while maintaining maximum compatibility with existing Ethereum infrastructure.

Security

To scale Ethereum without sacrificing security, Optimism preserves three critical properties of Ethereum layer 1: liveness, availability, and validity.

  1. Liveness - Anyone can extend the rollup chain by sending transactions at any time.
    • Transactions can be sent to the rollup chain via the sequencer or directly on layer 1. The sequencer provides low latency and low-cost transactions, while sending transactions directly to layer 1 provides censorship resistance.
  2. Availability - Anyone can download the rollup chain.
    • All information required to derive the chain is embedded into layer 1 blocks. Thus, as long as the layer 1 chain is available, so is the rollup.
  3. Validity - All transactions are correctly executed, and all withdrawals are correctly processed.
    • The rollup state and withdrawals are managed on an L1 contract called the L2OutputOracle, which is guaranteed to only finalize correct (i.e., valid) rollup block hashes given a single honest verifier assumption. If an invalid block hash is asserted on layer 1, an honest verifier will prove it is invalid and win a bond.

Optimism enforces validity of a rollup through fault proofs. Validity proofs can also be plugged in once they become feasible.

Network Participants

There are three actors in Optimism: users, sequencers, and verifiers.

Optimism Network Participants

Users

At the core of the network are users who can deposit or withdraw arbitrary transactions on L2 by sending data to a contract on Ethereum mainnet. They can use EVM smart contracts on layer 2 by sending transactions to the sequencers and view the status of transactions using block explorers provided by network verifiers.

Sequencers

The sequencer is the primary block producer. There may be one sequencer or many using a consensus protocol. For 1.0.0, there is just one sequencer, currently operated under the oversight of the Optimism Foundation. In general, specifications may use "the sequencer" to be a stand-in term for the consensus protocol operated by multiple sequencers.

The sequencer

  1. accepts user off-chain transactions,
  2. observes on-chain transactions (primarily, deposit events coming from L1),
  3. consolidates both kinds of transactions into L2 blocks with a specific ordering, and propagates consolidated L2 blocks to L1 by submitting two things as calldata to L1:
    1. the pending off-chain transactions accepted in step 1, and
    2. sufficient information about the ordering of the on-chain transactions to successfully reconstruct the blocks from step 3, purely by watching L1.

The sequencer also provides access to block data as early as step 3 so that users may access real-time state in advance of L1 confirmation if they so choose.

Verifiers

Verifiers serve two purposes:

  1. serving rollup data to users and
  2. verifying rollup integrity and disputing invalid assertions.

To maintain network security, there must be at least one honest verifier who can verify the integrity of the rollup chain and serve blockchain data to users.

Key Interaction Diagrams

The following diagrams demonstrate how protocol components are utilized during key user interactions to provide context when diving into any particular component specification.

Depositing and Sending Transactions

Users often begin their L2 journey by depositing ETH from L1. Once they have ETH to pay fees, they start sending transactions on L2. The following diagram demonstrates this interaction and all key Optimism components, which are or should be utilized:

Depositing and Sending Transactions

Withdrawing

Withdrawals are initiated by normal transactions on L2 but completed using a transaction on L1 after the dispute period has elapsed.

Diagram of Withdrawing

Conclusion

Optimism is an optimistic rollup protocol designed to scale Ethereum while maintaining maximum compatibility with existing Ethereum infrastructure. By increasing the computation and storage capacity of Ethereum, it provides a solution for processing a greater number of useful transactions without sacrificing security or decentralization. If you want to learn more about Optimism, please go to their official specs. With its adherence to Ethereum's core principles and compatibility with existing infrastructure, Optimism is poised to be a key player in Ethereum's journey to become a more scalable and efficient network.

Are you tired of spending countless hours setting up and maintaining your node for Optimism rollup? Do you wish there was an easier way to connect to the network? With BlockEden.xyz Optimism RPC, you can connect to the Optimism rollup in just minutes! Say goodbye to the frustrating and time-consuming process of setting up and maintaining your node.

BlockEden.xyz Optimism RPC simplifies the process of connecting to the Optimism rollup, allowing you to focus on what really matters - developing your project. With our easy-to-use platform, you can quickly and effortlessly connect to the network, saving you valuable time and resources.

Our platform provides a hassle-free solution for developers who want to take advantage of the benefits of Optimism Rollup without the time-consuming setup and maintenance. Our team of experts ensures that the technology is always up-to-date, so you can be confident in the stability and reliability of your application.

Don't let the complexities of Optimism Rollup hold you back from creating the best possible application. Let BlockEden.xyz Optimism RPC take care of the technical details so you can focus on what you do best - innovating and creating. Sign up for BlockEden.xyz or try it out today and experience the benefits of seamless connectivity and increased efficiency!

· 3 min read
Dora Noda

In the world of blockchain, speed and efficiency are vital for the success of any platform. Enter Sui Blockchain, a platform that promises to deliver low latency transaction processing and smart contract execution.

Sui and BlockEden.xyz

One of the unique features of Sui Blockchain is its ability to distinguish between different kinds of object ownership. Unlike other blockchain platforms where every contract and object is mutably shared, Sui allows an object to be owned by an address and can be mutably owned, immutably owned, or mutably shared. This feature is leveraged for parallel execution of smart contracts and asset management.

Sui uses a decentralized permissionless smart contract platform, biased towards low-latency management of assets. It uses the Move programming language to define assets as objects that may be owned by an address. The platform is maintained by a permissionless set of authorities that play a role similar to validators or miners in other blockchain systems.

To achieve low latency, Sui separates transaction processing into two phases: 1) acquiring distributed locks at the granularity of objects and 2) executing the transaction and committing its effects.

Phase one is performed through a reliable broadcast primitive that requires no global synchronization within the authority, allowing for scalability through sharding. For transactions involving shared objects, sequencing is required using a consensus protocol.

Sui aggressively reduces bottlenecks and points of synchronization requiring global locks within authorities, allowing for quasi-linear scaling with increased resources. The platform also allows for parallel execution of smart contracts, with Move virtual machines on multiple cores or physical machines reading versioned input objects, executing, and writing resulting objects from and to stores.

The consistency requirements on stores for objects and transactions are very loose, allowing scalable distributed key-value stores to be used internally by each authority. Sui uses a Byzantine consistent broadcast protocol between authorities to ensure the safety of common operations on assets, ensuring lower latency and better scalability as compared to Byzantine agreement.

Overall, Sui Blockchain's design choices and optimizations make it a promising platform for applications that require fast and efficient processing of transactions. Its ability to 1) distinguish between different kinds of object ownership, 2) acquiring distributed locks at the granularity of objects, and 3) parallel execution of smart contracts are key features that set it apart from other blockchain platforms. With Sui Blockchain, the future of fast and efficient transaction processing is here.

· 3 min read
Jack Sim

On Day 1 of Aptos Mainnet launch, there’s some confusing conversations on social media

TPS is the acronym for transactions per second and how engineers measure the volume of the network traffic. There are multiple scenarios when we are talking about TPS:

  • Max TPS means the maximum network traffic a blockchain could support . This is determined by how fast a chain could reach consensus and mint a new block, and the block size (e.g., BTC) the gas limit (e.g., Ethereum) of a block. For ethereum and later blockchain that support smart contracts, it makes more sense to be limited by gas, because different transactions (e.g., 1-to-1 token transfer vs multi NFT token mint) has various computation complexity, and they need to be metered consistently. That said, max TPS is not a very strict measurement of a chain’s throughput. Instead, max gas per second is. Then, how do developers get the value of the max TPS? It’s usually a result of experiments - upper bound given the good network condition, fully available validators, and simplest transactions.

  • Actual TPS is the current traffic volume of a blockchain in operation. This is majorly determined by how busy the network is. Around the launch of Aptos Mainnet, there’s not many dApps ready, and not many users holding Aptos tokens, so that not many people were doing business on Atpos at that moment. That’s why the actual TPS was low at that moment. However, actual TPS will be bounded by max TPS. The so-called Ethereum congestion is the moment when actual TPS already reaches max TPS, no more transactions could be processed, and they have to wait.

So Aptos’s high max TPS will demonstrate its advantage when the ecosystem is growing up, when we will still see almost instant transaction settlement and low transaction fee.

Then, let’s get back to BlockEden.xyz customers. We offer node API services at different tier, where the major difference is QPS (similarly, the acronym of queries per second) limit of using our service. Free tier basically gets 1 QPS, while Pro tier gets 10 QPS. That means how many REST API calls you could make per second. This is different from how many transactions could be settled on blockchain per second. When you call REST API, you may not only do the write operations (aka sending a transaction), but you could also do lots of read operations (e.g., getting account info, getting a block, getting a transaction).

If you haven’t signed up for our services, please visit this link to start from free.