Skip to content

Commit

Permalink
feat: add role-based access control for bridge (#1358)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tkxkd0159 authored and mergify[bot] committed May 7, 2024
1 parent 98da17d commit da40933
Show file tree
Hide file tree
Showing 38 changed files with 7,418 additions and 1,819 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased](https://github.com/Finschia/finschia-sdk/compare/v0.48.1...HEAD)

### Features
<<<<<<< HEAD
=======
* (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24
>>>>>>> 1c272c99f (feat: add role-based access control for bridge (#1358))
* (x/fswap) [\#1336](https://github.com/Finschia/finschia-sdk/pull/1336) Initialize fswap module
* (x/fswap) [\#1339](https://github.com/Finschia/finschia-sdk/pull/1339) Implement fswap module's genesis
* (x/fbridge) [\#1340](https://github.com/Finschia/finschia-sdk/pull/1340) Initialize fbridge module
* (x/fbridge) [\#1347](https://github.com/Finschia/finschia-sdk/pull/1347) Implement bridge transfer feature (sending side)
* (x/fbridge) [\#1351](https://github.com/Finschia/finschia-sdk/pull/1351) Map a sequence to block number for every bridge request (sending side)
* (x/fswap) [\#1345](https://github.com/Finschia/finschia-sdk/pull/1345) Implement fswap's basic functionality(MsgSwap, MsgSwapAll, Query, Proposal)
* (x/fbridge) [\#1350](https://github.com/Finschia/finschia-sdk/pull/1350) Add Role-based Access Control

### Improvements
* (types) [\#1314](https://github.com/Finschia/finschia-sdk/pull/1314) replace IsEqual with Equal
Expand Down
9 changes: 5 additions & 4 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@
"rename": {
"Params": "FBridgeParams",
"Commitments": "FBridgeCommitments",
"Guardians": "FBridgeGuardians",
"Operators": "FBridgeOperators",
"Judges": "FBridgeJudges",
"Members": "FBridgeMembers",
"Member": "FBridgeMember",
"Proposals": "FBridgeProposals",
"Proposal": "FBridgeProposal"
"Proposal": "FBridgeProposal",
"Votes": "FBridgeVotes",
"Vote": "FBridgeVote"
}
}
}
Expand Down
Loading

0 comments on commit da40933

Please sign in to comment.