Constellation-Labs / tessellation

Monadic execution contexts for topology organization
Apache License 2.0
49 stars 28 forks source link

Enrich snapshot value passed into onSnapshotConsensusResult #815

Closed scasplte2 closed 8 months ago

scasplte2 commented 8 months ago

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 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

Testing

work in progress

Tickets

marcinwadon commented 8 months ago

@scasplte2 please remember to add the correct label