Starknet Quantum Leap Upgrade: Will this update unlock 100 TPS?

Starknet TPS could reach triple-digits following the so-called Quantum Leap upgrade. Here's one improvement that will be crucial.
Starknet
• Jul 14, 2023
3 min read
Starknet Quantum Leap Upgrade: Will this update unlock 100 TPS?

The first phase of the Starknet Quantum Leap upgrade went live on Wednesday (July 12). This upgrade achieved a peak of 54 transactions per second, among the fastest speeds ever seen for a single block on Layer 2.

However, this is just the start of Starknet’s evolution. Wednesday’s upgrade, Cairo v0.12.0, is the first in a series designed to dramatically accelerate Starknet’s TPS. The ultimate goal is to create the fastest rollup in crypto, combining web2 speed with web3 possibilities.

In v0.12.0, Starknet focused on the sequencer, replacing the original Python version with a more dynamic Rust alternative. The next wave of improvements will include a greater focus on process efficiency – and one particular improvement will be crucial.

v0.12.1., the next stage of the Quantum Leap upgrade, will address the way the network handles failed transactions, a key drag on Starknet’s TPS to this point. Rejected transactions will start incurring a fee, initially in a trusted manner and later in a trustless one. In fact, they will be part of the proof sent to Layer 1.

This approach will deter anyone wishing to disrupt the network or submitting sloppy transactions. Above all, it will create more capacity for the sequencer to process genuine, valid trades.

Why does Starknet need to address this problem?

At present, Starknet does not charge for failed transactions. This allows people to send erroneous transactions for either malicious or non-malicious reasons, with no consequences.

  • Bots can send hundreds of transactions, even though they fail constantly, in the hope of gaining a trading advantage. For example, when trying to gain arbitrage from an automated market maker (AMM), a user may send a transaction with a high expected return. If the transaction succeeds (perhaps another user had previously moved the price with a big swap) then the user will earn money. If not, nothing will happen and the user will not lose anything, so there is no downside.
  • Malicious actors can initiate a DOS attack which floods the sequencer with spam transactions. This drains computation capacity, while leaving legitimate transactions clogged up in the mempool (the holding bay that stores transactions before they are taken by the sequencer and added to blocks).

 

So even if a transaction fails mid-execution, the sequencer must add it to a block and charge fees on all the computations performed up to the point of failure, thereby creating disincentives for those trying to jam the system.

However, Starknet’s initial alpha design did not meet this need. 

The first version of Cairo, the language used to write Starknet’s smart contracts, is incapable of proving reverted transactions natively. As Starknet notes, In Cairo 0, there is no separating layer between user code and the code being proven. So users can write code that is unprovable.

This means that either:

  • If a transaction is valid, it can be included in a proof, and thus, fees are chargeable.
  • It is unprovable and cannot be included, so no fees are charged.

How is the Starknet Quantum Leap Upgrade solving this problem?

Starknet plans to introduce a validation stage to the mempool to prevent invalid transactions from draining sequencer time. Furthermore, transactions that fail during execution will be added to the block, with the status REVERTED.

The new structure will be implemented over two stages.

At first, the inclusion of failed transactions will operate on a trusted basis, meaning they will not be proved.

However, in version 0.15.0, Starknet will introduce the ability to prove failed transactions, transitioning the process to a trustless framework. This means failed transactions will be part of the state and they will be proved and verified on Layer 1.

So will this upgrade catapult Starknet to 100TPS?

It’s hard to predict with certainty right now. The Starknet TPS may have passed 50 after the initial v0.12.0 update shipped on Wednesday, but further acceleration will depend on a range of factors.

What we can say with certainty, however, is that the inclusion of failed transactions in Starknet’s proofs as part of the Quantum Leap upgrade will release a huge amount of computing power.

In a recent tweet, Starknet stated that “rejected transactions sometimes account for >50% of the sequencer’s workload. And those transactions are not necessarily malicious!

“Most likely, they are accounts that send a lot of transactions that fail, and don’t get charged for this. So they have little incentive to fix their scripts.”

In a separate blog post, Starknet reported that transactions failing to reach the block are wasting up to 66% of the sequencer’s capacity.

Now, a significant portion of that capacity will become available for legitimate transactions and committed users, who want to make Starknet the best Layer 2 rollup in crypto.

 

Motty Lavie

Motty Lavie

Be The First To Know

Subscribe now and receive monthly updates and interesting news about Braavos and Starknet ecosystem.