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

[op-batcher] Change data availabilty kind at runtime with rpc #10837

Closed
wants to merge 1 commit into from

Conversation

fxfactorial
Copy link

Closing the channel manager can result in extra batches dropped by op-node with an old timestamp but that is ignorable

@fxfactorial fxfactorial requested a review from a team as a code owner June 14, 2024 19:41
@fxfactorial fxfactorial requested a review from Inphi June 14, 2024 19:41
@@ -81,6 +82,63 @@ func NewBatchSubmitter(setup DriverSetup) *BatchSubmitter {
}
}

func (l *BatchSubmitter) SanityCheckConfigUpdate(daType flags.DataAvailabilityType, frameCount *uint) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: og prefix on variable names not consistent with the codebase

return err
}
// cant fail, we already sanity checked it
a.b.ChangeDataAvailability(kind, frameCount)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since SanityCheckConfigUpdate and ChangeDataAvailability are not coupled, it results in a future dev being able to call ChangeDataAvailability without calling sanity check. I think they should be coupled more tightly, ie sanity check is internal or the impl is directly inside change and change returns an error

Copy link
Author

Choose a reason for hiding this comment

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

agree & initially I had ChangeDataAvailability return error if bad config but it would mean a potentially needless stopping of batch submitting.

@@ -34,6 +38,36 @@ func GetAdminAPI(api *adminAPI) gethrpc.API {
}
}

func (a *adminAPI) UseDAType(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be better if there was a getter + setter where the getter returns the whole config and the setter lets you set the whole config. This is to prevent the need to add more RPC endpoints for particular things. The tradeoff here is around a lot of the config being standard and there isn't a huge need to change it

Copy link
Author

Choose a reason for hiding this comment

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

Ack - returning whole config in caused an import cycle

@fxfactorial
Copy link
Author

@sebastianst @axelKingsley wondering if I can get your input, anything explicitly wrong in logic?

Copy link
Contributor

github-actions bot commented Jul 2, 2024

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 2, 2024
@tynes tynes removed the Stale label Jul 4, 2024
Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 18, 2024
@github-actions github-actions bot closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants