# blog with aptos ## what is aptos? aptos is a L1 that has done some novel innovations around consensus, mempool and execution. aptos uses - consensus -- aptosbft - execution -- move vm - mempool -- bullshark aptos has been big in innovating around the things they are doing, starting from move itself, which was designed to be a blockchain friendly programming language similar to rust or its aptosbft, a modified version of hotstuff, enabling aptos to give deterministic finality in under 1s. one of the main innovation of aptos that has helped multiple other ecosystems like evm is blockstm, let's talk about it more. ## blockstm aptos has a lot of new innovations going on but one of the most important out of them is blockstm. if you know optimistic concurrency control (occ), then it will be really easy to understand blockstm. in occ, set of tasks are executed parallely on the same state, before committing to the state, it checks if no one has updated the exact state that its reading, if yes then it re-executes the task and then commits it. similary in blockstm, a block has a set of transaction which updates the state. these transactions are then executed parallely without any locks on the state, on every execution, a read-set and write-set is maintained per transaction basis. this helps us understand what exact state the transaction is interacting with. once all transactions are executed, we use read-set of every transaction and check if the state that they are reading was updated by a previous transaction, then that transaction is re-executed. this process is repeated for all transactions and the block is committed. ## how other ecosystems are using blockstm? one of the main pros of blockstm is that it can convert any generalized sequential vm to a parallelized vm with very few changes in the codebase without breaking the developer experience. because to execute transactions parallely, we need to exactly know the state they are accessing, so that we can parallely schedule transactions. but this appraoch breaks the developer experience. one of the first blockchains to adopt blockstm outside aptos was [polygon](https://polygon.technology/blog/innovating-the-main-chain-a-polygon-pos-study-in-parallelization), they integrated blockstm and made evm parallelized. this was one of the reasons why they survived the "inscriptions raid" in december'23. one thing to consider here, even if other ecosystems try applying blockstm to make their vm parallelizable, it will not work unless the storage they are accessing from is also optimized, network is optimized, etc. optimization is other areas of the stack is very important to squeeze that extra bit of optimization from blockstm. monad then followed suit, they are parallelizing the evm but they are also changing how the db is designed, etc and now recently sei announced sei v2, which is also focused on parallel evm with optimization on multiple levels of the stack. ## not all bloomy blockstm has its problem. it is very inefficient in some cases. every blockchain produces blocks, those blocks include a list of transaction and this sequence is chosen usually by the leader. leader chooses this sequence before executing them. so when the blockchain pipeline is at execution, the sequence needs to be final. this is the issue of blockstm. the sequence is finalized before execution began. so if the leader chooses transaction which is writing to the same state, then that block will be executed sequentially and not parallely. there will also be an extra overhead even for sequential payload. so, worst case for blockstm is too bad but aptos is trying to solve this by introducing [AIP-27](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-27.md) if a block is not favourable for parallel execution (all txs need to executed sequentially) then it will run a determinsitc algorithm which will reorder txs to make it favourable for parallel execution, thus using most of the resources, but this reduces deterministicity of system for mev related activites. this issue needs to solved by the blockchains that are implementing blockstm.