-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/l1bridge2infoindexsync #31
Conversation
Feature/rollup exit tree
@@ -53,6 +59,16 @@ func start(cliCtx *cli.Context) error { | |||
} | |||
|
|||
components := cliCtx.StringSlice(config.FlagComponents) | |||
l1Client := runL1ClientIfNeeded(components, c.Etherman.URL) |
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.
maybe make more sense to do singleton lazy initialization? then you avoid double knownledge, if you have an error on list of components that require a object could be difficult to find it... it's more simple to create objects when are required:
aggOracle := createAggoracle(*c, l1Client(), l2Client(), l1InfoTreeSync() )
To create the constructor function can use sync.OnceValue
. Example:
l1Client:= sync.OnceValue[*ethclient.Client]( func() *ethclient.Client]{
l1CLient, err := ethclient.Dial(urlRPCL1)
if err != nil {
log.Fatal(err)
}
return l1CLient
})
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 sounds like a great idea. Would u mind moving this into another PR tho? This PR is already gigantic, and there is a lot of work to do in terms of config + cmd, I think that your suggestion would be great on that scope?
(if you agree I'd make sure that we have the right ticket for it, and link ur suggestion in there)
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
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.
The PR does'nt pass the checks
Quality Gate failedFailed conditions |
Review guide
aggoracle
Reviewers: @rachit77
Notes:
test/helpers
, actual code is unchangedbridgesync
Reviewers: @goran-ethernal @Stefan-Ethernal
Notes:
cmd
bridge
event (claim event still missing)claimsponsor
Reviewers: @begmaroman @ToniRamirezM
Notes:
cmd & config
Reviewers: @vcastellm @rachit77
Notes:
RPC
isNeeded?
: have all the sub-components declared before the component switch / case so they can be re-usedl1bridge2infoindexsync
Reviewers: @goran-ethernal @Stefan-Ethernal
Notes:
l1infotreesync
Reviewers: @goran-ethernal @Stefan-Ethernal
Notes:
[]common.Hash
->[32]common.Hash
(this is gonna be a recurring topic, just mentioning here)lastgersync
Reviewers: @ToniRamirezM @begmaroman
Notes:
eth_calls
reorgdetector
@begmaroman @goran-ethernal FYI I've comented a bunch of code as it was giving problems, and this is being re-worked on another branch
rpc
Reviewers: @vcastellm @rachit77
Notes:
bridge_
namespacesync
Reviewers: @goran-ethernal @Stefan-Ethernal
Notes:
test/helpers
reviewers: @rachit77
notes: linked to the aggoracle
tree
Reviewers: @goran-ethernal @Stefan-Ethernal
Notes:
[]common.Hash
->[32]common.Hash