# Deployment plan
- deploy mev-monitoring code
- add `KEYS_API_URL` as a new environment variable with appropriate value
- apply migration for DB
- apply data migration [link to sql queries](https://hackmd.io/@rOVWtirgSgu6p7oJgzGwVg/BkE_KL5-p)
- rollout Grafana changes [link to sql queries](https://hackmd.io/rgUuPwP1SA68F7aBce6G0Q)
- deploy mev-monitoring-api code
- deploy mev-monitoring-ui code
# Check list
- Grafana dashboard operates correctly
- count of indexed slots keep growing
- check staking modules select box
- fees-monitoring dashboard shows appropriate data
- staking module select box reflects two modules
- node operators being showed accordingly (depends on specified module)
# Integration tests
We can create a separate repository for monitoring integration tests only. It will contain all parts of monitoring:
- mev
- relay
- fee-dashboard
Once integration tests starts, a forked chain created programmatically from testnet, and run all monitoring parts on the chain.
## MEV Monitoring API
- Node operators, keys and staking modules reflects in MEV-monitoring API. Check that MEV-monitoring pulled data from KAPI and able to give it via MEV-M-API:
- `/v1/registry/validators/{pubkey}`
- `/v1/registry/operators`
- `/v2/modules`
## Other services
- fee recipient
- mock `locatorContract.elRewardsVault`
- check that Prometheus contains appropriate fee recipients
- allowed relays
- where relays are stored instead of hardcoded? mock them
- check that Prometheus contains appropriate allowed relays
## Indexing (?)
All cases are going along with adding new finalized block in a forked chain with transactions.
- Block data. MEVM should get data from block and this data should be reflected in `/v1/slots` via MEVM-API
- Payment indexing. MEVM should successfully grab MEV Reward. Consider the cases below:
- the last one should contain MEV reward to Lido, in the meanwhile, from address should be any, not a block proposer address
- one of transaction should contain
- negative case:
- Validator indexing. MEVM gets validator pubkey from CL
- Value indexing. MEVM gets delta balance from block
- Bids indexing. MEVM gets appropriate ranges from relay-monitoring
## Metrics
All metrics should be pushed to Prometheus for each operator simultaneously. Meaning