NEWTON

NEWTON


Popular tags

    A plan to get better visibility when a transaction got received but not placed into a block?

    Asked

    4 months ago

    15

    views


    0

    img Is there a plan to get better visibility when a transaction got received but not placed into a block? For the moment we only know that it is RECEIVED but have no clue if it’s been discarded because of missing constructor params or if it’s just late:

    { transaction_hash: '0x3d26af3d7a8f17ea28c2a71a250fd8c5dcd162b779051fd36a3bfcd9f130fab', actual_fee: undefined, status: 'RECEIVED', status_data: undefined, messages_sent: [], events: [], l1_origin_message: undefined }

    upd: I noticed we are notified when we make an error, but:

    1. we don’t know what’s happening between RECEIVED and REJECTED | ACCEPTED_ON_L2, it’d be nice to be able to monitor a bit more preceisely where’s the transaction in the pipeline

    2. the error message is often cryptic and not human readable, ex:

    Error: REJECTED: TRANSACTION_FAILED Error at pc=0:1073: An ASSERT_EQ instruction failed: 9:6 != 9:5.

    Is there a way / tool to be able to debug this kind of failed transactions?

      cairocairo-langpython

    Newton

    asked

    4 months ago


    2 answers

    0

    pending is available on testnet as well. It is also supported via the RPC API with BlockID="pending" kind of parameters, same as "latest".

    The latest pathfinder caches pending replies locally every 5s (10s?). pending is meant as a bandaid while block times are high (i.e. mostly mainnet)

    answered

    4 months ago

    0

    There is a PENDING status where you can see the tx on Voyager but it's not yet ACCEPTED_ON_L2 meaning the block hasn't been created yet. Is that what you are looking for? PENDING status is supposed to mean it won't fail (even if I have seen txs fail in specific cases). Also, voyager is usually a bit behind. And rejected transactions don't appear in the block at all for now (should change with Sierra I think).

    I experience it on mainnet, yes. See https://www.cairo-lang.org/docs/hello_starknet/intro.html#interact-with-the-contract

    I think I don't experience it on testnet though… Not 100% sure

    did you try this? https://docs.starknet.io/docs/CLI/commands/#starknet-tx_status Specify the --contract param to see error locations and --error_message to focus on the error

    (on a failed transaction)

    also, please note => https://docs.starknet.io/docs/Blocks/transaction-life-cycle#the-pending-block that querying the "PENDING block" becomes obsolete with full nodes. But I think we will still know that the tx is pending

    answered

    4 months ago

    Your answer

    NEWTON

    NEWTON