massa icon indicating copy to clipboard operation
massa copied to clipboard

Implement missing gRPC filters

Open aoudiamoncef opened this issue 2 years ago • 3 comments

  • [x] document all added functions
  • [x] try in sandbox /simulation/labnet
    • [ ] if part of node-launch, checked using the resync_check flag
  • [x] unit tests on the added/changed features
    • [x] make tests compile
    • [x] make tests pass
  • [x] add logs allowing easy debugging in case the changes caused problems
  • [x] if the API has changed, update the API specification

fix #4443

We have some TODOs in massa-proto and make it more defensive to avoid flooding the clients.

// NewSlotExecutionOutputs Filter
message NewSlotExecutionOutputsFilter {
  // Filter
  oneof filter {
    //TODO add ALL to receive all the slot execution outputs. Same for all
    // Execution output status
    massa.model.v1.ExecutionOutputStatus status = 1;
    // Slot range
    massa.model.v1.SlotRange slot_range = 2;
    //TODO by default nothing is returned, we should add a filter to receive all the slot execution outputs ALL
    // AsyncPoolChangesFilter
    AsyncPoolChangesFilter async_pool_changes_filter = 3;
	...
  }
}

// AsyncPoolChangesFilter
message AsyncPoolChangesFilter {
  // Filter
  oneof filter {
    //TODO to be replaced by ALL
    // Do not return any message
    massa.model.v1.Empty none = 1;
    ```
    
The changes above are breaking the gRPC API and should be continued when builders requires those features and are ready to upgrade.

aoudiamoncef avatar Oct 09 '23 16:10 aoudiamoncef

can u make good unit test for new_slot_execution_output

This won't fit in one big test, we tons of case to cover.... But i'm trying to reuse existing test tools functions to generate test data to have more accurate tests. Stay tuned

aoudiamoncef avatar Oct 12 '23 21:10 aoudiamoncef

I made a small refactoring in bootstrap tests to be able to extract the tools module and make it public.

aoudiamoncef avatar Oct 16 '23 16:10 aoudiamoncef

@modship I've added some basic tests which covers filters usage. But there if a lot of combinations to test

aoudiamoncef avatar Oct 17 '23 15:10 aoudiamoncef