All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Bumped dependencies to
substreams
to 0.6 andprost
to 0.13 (see Upgrade notes) - Added
Timestamp
type.
Added ToValue
implementation for for Vec<Vec<u8>>
which used to create Graph Node schema object of the form [Bytes]
.
- Added
ToValue
implementation forVec<BigInt>
,&Vec<BigInt>
,Vec<BigDecimal>
, and&Vec<BigDecimal>
.
-
Breaking Protobuf package id has been renamed to
sf.substreams.sink.entity.v1
(previouslysf.substreams.entity.v1
). This is actually a soft breaking change, you will not see breaking code due just by bumping to this version and also,graph-node
accepts the both package ids. The only change required on your part is changing your imports and module's output type (not the differences onentities_change
andoutput.type
fields):From
imports: entities_change: https://github.com/streamingfast/substreams-entity-change/releases/download/v1.2.1/substreams-entity-change-v1.2.1.spkg ... - name: graph_out kind: map inputs: ... output: type: proto:sf.substreams.entity.v1.EntityChanges
To
imports: entities_change: https://github.com/streamingfast/substreams-sink-entity-changes/releases/download/v1.3.0/substreams-sink-entity-changes-v1.3.0.spkg ... - name: graph_out kind: map inputs: ... output: type: proto:sf.substreams.sink.entity.v1.EntityChanges
-
Breaking Renamed
substreams_entity_change::pb::entity::entity_change::Operation::Unset
to be become...::Operation::Unspecified
to make the Protobuf conforms to buf lint rules.We take the liberty to change it because we expect that almost everyone is using the abstraction provided by this library.
-
Added more conversion for
ToValue
defined fortables::Tables
.Note Added possibility to move some value in their final destination. So if you don't need the value when doing
.set(...)
calls inTables
, moving the value instead of passing it by reference (.set(..., &value)
) forString
andVec<String>
will lead to small speed improvements.
- Speed up
tables::Tables#to_entity_changes
by removing multipleclone
that were not required.
-
Added
tables
module so that you can use it as a better abstraction to build up your entity changes.let mut tables = Tables::new(); // Create a row (<entity_name>, <id>).[set(<column>, <value>), ...] tables .create_row("Factory", id) .set("poolCount", &bigint0) .set("txCount", &bigint0) .set("totalVolumeUSD", &bigdecimal0) .set("totalVolumeETH", &bigdecimal0) .set("totalFeesUSD", &bigdecimal0) .set("totalFeesETH", &bigdecimal0) .set("untrackedVolumeUSD", &bigdecimal0) .set("totalValueLockedUSD", &bigdecimal0) .set("totalValueLockedETH", &bigdecimal0) .set("totalValueLockedUSDUntracked", &bigdecimal0) .set("totalValueLockedETHUntracked", &bigdecimal0) .set("owner", format!("0x{}", Hex(utils::ZERO_ADDRESS).to_string())); // Update a row (<entity_name>, <id>).[set(<column>, <value>), ...] tables .update_row("Bundle", "1").set("ethPriceUSD", &delta.new_value);
-
Added clean invalid string byte sequence when using a
String
,&String
,Delta<String>
,Delta<&String>
,Vec<String>
,&Vec<String>
,DeltaArray<String>
and&DeltaArray<String>
.
- Added implementations on the ToField trait used by the EntityChange struct for BigInt, BigDecimal, and Bytes arrays.
- Deprecated
sf.substreams.entity.v1.EntityChange#ordinal
, this is not used ingraph-node
. - Deprecated
sf.substreams.entity.v1.Field#old_value
, this is not used ingraph-node
.
- Added
FINAL
tosf.substreams.entity.v1.EntityChange#Operation
enum list.
- Adding
FINAL
entity change operation
- BREAKING Changed database proto package path from
substreams.entity.v1tosf.substreams.entity.v1
- Bump
substreams
library to0.5.0
- Added support for
u64
converted toTyped::Bigint
. - Added possibility to record a
change
usingnew: Into<Typed>
to simulate a value creation. - Added possibility to record a
change
using(old: Into<Typed>, new: Option<Into<Typed>>)
to simulate a value deletion. - Added possibility to record a
change
using(old: Into<Typed>, new: Into<Typed>)
. - Refactored to allow delta to be taken from any
Into<Typed>
which makes it much easier to extend when there is missing types. - Refactored to reduce amount of
clone
perform. - Add
f64
andi64
and there respective Deltas to be converted toBigDecimal
andBigInt
- Replace
DeltaI32
withDeltaInt32
- Bump
substreams
- Added
entity.proto
containing proto message definitions - Added
change.rs
containing struct definitions forEntityChange
types andhelper.rs
containing helpers for respective struct definitions forEntityChange