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

ADR-003: Dynamic Capabilities #5828

Merged
merged 30 commits into from
Mar 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
af10e05
Implement in-memory KVStore
alexanderbez Mar 18, 2020
29d68cf
Start keeper and types
alexanderbez Mar 18, 2020
191df59
Add codec
alexanderbez Mar 19, 2020
cb6fc18
Add keys logic
alexanderbez Mar 19, 2020
447221b
Update types
alexanderbez Mar 19, 2020
970e786
Update keeper
alexanderbez Mar 19, 2020
0f950e1
Implement NewCapability
alexanderbez Mar 19, 2020
2a3dde9
Implement InitializeAndSeal
alexanderbez Mar 20, 2020
4d40d4d
Update simapp
alexanderbez Mar 20, 2020
4c3e8ef
Implement GetCapability
alexanderbez Mar 20, 2020
772d0f6
Add logging for new and claimed caps
alexanderbez Mar 20, 2020
d8f0ee2
Call InitializeAndSeal in SimApp
alexanderbez Mar 20, 2020
e989574
Update keeper semantics + unit tests
alexanderbez Mar 20, 2020
e929832
Use big endian
alexanderbez Mar 20, 2020
3a95ff8
More unit tests
alexanderbez Mar 20, 2020
9e46368
Increase keeper test coverage
alexanderbez Mar 20, 2020
abc15d8
Remove TODO
alexanderbez Mar 20, 2020
74d09b9
Add module doc
alexanderbez Mar 20, 2020
083494c
Update doc
alexanderbez Mar 20, 2020
d6b5f5b
Apply suggestions from code review
cwgoes Mar 23, 2020
c5e9c60
Update NewCapability godoc
alexanderbez Mar 23, 2020
0fa3522
Clarify owner
alexanderbez Mar 23, 2020
f3a514a
Add forgery test case to TestAuthenticateCapability
alexanderbez Mar 23, 2020
1db27ad
Format doc
alexanderbez Mar 23, 2020
290344c
Update ADR
alexanderbez Mar 23, 2020
76a5c3e
Explicitly take pointer in FwdCapabilityKey
alexanderbez Mar 23, 2020
82afa7d
Update set to be logn
alexanderbez Mar 23, 2020
84707a8
Merge branch 'ibc-alpha' into bez/adr-003-dynamic-cap
alexanderbez Mar 23, 2020
a8efe0f
Update app module
alexanderbez Mar 23, 2020
9b4f448
Lint
alexanderbez Mar 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update app module
  • Loading branch information
alexanderbez committed Mar 23, 2020
commit a8efe0fd05450ceb452d64ee3bf43c2a12f2d28a
16 changes: 8 additions & 8 deletions x/capability/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ func (AppModuleBasic) RegisterCodec(cdc *codec.Codec) {
}

// DefaultGenesis returns the capability module's default genesis state.
func (AppModuleBasic) DefaultGenesis() json.RawMessage { return []byte("{}") }
func (AppModuleBasic) DefaultGenesis(_ codec.JSONMarshaler) json.RawMessage { return []byte("{}") }

// ValidateGenesis performs genesis state validation for the capability module.
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error { return nil }
func (AppModuleBasic) ValidateGenesis(_ codec.JSONMarshaler, _ json.RawMessage) error { return nil }

// RegisterRESTRoutes registers the capability module's REST service handlers.
func (a AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router) {}
Expand Down Expand Up @@ -94,24 +94,24 @@ func (am AppModule) NewHandler() sdk.Handler { return nil }
func (am AppModule) NewQuerierHandler() sdk.Querier { return nil }

// RegisterInvariants registers the capability module's invariants.
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {}
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// InitGenesis performs the capability module's genesis initialization It returns
// no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, bz json.RawMessage) []abci.ValidatorUpdate {
func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONMarshaler, _ json.RawMessage) []abci.ValidatorUpdate {
return []abci.ValidatorUpdate{}
}

// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes.
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage {
return am.DefaultGenesis()
func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONMarshaler) json.RawMessage {
return am.DefaultGenesis(cdc)
}

// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {}
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}

// EndBlock executes all ABCI EndBlock logic respective to the capability module. It
// returns no validator updates.
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {
return []abci.ValidatorUpdate{}
}