-
Notifications
You must be signed in to change notification settings - Fork 2
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
Incorporate Uri's feedback #6
Conversation
avssync.go
Outdated
@@ -20,7 +20,7 @@ type AvsSync struct { | |||
syncInterval time.Duration | |||
operators []common.Address // empty means we update all operators | |||
quorums []byte | |||
fetchQuorumsDynamically bool | |||
noFetchQuorumsDynamically bool |
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.
why negate this one?
For binaries that are already running with this flag set to some value, it will have the opposite effect even if the configs are kept the same
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.
ehh good catch! I meant to also update the flag and env name of course!
I realized that binary flags' default is false and can't be set to true (other than dynamically in code, which I find ugly and bug prone), so I opted to do it this way because my assumption is that most everyone would want to update all of their quorums automatically without needing to restart avs-sync after adding a new quorum. So 2 questions for you:
- is that a valid assumption?
- if so, are you fine with this change? or do you have another suggestion for how to do this?
If you're fine with this, I will go ahead and fix the typo by making the flag --no-fetch-quorums-dynamically
, as well as the env var name.
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.
my assumption is that most everyone would want to update all of their quorums automatically
I think this assumption is fair. Would it be easier to keep the name the same but change the default to true by making it a cli.BoolTFlag
?
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.
complete brains, I didn't even know BoolTFlag
was an option! Reverted to this, thanks :) b5f5b41
32798a1
to
b35c30d
Compare
removed all new lines from log lines
0ce1431
to
51a066d
Compare
…mically (using boolTFlag)
Uri messaged me with this msg:
I read the code of the AVSSync and have minor comments from running the service pov:
The code in tryNTimesUpdateStakesOfEntireOperatorSetForQuorum can be optimized, not to get the GetOperatorAddrsInQuorumsAtCurrentBlock if the update failsInstead of specifying the sleepBeforeFirstSyncDuration , I can specify the time (HH:MI:SS) which I want to run the sync. You can calculate the sleepBeforeFirstSyncDuration usign the interval and the time in day
Also simplified the run.sh script to use the env vars instead of passing flags explicitly.