Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: celestiaorg/celestia-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.34.x-celestia
Choose a base ref
...
head repository: rootulp/celestia-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: rp/run-migrations
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Aug 10, 2024

  1. feat: run migrations

    rootulp committed Aug 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5c7741d View commit details
Showing with 17 additions and 0 deletions.
  1. +4 −0 abci/example/kvstore/persistent_kvstore.go
  2. +13 −0 abci/types/application.go
4 changes: 4 additions & 0 deletions abci/example/kvstore/persistent_kvstore.go
Original file line number Diff line number Diff line change
@@ -183,6 +183,10 @@ func (app *PersistentKVStoreApplication) ProcessProposal(
return types.ResponseProcessProposal{Result: types.ResponseProcessProposal_ACCEPT}
}

func (app *PersistentKVStoreApplication) RunMigrations(req types.RequestRunMigrations) types.ResponseRunMigrations {
return types.ResponseRunMigrations{AppHash: []byte{}}
}

//---------------------------------------------
// update validators

13 changes: 13 additions & 0 deletions abci/types/application.go
Original file line number Diff line number Diff line change
@@ -31,6 +31,14 @@ type Application interface {
OfferSnapshot(RequestOfferSnapshot) ResponseOfferSnapshot // Offer a snapshot to the application
LoadSnapshotChunk(RequestLoadSnapshotChunk) ResponseLoadSnapshotChunk // Load a snapshot chunk
ApplySnapshotChunk(RequestApplySnapshotChunk) ResponseApplySnapshotChunk // Apply a shapshot chunk

RunMigrations(RequestRunMigrations) ResponseRunMigrations
}

type RequestRunMigrations struct{}

type ResponseRunMigrations struct {
AppHash []byte
}

//-------------------------------------------------------
@@ -105,6 +113,11 @@ func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProce
return ResponseProcessProposal{Result: ResponseProcessProposal_ACCEPT}
}

// RunMigrations implements Application.
func (BaseApplication) RunMigrations(RequestRunMigrations) ResponseRunMigrations {
return ResponseRunMigrations{AppHash: []byte{}}
}

//-------------------------------------------------------

// GRPCApplication is a GRPC wrapper for Application