Skip to content
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

Feat/batch #4

Merged
merged 13 commits into from
Jul 31, 2024
Merged

Feat/batch #4

merged 13 commits into from
Jul 31, 2024

Conversation

sh-cha
Copy link
Collaborator

@sh-cha sh-cha commented Jul 29, 2024

No description provided.

@sh-cha sh-cha requested a review from beer-1 July 29, 2024 10:25
@sh-cha sh-cha self-assigned this Jul 29, 2024
@sh-cha sh-cha requested a review from a team as a code owner July 30, 2024 05:13
Copy link
Collaborator

@beer-1 beer-1 left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments

data, err := strconv.ParseInt(string(v), 10, 64)
if err != nil {
// must not happen
panic(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

good to return error, but panic not bad in this case maybe.

}
bs.PopBatchInfo()
}
// TODO: set da and key that match the current batch info
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// TODO: set da and key that match the current batch info
// TODO: receive multiple DAs and use DA which is matched with the current batch info

return nil
}

func (h *Host) updateBatchInfoHandler(args nodetypes.EventHandlerArgs) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems not used yet


OutputSubmitterMnemonic: "",
BridgeExecutorMnemonic: "",
BatchSubmitterMnemonic: "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we need default configs for BatchConfig? and some validation too

@@ -51,6 +53,7 @@ func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logg
db.WithPrefix([]byte(executortypes.ChildNodeName)),
logger.Named(executortypes.ChildNodeName), cdc, txConfig,
),
batch: batch.NewBatchSubmitter(cfg.Version, cfg.DANodeConfig(), cfg.BatchConfig(), db.WithPrefix([]byte(executortypes.BatchNodeName)), logger.Named(executortypes.BatchNodeName), cdc, txConfig, homePath),

Copy link
Collaborator

Choose a reason for hiding this comment

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

seems we are receving da node config separately, but want to use host as our da node?
or should we run separate da node?

@@ -72,8 +75,23 @@ func NewExecutor(cfg *executortypes.Config, db types.DB, sv *server.Server, logg
zap.Duration("submission_interval", bridgeInfo.BridgeConfig.SubmissionInterval),
)

executor.child.Initialize(executor.host, bridgeInfo)
err = executor.host.Initialize(executor.child, int64(bridgeInfo.BridgeId))
da := executor.host
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe future work?

@beer-1 beer-1 merged commit d8df132 into feat/executor Jul 31, 2024
2 of 3 checks passed
@beer-1 beer-1 deleted the feat/batch branch July 31, 2024 03:08
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.

2 participants