-
Notifications
You must be signed in to change notification settings - Fork 12
feat: multi-chain operators #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7b953fd to
04a611e
Compare
There was a problem hiding this comment.
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:
- Check the latest blocks across all deployments.
- Spawn thread for each proof for each latest contract block. The endBlock should be the same across all of them.
- Relay in separate threads.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: Ratan Kaliani <[email protected]>
Co-authored-by: Ratan Kaliani <[email protected]>
Co-authored-by: Ratan Kaliani <[email protected]>
This reverts commit c4eacbf.
* chore: help refactor * add * add
ratankaliani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* 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: 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]>
This PR introduces changes to the binary to support multiple instances of
Operator, as well as logically separatesutilsfrom "low level" tendermint rpc calls.