blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
160 stars 427 forks source link

Arbitrum: tx page - add L1 tx #2166

Closed NikitaSavik closed 3 weeks ago

NikitaSavik commented 1 month ago

Related backend PR In order to help identifying messages counterparts on L1, lets add L1 tx field in the 'View details' section. Only show this fied if present in the response

akolotov commented 1 month ago

Here is more info:

  1. The transaction information now includes the field message_related_info in the arbitrum section.
  2. If the transaction does not contain a message, the arbitrum section will look like:
    "arbitrum": {
        . . .
        "contains_message": null,
        . . .
        "message_related_info": {},
        . . .
    },
  3. If the transaction contains an incoming message, there are two possible ways the section can look:
    "message_related_info": {
        "associated_l1_transaction": "0xdd1c994a8a748d78ff9686ff056168133986cba5e49db176f9790c6f75bb1f3d",
        "message_status": "Relayed"
    },

    or

    "message_related_info": {
        "associated_l1_transaction": null,
        "message_status": "Syncing with base layer"
    },

    The second situation is expected only during the initial sync of Orbit artifacts. It means that the incoming message was discovered on the rollup, but the corresponding message on L1 has not yet been found.

  4. If the transaction contains an outcoming message, there could be four possible ways the section will look:
    "message_related_info": {
        "associated_l1_transaction": "0x1d801aee532ed7a819c674efb42e363eabd29393ca84d9de1e5e47d952877997",
        "message_status": "Relayed"
    },

    or

    "message_related_info": {
        "associated_l1_transaction": null,
        "message_status": "Waiting for confirmation"
    },

    or

    "message_related_info": {
        "associated_l1_transaction": null,
        "message_status": "Ready for relay"
    },

    or

    "message_related_info": {
        "associated_l1_transaction": null,
        "message_status": "Settlement pending"
    },

    All the statuses are expected as per the message life cycle:

    • "Settlement pending" means that the transaction with the message was included in a rollup block, but there is no batch on L1 containing the block yet.
    • "Waiting for confirmation" means that the rollup block with the transaction containing the message was included in a batch on L1, but it is still waiting for the expiration of the fraud proof countdown.
    • "Ready for relay" means that the rollup state was confirmed successfully, and the message can be executed—funds can be claimed on L1.

Therefore, it is expected that on UI side there will be a status clarification note if the transaction contains a message but there is no associated L1 transaction yet.