Skip to content

subgraph: bind DecimalFloat on Robinhood Chain - #2868

Open
kaisbaccour wants to merge 1 commit into
mainfrom
fix/decimal-float-robinhood
Open

kaisbaccour wants to merge 1 commit into
mainfrom
fix/decimal-float-robinhood

Conversation

@kaisbaccour

@kaisbaccour kaisbaccour commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The bug

The Robinhood subgraph deployed today is not lagging, it is dead. It aborted on the first Raindex event ever emitted on chain 4663 — a 20 USDG deposit at block 60,339,226:

Mapping aborted ... Call reverted, probably because an 'assert' or 'require' in the
contract failed ... in handler 'handleDeposit' at block #60339226

getDecimalFloatAddress() in subgraph/src/float.ts picks the contract from a hardcoded if/else over dataSource.network(): flare, base, bsc, arbitrum-one, matic, linea, mainnet. Robinhood matches none, so it falls through to FALLBACK_DECIMAL_FLOAT_ADDRESS = 0x…0001. eth_getCode for that address on 4663 returns 0x. Every DecimalFloat call therefore reverts, and since every numeric path goes through getCalculator(), the first event kills the subgraph.

The fix

DecimalFloat is deployed on Robinhood Chain, at Base's address:

bytes
0x2F665EcE3345bF09197DAd22A50dFB623BD310A7 on 4663 36,335
the same address on Base 36,335

And the exact call that aborted succeeds against it: fromFixedDecimalLossless(20000000, 6)0xfffffffa00000000000000000000000000000000000000000000000001312d00 (USDG is 6 dp, the deposit was 20 USDG).

Which network string

This branch keys on robinhood, the network name an Ormi build carries. A Goldsky deployment renders the manifest as robinhood-mainnet (the networks.json key in #2866) and would still fall through. Adding that string to the same branch is a one-word change and fixes that deployment too — left out here deliberately.

Two things for whoever redeploys

  • A fixed deploy is a new deployment, not a resume. A deterministically failed graph-node subgraph does not restart. Reindexing is cheap here: about 790k blocks carrying two Raindex events in total.
  • This PR does not touch networks.json. subgraph-deploy loops every key in that file, so adding one here would mint another hosted subgraph on the next dispatch.

Worth noting beyond this chain

The failure shape matters more than the missing address: an unknown network returns a dead address rather than failing the build, so the first symptom is a subgraph that indexes 790k blocks and then dies on its first event. Every future chain hits the same trap. Making the fallback a compile-time or startup failure would be a small, separate change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Added support for resolving the DecimalFloat contract address on the Robinhood network.

The Robinhood subgraph is not lagging, it is dead: it aborted on the
first Raindex event ever emitted on 4663, a 20 USDG deposit at block
60,339,226, with "Call reverted ... in handler 'handleDeposit'".

getDecimalFloatAddress picks the contract from a hardcoded switch over
dataSource.network(). Robinhood matches no branch, so it falls through
to FALLBACK_DECIMAL_FLOAT_ADDRESS, 0x...0001, which has no code on that
chain — eth_getCode returns 0x — so every DecimalFloat call reverts and
the mapping aborts.

DecimalFloat is deployed there, at Base's address
0x2F665EcE3345bF09197DAd22A50dFB623BD310A7: 36,335 bytes on 4663 and
36,335 bytes on Base, and the exact call that aborted,
fromFixedDecimalLossless(20000000, 6), returns
0xfffffffa...01312d00 against it.

The branch keys on "robinhood", the network name the Ormi build carries.
A Goldsky deployment renders the manifest as "robinhood-mainnet" and
would still fall through; adding that string to this same branch is the
one-word change that fixes it too, left out here deliberately.

Note the shape of the failure rather than the value: an unknown network
returns a dead address instead of failing the build, so the first
symptom is a subgraph that indexes 790k blocks and then dies on its
first event.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c5d4c120-0e00-43a7-a3b4-11fab0893887

📥 Commits

Reviewing files that changed from the base of the PR and between a76fb70 and 9aafe6b.

📒 Files selected for processing (1)
  • subgraph/src/float.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The DecimalFloat address resolver now maps the robinhood network to its configured contract address instead of the fallback address.

Changes

DecimalFloat network mapping

Layer / File(s) Summary
Robinhood address resolution
subgraph/src/float.ts
Adds a robinhood branch that returns the configured DecimalFloat contract address.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 9aafe

This small mapping change enables Robinhood DecimalFloat calls to use the deployed contract address and is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: binding DecimalFloat on Robinhood Chain.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/decimal-float-robinhood

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant