Performance Issue
Project: ethernal-backend
Type: N+1 Query
Impact: 72 events in 24h
Regression: No
Transaction: blockSync
Link: https://sentry.tryethernal.com/organizations/sentry/issues/23/
Problem
Individual block queries are being made repeatedly during block sync process instead of batch querying, creating an N+1 pattern.
Suggested Fix
Add eager loading/batch loading for blocks in the blockSync process. Use findAll with IN clause instead of individual findByPk calls.
Evidence
SELECT "id", "baseFeePerGas", "difficulty", "extraData", "gasLimit", "gasUsed", "hash", "miner", "nonce", "number", "parentHash", "l1BlockNumber", "timestamp", "transactionsCount", "raw", "workspaceId", "state", "orbitBatchId", "logsBloom", "mixHash", "receiptsRoot", "sendCount", "sendRoot", "sha3Uncles", "size", "stateRoot", "transactionsRoot", "withdrawals", "createdAt", "updatedAt"
FROM "blocks" AS "Block"
WHERE "Block"."id" = 553142833;
Created by Sentry Scanner
Performance Issue
Project: ethernal-backend
Type: N+1 Query
Impact: 72 events in 24h
Regression: No
Transaction:
blockSyncLink: https://sentry.tryethernal.com/organizations/sentry/issues/23/
Problem
Individual block queries are being made repeatedly during block sync process instead of batch querying, creating an N+1 pattern.
Suggested Fix
Add eager loading/batch loading for blocks in the blockSync process. Use findAll with IN clause instead of individual findByPk calls.
Evidence
Created by Sentry Scanner