DEV Community

George K
George K

Posted on

Arbitrum Nitro from L2 dApps developer perspective

What are Arbitrum and Nitro

Arbitrum is a layer-2 blockchain that uses Optimistic Rollup technology. It works on top of Ethereum and inherits its security. And at the same time cuts transaction costs by multiple times.

Nitro is the most significant technical upgrade since Arbitrum was launched. It will massively reduce transaction costs and increase network capacity.

Today Arbitrum’s capacity is throttled, however with Nitro it will be able to up throughput. While Arbitrum today is already 90–95% cheaper than Ethereum on average, Nitro cuts our costs even further. The upgrade is planned for August, 31.

What’s new?

Ethereum L1 Gas Compatibility

Currently Arbitrum has separate Computation and Storage types of gas. With Nitro upgrade gas pricing and accounting for EVM operations will be perfectly in line with L1; no more ArbGas.

That is L2 gas usage will change. If you have any hard-coded values (either inside smart-contract or off-chain app that sends transactions) you should change these values accordingly.

In general it's better to avoid hard-coding gas since both the L1 and L2 gas schedule may change in the future.

Calldata compression

Compression takes place protocol level; dApps don't need to change anything, data will just get cheaper and your users will pay less for the same transactions.

Frequent Timestamps

Timestamps (accessed via block.timestamp on L2) are updated every block based on the sequencer’s clock, it is no longer linked to the timestamp of the last L1 block.

Currently each L2 block had timestamp of the the corresponding L1 block. That is multiple blocks have the same timestamp and adjacent blocks might have timestamps with a big difference (e.g. 1 minute) even though they were created within 1 second. That might create some confusion and make debugging a bit harder.

Lower contract code size limit

Arbitrum allows contracts up to 48KB to be deployed. But now only up to 24KB are deployable (as specified in EIP-170). Previously deployed contracts above the limit will be maintained, however contracts deployed by these legacy contracts are capped by the new size.

Geth tracing

debug_traceTransaction RPC endpoint is supported; this includes tracing of ArbOS internal bookkeeping actions.

Sometimes it’s hard to figure out what exactly happened within some complex transaction with lots of internal transactions. And now with supported debug_traceTransaction  endpoint it’s possible. Right now only Geth supports tracing, Parity will do it in the coming months

L2 Block hash EVM Consistency

L2 block hashes take the same format as on Ethereum (if you query it from the ArbSys precompile, not the one in block.hash(uin256)).


Conclusion

There are also changes related to Layer 1. If your dApp has something to do with e.g. Arbitrum Bridge or it interacts with Aribtrum contracts on Ethereum then you should probably support Nitro on your side.

You can also find up-to-date list of breaking changes here https://github.com/OffchainLabs/nitro/blob/master/docs/migration/dapp_migration.md

It's only one week left before Nitro upgrade. So in case your dApps needs to be updated you better to hurry up.

Top comments (0)