Metagraphs that utilize the onSnapshotConsensusResult hook may wish to interact with additional storage and third-party APIs using a reproducible hash value. By passing the Hashed[CurrencyIncrementalSnapshot] we retain the original functionality without any additional imports needed during the consumeMajorityArtifact evaluation.
While it is possible to import the required dependencies within the data application implementations and create the needed KryoSerializer to produce the Hashed[_] value locally, this is a common use-case where boilerplate infrastructure code may be simplified by incorporation into the underlying framework.
Changes
modified function signature of onSnapshotConsensusResult to take an argument of Hashed[CurrencyIncrementalSnapshot]
Summary
Metagraphs that utilize the
onSnapshotConsensusResult
hook may wish to interact with additional storage and third-party APIs using a reproducible hash value. By passing theHashed[CurrencyIncrementalSnapshot]
we retain the original functionality without any additional imports needed during theconsumeMajorityArtifact
evaluation.While it is possible to import the required dependencies within the data application implementations and create the needed
KryoSerializer
to produce theHashed[_]
value locally, this is a common use-case where boilerplate infrastructure code may be simplified by incorporation into the underlying framework.Changes
onSnapshotConsensusResult
to take an argument ofHashed[CurrencyIncrementalSnapshot]
Testing
work in progress
Tickets