fix: set Transaction.to to zero address for contract-creation txs - #244
Closed
rickstaa wants to merge 1 commit into
Closed
fix: set Transaction.to to zero address for contract-creation txs#244rickstaa wants to merge 1 commit into
rickstaa wants to merge 1 commit into
Conversation
Contract-creation transactions have no `to` address, so `event.transaction.to` is null. createOrLoadTransactionFromEvent only set `tx.to` when non-null, but `Transaction.to` is non-nullable in the schema. graph-node then aborts with "missing value for non-nullable field `to`", halting all indexers at the offending block. This first triggered at block 485100965 (tx 0x1eb52cd3…), a batch claim-and-restake executed from a contract constructor, freezing the Arbitrum One subgraph ~32h behind chain head. Default `tx.to` to the zero address when the tx has no recipient. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JoKwkmU3jMU6DMGoTcCKRe
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe transaction loading helper now defaults ChangesTransaction recipient handling
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🚀 Subgraph Studio preview deployed
curl -H 'Content-Type: application/json' \
-d '{"query":"{ protocol(id: \"0\") { inflation } }"}' \
https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-244-c7f08f9-29698352733 |
This was referenced Jul 20, 2026
Member
Author
|
Closed in favor of #245 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The subgraph halts on any contract-creation transaction that emits a protocol event. On 2026-07-18 this froze Arbitrum One at block
485100964; all 9 indexers reporthealth: failedwithmissing value for non-nullable field 'to'. See #243.Root cause
createOrLoadTransactionFromEvent(utils/helpers.ts) skipstx.towhenevent.transaction.tois null, butTransaction.toisString!(non-nullable). Contract-creation txs have a nullto, so graph-node aborts deterministically.Fix
Default
tx.toto the zero address (EMPTY_ADDRESS) when the tx has no recipient. Keeps the schema non-nullable — no downstream/type changes.Testing
yarn codegenandyarn buildpass.Deployment
Redeploy and graft from block
485100964(last good block) so indexers resume instead of full-resyncing. Republish so subgraphFE63…points at the fixed deployment.Fixes #243
🤖 Generated with Claude Code
https://claude.ai/code/session_01JoKwkmU3jMU6DMGoTcCKRe
Summary by CodeRabbit