This PR introduces a ViewableQueue trait and implementation in order to expose pending data updates via a GET public HTTP route. This work is motivated to provide a "mempool" equivalent at the metagraph layer while maintaining atomicity, minimizing changes to existing usages of currency.l1.modules.Queues, and reusing the available API of Cats standard Queue.
Additionally, smaller changes were incorporated to facilitate encoding and decoding of DataUpdates and HttpSuite was updated to MutableIOSuite as the override of Res and def sharedResource were causing compilation errors.
Changes
Updated currencyL1 project definition to include test dependencies
Updated usages of dataUpdates: Queue -> ViewableQueue
Added GET route at /data to return the latest view of pending updates
Added MockDataApplicationService and ...State to facilitate testing
Added EntityEncoder[F, Signed[DataUpdate]] in DataApplication package
Updated HttpSuite from SimpleIOSuite -> MutableIOSuite
Summary
This PR introduces a
ViewableQueue
trait and implementation in order to expose pending data updates via aGET
public HTTP route. This work is motivated to provide a "mempool" equivalent at the metagraph layer while maintaining atomicity, minimizing changes to existing usages ofcurrency.l1.modules.Queues
, and reusing the available API of Cats standardQueue
.Additionally, smaller changes were incorporated to facilitate encoding and decoding of
DataUpdates
andHttpSuite
was updated toMutableIOSuite
as the override ofRes
anddef sharedResource
were causing compilation errors.Changes
currencyL1
project definition to include test dependenciesdataUpdates: Queue -> ViewableQueue
GET
route at/data
to return the latest view of pending updatesMockDataApplicationService
and...State
to facilitate testingEntityEncoder[F, Signed[DataUpdate]]
inDataApplication
packageHttpSuite
fromSimpleIOSuite -> MutableIOSuite
Testing
ViewbleQueueSuite
unit testsDataApplicationRoutesSuite
integration tests cases handling