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: sp maintenance mode #403

Merged
merged 12 commits into from
Aug 8, 2023

Conversation

alexgao001
Copy link
Collaborator

@alexgao001 alexgao001 commented Aug 3, 2023

Description

Currently When a external SP joins the network, it would need to start serving immediately, all other SPs would consider it is
ready and might choose it as a secondary SP to form GVG. User might also choose it to serve their request. But there is no way to guarantee everything works fine until the SP does a self testing to ensure it is fully prepared. This self testing includes:

  1. Create bucket.
  2. Create object.
  3. Seal object.
  4. Update ObjectInfo
  5. Delete Object
  6. Delete Bucket

After SP has done the test, it should send a tx to chain to activate itself.

If a SP is already in service and it wants to turn into Maintenance mode. It is also supported.

Note: The total maintenance period, frequency of updating status, and each requested maintenance period from SP should be restricted.

Rationale

enhance SP stability

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@alexgao001 alexgao001 added the wip label Aug 3, 2023
deployment/localup/create_sp.json Outdated Show resolved Hide resolved
x/sp/keeper/sp_maintenance.go Outdated Show resolved Hide resolved
x/challenge/abci.go Outdated Show resolved Hide resolved
x/sp/client/cli/flags.go Outdated Show resolved Hide resolved
x/sp/keeper/msg_server.go Outdated Show resolved Hide resolved
x/sp/keeper/msg_server.go Outdated Show resolved Hide resolved
x/sp/keeper/msg_server.go Outdated Show resolved Hide resolved
x/sp/keeper/msg_server.go Outdated Show resolved Hide resolved
x/sp/keeper/sp.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
x/sp/keeper/sp_status.go Outdated Show resolved Hide resolved
@unclezoro unclezoro added r4r and removed wip labels Aug 8, 2023
if len(stats.Records) == 0 {
store.Delete(key)
} else {
store.Set(key, k.cdc.MustMarshal(&stats))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think in most case, there is no need to set here, can we have an indicator to know whether we should set or not.

@unclezoro unclezoro added this pull request to the merge queue Aug 8, 2023
Merged via the queue into bnb-chain:develop with commit 3bec088 Aug 8, 2023
5 checks passed
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.

3 participants