aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

feat(telemetry): check operators status on fetching operators list

Open avilagaston9 opened this issue 1 year ago • 0 comments

Motivation

We need to handle the scenario where an operator is deregistered from the quorum in the tracker.

Description

  • Periodically fetches operator statuses.
  • Discards responses from operators whose status is not "REGISTERED".
  • When finishing the trace, considers only "REGISTERED" operators when calculating missing responses.

How To Test

[!TIP] You will need a lot of terminals 😎

  1. Run anvil
make anvil_start_with_block_time
  1. Run aggregator
make aggregator_start
  1. Build operator
make build_operator
  1. Register operator 1
export OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
make operator_full_registration CONFIG_FILE=config-files/config-operator-1.yaml
  1. Register operator 2
export OPERATOR_ADDRESS=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
make operator_full_registration CONFIG_FILE=config-files/config-operator-2.yaml
  1. Register operator 3
export OPERATOR_ADDRESS=0x90F79bf6EB2c4f870365E785982E1f101E93b906
make operator_full_registration CONFIG_FILE=config-files/config-operator-3.yaml
  1. Run batcher
make batcher_start_local
  1. Run Telemetry
make telemetry_create_env
make telemetry_run_db
make open_telemetry_start
make telemetry_start 
  1. Run Operator 1
./operator/build/aligned-operator start --config ./config-files/config-operator-1.yaml
  1. Run Operator 2
./operator/build/aligned-operator start --config ./config-files/config-operator-2.yaml
  1. Run Opreator 3
./operator/build/aligned-operator start --config ./config-files/config-operator-3.yaml
  1. Send proofs
make batcher_send_burst_groth16
  1. Go to Jaeger UI and find the new traces

You should see traces like the following one

image
  1. Eject one operator
cast send 0x851356ae760d987E095750cCeb3bC6014560891C --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://localhost:8545/ "ejectOperator(address, bytes)" 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC 0x00

You should see that the traces now includes only the two remaining operators:

image
  1. You can register the operator again by running step 11.

avilagaston9 avatar Oct 06 '24 20:10 avilagaston9