Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRT-594 provider optimizer (lavanet#399)
* provider state tracker work in progress * reliability manager added vote handler * finished implementing vote updater and it's registration and transactions * added apiInterface to relay.pb and implemented provider listener * continue work rpcprovider * added single provider preparation function * added verification for proof * added tryRelay * added onSessionFailure usage * added onSessionDone * sync * changed onSessionDone interface * handle proof sending * fix reference * WIP psm * added subscribe support * WIP psm * WIP * WIP * continued subscription code * finished provide side subscribe * handle subscription failure in consumer * handle subscribe success without an error on provider side * handle error status on relaySubscribe * added cache to statequery * added deps * added retry on txSender sequence mismatch * move common code to a method * added option for reward server to reject a proof when it has an updated value * wrap common code in a method * reward server work * relaynumber fixed * go mod tidy * finished normal flow of get session. * finished normal flow of get session. * adding sync loss handling * adding consumer blocked handling * adding on session done functionality * added rewards claims and tracking * bug fix * refactored chainproxy into parsableChainProxy so we can implement chain fetcher with the existing classes * revert, parsableChainMessage isn't needed * continued work on chainFetcher WIP * WIP psm methods almost done * finished implementing chainFetcher * adding recommendedEpochNumToCollectPayment * adding recommendedEpochNumToCollectPayment * adjusting code in state_query * indicative error in reward server * finished missing chain fetcher block parsing * fixing reward server provider session manager reward sync * tendermintrpc chain_fetcher now works * added support for rest chain fetcher * added support for all apiInterfaces, using chain fetcher * example configuration to run rpc provider * added examples for configs * Fixed context shutdown issues, fixed bugs * new configurations for rpcprovider * change lava conf * adding data reliability * Finished provider session manager integration and implementation!!! * fixing is valid epoch mistake. * changed chain tracker range to be inclusive and fixed a bug * fix reference overwriting * handle initialization on ProviderSessionManager * fix providerSessionsManager bugs * fixed wrong lock checks * fixed tx sender parsing issue * changed IP:PORT to HOST:PORT * do not crash if cache isn't connected * still some bugs to fix * git ignore generated conf file * changed init chain commands, added some prints, modified fatals into errors on multiple chains so they won't kill the process * removed check for websocket on tendermint until we decide what to do * better handling of missing urls and endpoints definitions * better capture grpc endpoint misconfiguration * happy flow for provider session manager * adding happy flow, session failure, epoch update tests * adding more tests to psm * changing test names * Fixing data reliability in PSM * data reliability psm WIP * fixing subscription in PSM. adding unitests for the entire package. * using generics to trigger delete event instead of using the code twice * remove print * fixing some issues related to connector crashing * extract cobra commands from main * refactored proto bufs, now changes to the code * WIP changing fields in relay * wip * adding config files for e2e * fixing provider cu charge in case consumer pays more * changed some tests to use new format * fixed gov test * continue refactor * provider error update * Bug fixing session * successfully build relay after changes * successfully compiled after refactoring relay.pb now to unitesting * rename relay fields to better represent what they are * added some fields to badge * added chain id verification to relays * Fixing VRF issue with rpcprovider * panic protection * finished merging * lint + fix * fixed data reliability miss protection to surface problems and fix unitests * fix unitests failing * go mod tidy * merge fixes * merge main * fix unitest merge problem * make E2E great again * fixed lint, added debug print * fix tests * removed deprecated relayer code * fix problem in dev script * removed relayer/ unit tests after migrating to protocol * fixed comment naming convention * added parsable options to rpcprovider configuration, as preperation to auth adding * added auth to rpcprovider * added test-mode flag for RPCCconsumer to print the input it's receiving * better default chain tracker print params * lint * fix e2e configurations * typo in conf * finished adding ip forwarding header * also in connector * added example config for ip-forwarding * added default parameter to spec blockParsing so all blockParser can now have default configured * lint * modified utils logging function format to use interface variadic call * lint * added guid to consumer and provider * lint * sync go sum * fix unitests * lint * undo the merge problem in cosmos sdk spec * fixed issue setting guid in salt * go mod fix * add probing * wip * added probing * lint * fix unitest * fix blocking probing behavior when no pairings are available * save optimizers per chain in consumer * building provider storage for QoS data WIP * added provioder data updates, still left to do the decay calculations and latency/sync updates * added availability score * moved timeout calculations to a common library, implementd optimizer data gathering * finished provider optimizer logic, now need to support using it in the rpcconsumer * lint * added gud on lock failure, added retry on trylock, added backoff on context timeout * send proof runs in parallel * backoff mechanism * reduce cache size * fixing relay number related issues * added timeout * fixing csm dr issue * fixing timeout. * fixing update session cu behavior * adding upgrade handler * added missing cu support for mismatch to continue giving service up to threshold * lint * refactor sending a session in order to construct data reliability relay * fix deadlocks in UpdateSessionCU * fixed a mistake in missing cu checks * refactor relayInner for better handling of context cancel * use the saved threshold instead of a placeholder * fixed some issues, reduced probing overhead * added prints * added perturbation to optimizer, fixed a few bugs * make probing to different providers parallel * log change * added TODOs for handover * handle startup races in provider, and an error nil reference on subscription * solve concurrency races in optimizers creation * fix unitests * fix bugs * prevent nil clients * merge garbage * added sync score, changed normal distribution to poisson distribution which is more correct and easier to code * wip * fixed all known issues, unit tests wip * lint * added tests, fixed bugs * lint * revert modifications to probing * merged probing with main * comments * fix bug not setting a timeout on probe * remove unnecessary call * give better availability score for new entries making bad service providers --------- Co-authored-by: Ran Mishael <[email protected]>
- Loading branch information