Skip to content

v0.29.0

Compare
Choose a tag to compare
@neysofu neysofu released this 06 Dec 09:19
· 1279 commits to master since this release
$ docker pull graphprotocol/graph-node:v0.29.0

Upgrade notes

  • This release includes a determinism fix that affect a very small number of subgraphs on the network (we counted 2): if a subgraph manifest had one data source with no contract address, listening to the same events or calls of another data source that has a specified address, then the handlers for those would be called twice. After the fix, this will happen no more, and the handler will be called just once like it should.

    Affected subgraph deployments:

    • Qmccst5mbV5a6vT6VvJMLPKMAA1VRgT6NGbxkLL8eDRsE7
    • Qmd9nZKCH8UZU1pBzk7G8ECJr3jX3a2vAf3vowuTwFvrQg

    Here's an example manifest, taking a look at the data sources of name ERC721 and CryptoKitties, both listen to the Transfer(...) event. Considering a block where there's only one occurrence of this event, graph-node would duplicate it and call handleTransfer twice. Now this is fixed and it will be called only once per event/call that happened on chain.

    In the case you're indexing one of the impacted subgraphs, you should first upgrade the graph-node version, then rewind the affected subgraphs to the smallest startBlock of their subgraph manifest. To achieve that, you can use the following graphman rewind CLI command invocations:

    graphman rewind 0xd75c2a2412396b6b2b387323d84b9c19313dbba35ccb1493d94976fedb0b3a23 5774644 Qmccst5mbV5a6vT6VvJMLPKMAA1VRgT6NGbxkLL8eDRsE7
    graphman rewind 0xf23c45dd2e1ed77fce1919cdcc9df2de51e821763e9691f8adbb79a55ddb28a4 3914495 Qmd9nZKCH8UZU1pBzk7G8ECJr3jX3a2vAf3vowuTwFvrQg
    

    See #4055 for more information.

  • This release fixes another determinism bug that affects a handful of subgraphs. The bug affects all subgraphs which have an apiVersion older than 0.0.5 using call handlers. While call handlers prior to 0.0.5 should be triggered by both failed and successful transactions, in some cases failed transactions would not trigger the handlers. This resulted in nondeterministic behavior. With this version of graph-node, call handlers with an apiVersion older than 0.0.5 will always be triggered by both successful and failed transactions. Behavior for apiVersion 0.0.5 onward is not affected.

    The affected subgraphs are:

    • QmNY7gDNXHECV8SXoEY7hbfg4BX1aDMxTBDiFuG4huaSGA
    • QmYzsCjrVwwXtdsNm3PZVNziLGmb9o513GUzkq5wwhgXDT
    • QmccAwofKfT9t4XKieDqwZre1UUZxuHw5ynB35BHwHAJDT
    • QmYUcrn9S1cuSZQGomLRyn8GbNHmX8viqxMykP8kKpghz6
    • QmecPw1iYuu85rtdYL2J2W9qcr6p8ijich9P5GbEAmmbW5
    • Qmaz1R8vcv9v3gUfksqiS9JUz7K9G8S5By3JYn8kTiiP5K

    In the case you're indexing one of the impacted subgraphs, you should first upgrade the graph-node version, then rewind the affected subgraphs to the smallest startBlock of their subgraph manifest. To achieve that, you can use the following graphman rewind CLI command invocations:

    graphman rewind 0x8aed5a76735b0890d4c0a9e752c88cba4f3d9d0e4e1dad70d6bd913cc279e4b8 7913573 QmNY7gDNXHECV8SXoEY7hbfg4BX1aDMxTBDiFuG4huaSGA
    graphman rewind 0x15da49d2177dde3012b67f12d25d9ae4cb56c3638c2ec011298e509be27be77a 7303699 QmYzsCjrVwwXtdsNm3PZVNziLGmb9o513GUzkq5wwhgXDT
    graphman rewind 0x1be8b52bd6b3c29b1ead63f6a8bef83d626d8b6795f6c2d89c302cbe32d59830 10613640 QmYUcrn9S1cuSZQGomLRyn8GbNHmX8viqxMykP8kKpghz6
    graphman rewind 0xef547ca70b451cc9fedbc039edcfd4a35de80fce76ed6ad31bc15a47850dfefd 10736242 QmecPw1iYuu85rtdYL2J2W9qcr6p8ijich9P5GbEAmmbW5
    graphman rewind 0x8fb3744b077831856203bbfe465e9cb681d0ed0c67db297faee54f0542f045d3 5533890 Qmaz1R8vcv9v3gUfksqiS9JUz7K9G8S5By3JYn8kTiiP5K
    
    # Note: the following subgraph (https://github.com/Data-Nexus/721-Marketplace) is extremely
    # write-heavy, and your node may OOM while rewinding. If you run into this issue suggest
    # you either rewind in smaller chunks of blocks, or simply redeploy it.
    graphman rewind 0xf9bc13c7864c997aaed501715a0627a25e748c2df4889cc9cbf4d077e7bca34a 4944642 QmccAwofKfT9t4XKieDqwZre1UUZxuHw5ynB35BHwHAJDT
    

    See #4149 for more information.

What's new

  • Grafted subgraphs can now add their own data sources. #3989, #4027, #4030
  • Add support for filtering by nested interfaces. #3677
  • Add support for message handlers in Cosmos #3975
  • Dynamic data sources for Firehose-backed subgraphs. #4075
  • Various logging improvements. #4078, #4084, #4031, #4144, #3990
  • Some DB queries now have GCP Cloud Insight -compliant tags that show where the query originated from. #4079
  • New configuration variable GRAPH_STATIC_FILTERS_THRESHOLD to conditionally enable static filtering based on the number of dynamic data sources. #4008
  • New configuration variable GRAPH_STORE_BATCH_TARGET_DURATION. #4133

Docker image

  • The official Docker image now runs on Debian 11 "Bullseye". #4081
  • We now ship envsubst with the official Docker image, allowing you to easily run templating logic on your configuration files. #3974

Graphman

We have a new documentation page for graphman, check it out here!

  • Subgraph pruning with graphman! #3898, #4125, #4153, #4152, #4156, #4041
  • New command graphman drop to hastily delete a subgraph deployment. #4035
  • New command graphman chain call-cache for clearing the call cache for a given chain. #4066
  • Add --delete-duplicates flag to graphman check-blocks by @tilacog in #3988

Performance

  • Restarting a node now takes much less time because postgres_fdw user mappings are only rebuilt upon schema changes. If necessary, you can also use the new commands graphman database migrate and graphman database remap to respectively apply schema migrations or run remappings manually. #4009, #4076
  • Database replicas now won't fall behind as much when copying subgraph data. #3966 #3986
  • Block handlers optimization with Firehose >= 1.1.0. #3971
  • Reduced the amount of data that a non-primary shard has to mirror from the primary shard. #4015
  • We now use advisory locks to lock deployments' tables against concurrent writes. #4010

Bug fixes

  • Fixed a bug that would cause some failed subgraphs to never restart. #3959
  • Fixed a bug that would cause bad POIs for Firehose-backed subgraphs when processing CREATE calls. #4085
  • Fixed a bug which would cause failure to redeploy a subgraph immediately after deletion. #4044
  • Firehose connections are now load-balanced. #4083
  • Determinism fixes. See above. #4055, #4149

Dependency updates

Dependency updated to
anyhow 1.0.66
base64 0.13.1
clap 3.2.23
env_logger 0.9.1
iana-time-zone 0.1.47
itertools 0.10.5
jsonrpsee 0.15.1
num_cpus 1.14.0
openssl 0.10.42
pretty_assertions 1.3.0
proc-macro2 1.0.47
prometheus 0.13.3
protobuf-parse 3.2.0
semver 1.0.14
serde_plain 1.0.1
sha2 0.10.6
structopt removed
tokio-stream 0.1.11
tokio-tungstenite 0.17.2
tower-test d27ba65
url 2.3.1

Full Changelog: v0.28.2...v0.29.0