Skip to content

Commit

Permalink
fix: minor fixes in "Transaction lifecycle" (#527)
Browse files Browse the repository at this point in the history
* minor fix

* minor fix

* minor fix

* minor fix

---------

Co-authored-by: JameStark <113911244+JameStark@users.noreply.github.com>
  • Loading branch information
LandauRaz and JameStark authored Jun 9, 2023
1 parent 0ea5756 commit 872e18c
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following are the possible statuses of a transaction from the moment it's se
[id="not_received"]
=== NOT_RECEIVED

Transaction is not yet known to the sequencer
Transaction is not yet known to the sequencer.

[id="received"]
=== RECEIVED
Expand All @@ -20,16 +20,7 @@ Transaction will now either execute successfully or be rejected.
[id="pending"]
=== PENDING

Transaction executed successfully and entered the xref:./transaction-life-cycle.adoc#the-pending-block[pending block].

[id="rejected"]
=== REJECTED

Transaction executed unsuccessfully and thus was skipped (applies both to a pending and an actual created block).
Possible reasons for transaction rejection:

* An assertion failed during the execution of the transaction (in Starknet, unlike in Ethereum, transaction executions do not always succeed).
* The block may be rejected on L1, thus changing the transaction status to `REJECTED`
Transaction executed successfully and entered the xref:./transaction-life-cycle.adoc#the_pending_block[pending block].

[id="accepted_on_l2"]
=== ACCEPTED_ON_L2
Expand All @@ -41,12 +32,21 @@ Transaction passed validation and entered an actual created block on L2.

Transaction was accepted on-chain.

[id="rejected"]
=== REJECTED

Transaction executed unsuccessfully and thus was skipped (applies both to a pending and an actual created block).
Possible reasons for transaction rejection:

* An assertion failed during the execution of the transaction (in Starknet, unlike in Ethereum, transaction executions do not always succeed).
* The block may be rejected on L1, thus changing the transaction status to `REJECTED`.

[id="the_pending_block"]
== The pending block

Today, Starknet supports querying the new block before its construction is complete. This feature improves the responsiveness of the system prior to the decentralization phase, but will probably become obsolete once the system is decentralized, as full nodes will only propagate finalized blocks through the network.

During the construction of the block, as it is accumulating new transactions, the block's status is `PENDING`. While status is `PENDING`, new transactions are dynamically added to the block. Once the sequencer decides to `close` the block, it becomes `ACCEPTED_ON_L2` and its hash is computed.
During the construction of the block, as it is accumulating new transactions, the block's status is `PENDING`. While status is `PENDING`, new transactions are dynamically added to the block. Once the sequencer decides to close the block, it becomes `ACCEPTED_ON_L2` and its hash is computed.

The following example is a query for the pending mainnet block:

Expand Down

0 comments on commit 872e18c

Please sign in to comment.