aligned_layer
aligned_layer copied to clipboard
feat(telemetry): check operators status on fetching operators list
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 😎
- Run anvil
make anvil_start_with_block_time
- Run aggregator
make aggregator_start
- Build operator
make build_operator
- Register operator 1
export OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
make operator_full_registration CONFIG_FILE=config-files/config-operator-1.yaml
- Register operator 2
export OPERATOR_ADDRESS=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
make operator_full_registration CONFIG_FILE=config-files/config-operator-2.yaml
- Register operator 3
export OPERATOR_ADDRESS=0x90F79bf6EB2c4f870365E785982E1f101E93b906
make operator_full_registration CONFIG_FILE=config-files/config-operator-3.yaml
- Run batcher
make batcher_start_local
- Run Telemetry
make telemetry_create_env
make telemetry_run_db
make open_telemetry_start
make telemetry_start
- Run Operator 1
./operator/build/aligned-operator start --config ./config-files/config-operator-1.yaml
- Run Operator 2
./operator/build/aligned-operator start --config ./config-files/config-operator-2.yaml
- Run Opreator 3
./operator/build/aligned-operator start --config ./config-files/config-operator-3.yaml
- Send proofs
make batcher_send_burst_groth16
- Go to Jaeger UI and find the new traces
You should see traces like the following one
- 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:
- You can register the operator again by running step 11.