masa-finance / masa-bittensor

Bittensor Subnet Config
https://masa.ai
MIT License
9 stars 11 forks source link

Refactor Forward logic #55

Closed hide-on-bush-x closed 3 months ago

hide-on-bush-x commented 3 months ago

Description

The goal of this PR is to have a better and more module structure for the api endpoints and the requests to the miners

Now each endpoint ( module ) has its own forward_query method that interface with the rest API each forward_query method takes care of handling the specific module actors, such us: dendrite request, rewards calculation, parsing responses and in the future miner selection

Forwarder class, is an abstraction of the common logic behind all modules at the moment, this can mutate in the future but for now covers all the cases we need

Tested all three endpoints and all of them return successful responses