Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: zksync system logs crash the sync engine #1306

Open
typedarray opened this issue Dec 3, 2024 · 0 comments
Open

bug: zksync system logs crash the sync engine #1306

typedarray opened this issue Dec 3, 2024 · 0 comments
Labels
A: Sync engine Area: Sync engine T: Bug Type: Bug

Comments

@typedarray
Copy link
Collaborator

ZKSync Era has logs that don't have a corresponding transaction. This currently fails one of our validations and crashes the sync engine.

Potential solution

The Graph Node solution was to relax the validation with a special case that allows logs that have a missing transaction as long as log.transactionHash is 0x00....

If we followed the same approach, we would technically need to make the entire event.log.transaction object nullable, which would suck. I think a decent short-term solution is to allow the type to be incorrect for now, and at some point we'll add chain-specific configuration/types to handle situations like this.

Repro

Error

Error: Detected inconsistent RPC responses. 'log.transactionHash' 0x0000000000000000000000000000000000000000000000000000000000000000 not found in 'block.transactions' 0x8f1b3e111f462cfb17e887ab67db92311d2d887cd8e6ca11c5bb85f2847c274f

eth_getLogs returns one log

curl -X POST https://sepolia.era.zksync.dev \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [{
    "blockHash": "0x8f1b3e111f462cfb17e887ab67db92311d2d887cd8e6ca11c5bb85f2847c274f"
  }],
  "id": 1
}'

eth_getBlockByHash returns zero transactions

curl -X POST https://sepolia.era.zksync.dev \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0x8f1b3e111f462cfb17e887ab67db92311d2d887cd8e6ca11c5bb85f2847c274f",
    true
  ],
  "id": 1
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Sync engine Area: Sync engine T: Bug Type: Bug
Projects
None yet
Development

No branches or pull requests

1 participant