-
Notifications
You must be signed in to change notification settings - Fork 29
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: Add CreateValidator access control feature #406
Merged
Merged
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
35de35e
feat: add consortium proto
0Tech 51b808e
feat: add consortium module
0Tech 3cebc2c
feat: add consortium to simapp
0Tech b96d363
refactor: new protos
0Tech 8ca7327
refactor: consortium module
0Tech a4633ee
refactor: simapp
0Tech 084f1d3
test: add unit-tests for consortium
0Tech bb8eecb
feat: do not use hooks and endblocker of consortium
0Tech 445a304
feat: introduce stakingplus and replace staking with it
0Tech ba32de7
chore: lint
0Tech db7cd27
chore: cleanup unused codes and add additional infos to errors
0Tech 6f0ce0d
chore: lint
0Tech 2a1c36b
chore: revert hooks and blocker formats
0Tech 4009b59
docs: update CHANGELOG
0Tech d58123e
chore: fix var names and comments
0Tech 1245d2f
chore: lint
0Tech a0ea004
refactor: apply feedbacks
0Tech bad8e0a
feat: add event proto for consortium
0Tech 1c49042
feat: emit events in consortium proposals
0Tech 6d621e7
docs: add consortium apis to config
0Tech 3136b1f
refactor: remove deprecated REST handlers
0Tech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
syntax = "proto3"; | ||
package lbm.consortium.v1; | ||
|
||
option go_package = "github.com/line/lbm-sdk/x/consortium/types"; | ||
option (gogoproto.equal_all) = true; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
// Params defines the parameters for the consortium module. | ||
message Params { | ||
bool enabled = 1 [(gogoproto.moretags) = "yaml:\"enabled\""]; | ||
} | ||
|
||
// ValidatorAuth defines authorization info of a validator. | ||
message ValidatorAuth { | ||
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; | ||
bool creation_allowed = 2 [(gogoproto.moretags) = "yaml:\"creation_allowed\""]; | ||
} | ||
|
||
// UpdateConsortiumParamsProposal details a proposal to update params of cosortium module. | ||
message UpdateConsortiumParamsProposal { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_getters) = false; | ||
option (gogoproto.goproto_stringer) = false; | ||
|
||
string title = 1; | ||
string description = 2; | ||
Params params = 3; | ||
} | ||
|
||
// UpdateValidatorAuthsProposal details a proposal to update validator auths on consortium. | ||
message UpdateValidatorAuthsProposal { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_getters) = false; | ||
option (gogoproto.goproto_stringer) = false; | ||
|
||
string title = 1; | ||
string description = 2; | ||
repeated ValidatorAuth auths = 3 [(gogoproto.moretags) = "yaml:\"auths\""]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
package lbm.consortium.v1; | ||
|
||
option go_package = "github.com/line/lbm-sdk/x/consortium/types"; | ||
|
||
// EventUpdateValidatorAuth is emitted after updating validator auth info. | ||
message EventUpdateValidatorAuth { | ||
string operator_address = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
package lbm.consortium.v1; | ||
|
||
option go_package = "github.com/line/lbm-sdk/x/consortium/types"; | ||
option (gogoproto.equal_all) = true; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "lbm/consortium/v1/consortium.proto"; | ||
|
||
// GenesisState defines the consortium module's genesis state. | ||
message GenesisState { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// params defines the module parameters at genesis. | ||
Params params = 1 [(gogoproto.moretags) = "yaml:\"params\""]; | ||
|
||
// allowed_validators defines the allowed validator addresses at genesis. | ||
// provided empty, the module gathers information from staking module. | ||
repeated ValidatorAuth validator_auths = 2 [(gogoproto.moretags) = "yaml:\"validator_auths\""]; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will simplify the structure if the requirement of the consortium chain is fixed and no further details are added.