Skip to content

feat(telemetry): check operators status on fetching operators list - #1186

Merged
uri-99 merged 63 commits into
stagingfrom
1169-feattelemetry-check-operators-status-on-fetching-operators-list
Oct 15, 2024
Merged

feat(telemetry): check operators status on fetching operators list#1186
uri-99 merged 63 commits into
stagingfrom
1169-feattelemetry-check-operators-status-on-fetching-operators-list

Conversation

@avilagaston9

@avilagaston9avilagaston9 commented Oct 6, 2024

Copy link
Copy Markdown
Contributor

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.

JuArceand others added 30 commits September 18, 2024 14:11
feat: CRUD for operators version
docs: update README
… creation (#1080)
Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
# Conflicts:
#	telemetry_api/config/dev.exs
#	telemetry_api/mix.exs
#	telemetry_api/mix.lock
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
fix: store address and operator_id in lowercase
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
@avilagaston9avilagaston9 self-assigned this Oct 6, 2024
@avilagaston9
avilagaston9 marked this pull request as ready for review October 7, 2024 16:01
Base automatically changed from 1075-feattelemetry-implement-telemetry-for-aggregator to stagingOctober 10, 2024 16:12

@PatStilesPatStiles left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked locally. Conflicts need to be resolved.

@MarcosNicolauMarcosNicolau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my machine, and everything worked as expected.

Comment threadtelemetry_api/lib/telemetry_api/traces.ex Outdated
…-check-operators-status-on-fetching-operators-list
@entropidelic

Copy link
Copy Markdown
Contributor

aside from small nits, the code looks good and worked as expected

@uri-99
uri-99 merged commit a0e9956 into stagingOct 15, 2024
@uri-99
uri-99 deleted the 1169-feattelemetry-check-operators-status-on-fetching-operators-list branch October 15, 2024 19:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants

@avilagaston9@entropidelic@PatStiles@uri-99@MarcosNicolau@JuArce@JulianVentura@Oppen