CAUTION: If you are running your own Graph Node, make sure to run 0.14.0 for a week or two and deploy a new version of your subgraphs at least once before switching to 0.15.0. The 0.14.0 release gradually removes the public.entities
table in favor of per-subgraph entities tables. Switching to 0.15.0 too early may break existing subgraphs and require you to redeploy and reindex immediately.
Fallible contract calls (#1139)
Calls to contract functions can fail due to assertions in the contract. Until now there was no way to handle this in subgraphs gracefully. This release introduces new try_someContractFunction
call variants that return a result object with reverted
and value
fields. These can then be used in mappings to handle call failures.
An example can be found in the documentation.
Top-level templates (#1085)
Data source templates have been moved to a top-level templates
field in the manifest. The data source templates documentation has been updated accordingly.
Top-level templates simplify creating new data sources at runtime: templates can now be referred to from all data sources and can create new data sources from other templates as well.
This also affects subgraph validation and code generation in a few ways. While Graph Node >= 0.15.0 still allows subgraphs with nested templates to run, Graph CLI now rejects such subgraphs. Code generation now puts all generated template classes into a single templates.ts
file.
For more details, see the original issue.
Docker changes
- Set default Ethereum network name to
mainnet
indocker-compose.yml
(#1086). - Add
setup.sh
script for Linux host IP detection. Run this before thedocker-compose up
and it will inject the host IP address intodocker-compose.yml
(#1123).
Other changes
- Add support for arrays of Ethereum tuples / Solidity structs (#1119).
- Optimize performance of serializing data from Rust to AssemblyScript (#1145).
- Support decoding Ethereum strings with broken UTF-8 encoding (#1152).
- Bump default IPFS timeout to 60s (#1091).
- Fetch blocks from Ethereum if loading them from the cache fails (#1108).
- Reduce memory usage of filtering blocks with call traces (#1110).
- Add
GRAPH_TOKIO_THREAD_COUNT
environment variable (#1117, see environment variable docs). - Add
GRAPH_NODE_ID
environment variable as an alternative to--node-id
(#1136, see environment variable docs). - Fix block/call handlers from dynamic data sources not being loaded on node restart (#1087).
- Fix ingesting blocks with no transactions (#1099).
- Fix indexing the genesis block with Ganache (#1094).
- Fix skipping call traces without insufficient data (#1104).
- Fix Postgres indexes for string fields to support values of arbitrary length (#1138).
- Update codebase to Rust 1.37 (#1118).
- Update dependencies.