graphprotocol / graphprotocol/graph-node
[Bug] Subgraphs failing with non-deterministic error when attempting to divide BigInt by 0
Open
Nobody has claimed this yet.
bug
Stale
subgraph errors
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Bug report
Subgraph deployment fails with a non-deterministic error that should be deterministic
Relevant log output
failed to process trigger: block #21586871 (0x158d…6bda), transaction b92f1e508502add12c1c3659e1c300cba3257ba467d21c3b7759a02c8ae5dd26: module instantiation failed: attempted to divide BigDecimal `86400` by zero wasm backtrace: 0: 0x4b99 - <unknown>!~lib/@graphprotocol/graph-ts/common/numbers/BigDecimal#div 1: 0x522d - <unknown>!start:src/modules/Rewards 2: 0xef4a - <unknown>!~start
IPFS hash
QmaqjayWnJntBFg5fr4TbvPHhVDG3xbbvuA4FCDaUuxz8X
Subgraph name or link to explorer
No response
Some information to help us out
- Tick this box if this bug is caused by a regression found in the latest release.
- Tick this box if this bug is specific to the hosted service.
- I have searched the issue tracker to make sure this issue is not a duplicate.
OS information
None
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the deployment log and the wasm backtrace, especially BigDecimal#div, then use IPFS hash QmaqjayWnJntBFg5fr4TbvPHhVDG3xbbvuA4FCDaUuxz8X to investigate the reported subgraph failure. Reproduce the divide-by-zero deployment behavior and establish what deterministic error should be emitted; the payload names no source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- backend, blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100