Skip to content

Conversation

@nhtyy
Copy link
Contributor

@nhtyy nhtyy commented Feb 12, 2025

This PR introduces changes to the binary to support multiple instances of Operator, as well as logically separates utils from "low level" tendermint rpc calls.

@nhtyy nhtyy force-pushed the n/consolidate branch 2 times, most recently from 7b953fd to 04a611e Compare February 12, 2025 23:24
@nhtyy nhtyy marked this pull request as ready for review February 12, 2025 23:38

Choose a reason for hiding this comment

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

This PR so far consolidates all of the operators into a single one, which is good for reducing infra cost.

To reduce proving cost, we should also share proofs when we can (which is the happy path, as all the deployments for the same chain should be synced).

We should:

  1. Check the latest blocks across all deployments.
  2. Spawn thread for each proof for each latest contract block. The endBlock should be the same across all of them.
  3. Relay in separate threads.

Choose a reason for hiding this comment

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

MultichainOperator takes in a HashMap of chain id -> provider.

Copy link

Choose a reason for hiding this comment

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

@ratankaliani regarding this comment--what happens when the chains are not synced? We cannot rely on solely the happy path.

Choose a reason for hiding this comment

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

Threads are spawned for each unique proof that needs to be generated.

Copy link

@ratankaliani ratankaliani left a comment

Choose a reason for hiding this comment

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

LGTM!

@nhtyy nhtyy merged commit e43816e into n/chunk-header-requests Feb 18, 2025
2 checks passed
nhtyy added a commit that referenced this pull request Feb 18, 2025
* chore: cleanup api / util seperation

* chore: add retries to some tendermint routes

* fix: dont need option on sleep duration

* feat: multi-chain operator

* log -> tracing

* fix: cleanup

* separate logs

* feat: batch proofs

* fix: log chain id on fail

* temp: prints

* cleanup

* comments, default env filter

* fix: use old env setup for one chain

* update example env

* Update script/src/util/retry.rs

Co-authored-by: Ratan Kaliani <[email protected]>

* fix: move consensus checks of target block to `run_inner`

* Update script/bin/operator.rs

Co-authored-by: Ratan Kaliani <[email protected]>

* fix: remove `we` from comments

* fix: new fn for vkey/data commit max checks

* add section headings in operator, use_kms -> signer mode

* missed `we`

* fix: use_kms_relayer -> signer_mode

* run -> loop

Co-authored-by: Ratan Kaliani <[email protected]>

* Revert "run -> loop"

This reverts commit c4eacbf.

* chore: simplify operator loop, renaming, better comments (#50)

* chore: help refactor

* add

* add

* chore: arc networkprover

* chore: docs

* docs

* chore: fmt

* rm unused clones & arc

---------

Co-authored-by: Ratan Kaliani <[email protected]>
nhtyy added a commit that referenced this pull request Feb 19, 2025
* fix: chunk header requests

* fix: exponential backoff on failed requests

* fix: comment

* fix: add log for failures

* chore: add catch unwind on Operator::run

* add errs to tendermint utils

* fix: better worst case handling

* fix: dont max out rate limit in loop

* fix: retry faster on errors

* fix: cleanup more unwraps, debug print err

* feat: multi-chain operators (#49)

* chore: cleanup api / util seperation

* chore: add retries to some tendermint routes

* fix: dont need option on sleep duration

* feat: multi-chain operator

* log -> tracing

* fix: cleanup

* separate logs

* feat: batch proofs

* fix: log chain id on fail

* temp: prints

* cleanup

* comments, default env filter

* fix: use old env setup for one chain

* update example env

* Update script/src/util/retry.rs

Co-authored-by: Ratan Kaliani <[email protected]>

* fix: move consensus checks of target block to `run_inner`

* Update script/bin/operator.rs

Co-authored-by: Ratan Kaliani <[email protected]>

* fix: remove `we` from comments

* fix: new fn for vkey/data commit max checks

* add section headings in operator, use_kms -> signer mode

* missed `we`

* fix: use_kms_relayer -> signer_mode

* run -> loop

Co-authored-by: Ratan Kaliani <[email protected]>

* Revert "run -> loop"

This reverts commit c4eacbf.

* chore: simplify operator loop, renaming, better comments (#50)

* chore: help refactor

* add

* add

* chore: arc networkprover

* chore: docs

* docs

* chore: fmt

* rm unused clones & arc

---------

Co-authored-by: Ratan Kaliani <[email protected]>

* fix: network prover run -> run_async

* fix: clippy

---------

Co-authored-by: Ratan Kaliani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants