blockscout-rs icon indicating copy to clipboard operation
blockscout-rs copied to clipboard

user-ops-indexer: User operations cannot scan failed transactions

Open xiang-xx opened this issue 1 year ago • 1 comments

Describe the bug

Successful transactions can be scanned into User Operations, but failed transactions cannot.

Observed behavior

Fail transaction: https://scan-testnet.bevm.io/tx/0xd0a51ecf774725c0b4c640cf47e8a97debbbca0079f2a8246c2618febbf81737 User operations: https://scan-testnet.bevm.io/ops Websocket rpc: wss://testnet-trace.bevm.io

Expected behavior

Failed transactions can be scanned into User Operations.

Environment

Websocket rpc: wss://testnet-trace.bevm.io Backend: v6.9.1-beta

<envs>
- name: USER_OPS_INDEXER__INDEXER__RPC_URL
  value: 'wss://testnet-trace.bevm.io'
- name: USER_OPS_INDEXER__INDEXER__ENTRYPOINTS__V06_ENTRY_POINT
  value: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
- name: USER_OPS_INDEXER__INDEXER__ENTRYPOINTS__V07
  value: 'false'
- name: USER_OPS_INDEXER__DATABASE__CREATE_DATABASE
  value: 'false'
- name: USER_OPS_INDEXER__DATABASE__RUN_MIGRATIONS
  value: 'true'
- name: USER_OPS_INDEXER__INDEXER__CONCURRENCY
  value: '10'
- name: USER_OPS_INDEXER__INDEXER__REALTIME__ENABLED
  value: 'true'
- name: USER_OPS_INDEXER__INDEXER__PAST_RPC_LOGS_INDEXER__ENABLED
  value: 'false'
- name: USER_OPS_INDEXER__INDEXER__PAST_RPC_LOGS_INDEXER__BLOCK_RANGE
  value: '1000'
- name: USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__ENABLED
  value: 'false'
- name: USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__START_BLOCK
  value: '0'
- name: USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__END_BLOCK
  value: '0'
- name: USER_OPS_INDEXER__API__MAX_PAGE_SIZE
  value: '100'
- name: USER_OPS_INDEXER__SERVER__HTTP__ADDR
  value: '[::]:8050'

xiang-xx avatar Nov 13 '24 09:11 xiang-xx

Since the entire transaction failed and reverted, no changes to the blockchain state were made. From the AA user perspective, this situation is identical as if the bundle transaction hasn't been sent at all. The bundler likely will resend the bundle with corrected calldata, and then we'll be able to correctly index, parse and figure out the execution status of the AA operation.

Same approach also applies for other entities derived from raw transactions (e.g. failed transactions don't contain token transfers / logs), so we consider this behavior to be working as intended.

k1rill-fedoseev avatar Dec 27 '24 10:12 k1rill-fedoseev