-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix for interval. #1926
Fix for interval. #1926
Changes from 1 commit
f845d77
2accefa
7556b47
b4b145e
f02521f
4326207
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -629,11 +629,12 @@ func (g *Guardian) periodicRollupProduction() { | |
func (g *Guardian) periodicBundleSubmission() { | ||
defer g.logger.Info("Stopping bundle submission") | ||
|
||
// check rollup every l1 block time | ||
interval := g.crossChainInterval | ||
g.logger.Info("Starting cross chain bundle submission", "interval", interval) | ||
|
||
interval := g.rollupInterval | ||
if interval == 0 { | ||
interval = g.blockTime | ||
interval = 20 * time.Second | ||
g.logger.Warn("Cross chain interval not set. Defaulting to 10 seconds") | ||
} | ||
|
||
bundleSubmissionTicker := time.NewTicker(interval) | ||
|
@@ -652,11 +653,6 @@ func (g *Guardian) periodicBundleSubmission() { | |
continue | ||
} | ||
|
||
if len(bundle.CrossChainRootHashes) == 0 { | ||
g.logger.Debug("No cross chain data to submit. Skipping.") | ||
continue | ||
} | ||
|
||
err = g.sl.L1Publisher().PublishCrossChainBundle(bundle) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this mean you're publishing even if there is nothing to publish? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, it's less than ideal |
||
if err != nil { | ||
g.logger.Error("Unable to publish cross chain bundle", log.ErrKey, err) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,10 +286,6 @@ func (p *Publisher) PublishCrossChainBundle(bundle *common.ExtCrossChainBundle) | |
return nil | ||
} | ||
|
||
if len(bundle.CrossChainRootHashes) == 0 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. am I missing something, or will this keep publishing every time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the guardian loop continues before calling this when empty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what line? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
return fmt.Errorf("nothing to publish in cross chain bundle") | ||
} | ||
|
||
managementCtr, err := ManagementContract.NewManagementContract(*p.mgmtContractLib.GetContractAddr(), p.ethClient.EthClient()) | ||
if err != nil { | ||
p.logger.Error("Unable to instantiate management contract client") | ||
|
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.
shouldn't this be a default somewhere?
And the log does not match the value