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: add role-based access control for bridge (backport #1358) #1359

Closed
wants to merge 2 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 7, 2024

Description

closes: #XXXX

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

This is an automatic backport of pull request #1358 done by [Mergify](https://mergify.com).

* add submitting role proposal feature

* feat: addVote

* feat: role proposal confirmation logic

* add gRPC for RBAC

* fix checking trustLevel condition

* validate role metadata during initialization

* add invariants for metadata

* delete expired proposal at begin blocker

* add memStore and halting feature

* remove redundant gRPC queries

* fix endblock logic

* add Params test

* add dummy guardian for testing

* remove redundant invariants

* set bridge switch at missing parts

* add gov authority

* add guardian invariant

* add single member query

* return error if the address has no role

* append genesis validation

* add CLI

* return all registered members if there is no query string

* add unit tests for RBAC

* merge `halt` with `resume` as `set-bridge-status`

* Add CHANGELOG

* add ERRORS docs

* apply 0tech review

* enhance bridge switch unit test

* maintain bridge status metadata based on permanent states

* change panic msg for unimplemented features

* check duplicate seq in genesis

* bridge inactive counter must always be initialization

* bridge is always inactive if there is no guardian

* start fbridge module after auth/bank

* remove redundant invariant checking

(cherry picked from commit 1c272c9)

# Conflicts:
#	CHANGELOG.md
#	client/docs/swagger-ui/swagger.yaml
#	x/ERRORS.md
@mergify mergify bot requested a review from tkxkd0159 as a code owner May 7, 2024 12:28
@mergify mergify bot added the conflicts label May 7, 2024
@mergify mergify bot requested review from zemyblue, 0Tech and jaeseung-bae as code owners May 7, 2024 12:28
Copy link
Contributor Author

mergify bot commented May 7, 2024

Cherry-pick of 1c272c9 has failed:

On branch mergify/bp/release/v0.49.x/pr-1358
Your branch is up to date with 'origin/release/v0.49.x'.

You are currently cherry-picking commit 1c272c99f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   client/docs/config.json
	modified:   docs/core/proto-docs.md
	modified:   proto/lbm/fbridge/v1/event.proto
	modified:   proto/lbm/fbridge/v1/fbridge.proto
	modified:   proto/lbm/fbridge/v1/genesis.proto
	modified:   proto/lbm/fbridge/v1/query.proto
	modified:   proto/lbm/fbridge/v1/tx.proto
	modified:   simapp/app.go
	modified:   x/fbridge/client/cli/query.go
	modified:   x/fbridge/client/cli/tx.go
	new file:   x/fbridge/keeper/abci.go
	new file:   x/fbridge/keeper/auth.go
	new file:   x/fbridge/keeper/auth_test.go
	modified:   x/fbridge/keeper/genesis.go
	modified:   x/fbridge/keeper/grpc_query.go
	modified:   x/fbridge/keeper/keeper.go
	modified:   x/fbridge/keeper/msg_server.go
	new file:   x/fbridge/keeper/params.go
	modified:   x/fbridge/keeper/transfer_test.go
	modified:   x/fbridge/module/module.go
	modified:   x/fbridge/testutil/setup.go
	modified:   x/fbridge/types/codec.go
	new file:   x/fbridge/types/errors.go
	modified:   x/fbridge/types/event.pb.go
	new file:   x/fbridge/types/fbridge.go
	modified:   x/fbridge/types/fbridge.pb.go
	modified:   x/fbridge/types/genesis.go
	modified:   x/fbridge/types/genesis.pb.go
	modified:   x/fbridge/types/keys.go
	modified:   x/fbridge/types/msgs.go
	modified:   x/fbridge/types/params.go
	new file:   x/fbridge/types/params_test.go
	modified:   x/fbridge/types/query.pb.go
	modified:   x/fbridge/types/query.pb.gw.go
	modified:   x/fbridge/types/tx.pb.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   client/docs/swagger-ui/swagger.yaml
	deleted by us:   x/ERRORS.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@tkxkd0159 tkxkd0159 closed this May 7, 2024
@mergify mergify bot deleted the mergify/bp/release/v0.49.x/pr-1358 branch May 7, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant