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
  • Loading branch information
tkxkd0159 authored May 7, 2024
1 parent 1cf0852 commit 1c272c9
Show file tree
Hide file tree
Showing 38 changed files with 6,932 additions and 1,878 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features
* (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24
* (x/fswap) [\#1336](https://github.com/Finschia/finschia-sdk/pull/1336) Initialize fswap module
* (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
* (docs) [\#1120](https://github.com/Finschia/finschia-sdk/pull/1120) Update links in x/foundation README.md
Expand Down
9 changes: 5 additions & 4 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,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 1c272c9

Please sign in to comment.