-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix obj-caps facility #2018
Closed
Closed
Fix obj-caps facility #2018
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
d7e4ff3
Add ChannelCapabilityPath to ICS24
hu55a1n1 abd9ae7
Simplify channel handler
hu55a1n1 5576ca6
Fix tests
hu55a1n1 8865166
Provide handlers with assoc chan/port capabilities
hu55a1n1 bb06bd2
Remove packet_validate and pass caps to packet handlers
hu55a1n1 263d09f
Improve PortReader and ChannelReader's capabilities API
hu55a1n1 973873e
Update packet handler API to use new API
hu55a1n1 ea35d86
Fix mock caps and tests
hu55a1n1 7fe7da1
Major refactoring
hu55a1n1 8ad0e3f
Merge remote-tracking branch 'origin/master' into hu55a1n1/2013-impro…
hu55a1n1 7096036
Extract Port/Channel CapabilityReader/Keeper into separate traits
hu55a1n1 a93f689
Store channel capability after handler dispatch
hu55a1n1 a7b3b48
Adjust handlers to add {Channel,Port}Capability bound to context
hu55a1n1 ec20b5a
Introduce ScopedCapability{Keeper,Reader}
hu55a1n1 0f44595
Constrain Capability{Keeper,Reader} scope to core module for Ics26Con…
hu55a1n1 17f4436
WIP: Update Mock impl to use scoped capability readers/keepers
hu55a1n1 6d2cf00
Capability Readers/Keepers are now scoped by definition
hu55a1n1 1d0135c
Impl Default and Into<ModuleId> for CoreModuleId
hu55a1n1 c92fa84
Simplify Ics26Context bounds based on new design
hu55a1n1 77ad8da
Update all channel handlers to use CapabilityReaders/Keepers scoped t…
hu55a1n1 4708f05
CoreModuleId ToString now returns 'ibc'
hu55a1n1 779a5b9
Update tests to use new API
hu55a1n1 4c9e28e
Implement dummy MockOCap
hu55a1n1 8cdb2f8
Update Mock tests
hu55a1n1 0659fbb
Improve Capability ctor to accept index as input
hu55a1n1 fb8e80d
Make claim_capability() and release_capability() are fallible
hu55a1n1 19e92e3
Don't recreate capability in store_channel_capability()
hu55a1n1 aa6da61
Polish MockCap impl and remove legacy ocap facility
hu55a1n1 81e1e17
Add capability related errors
hu55a1n1 d993a3b
Impl on_chan_open_init for DummyModule
hu55a1n1 bfe717d
Manually implement Clone for MockContext
hu55a1n1 fea6038
MockContext now initializes a router and ocaps by default
hu55a1n1 2f55b74
Fix missing cap auth in write ack handler
hu55a1n1 a8b96d4
Fix all handler tests
hu55a1n1 2d4a0c2
Make write ack handler public
hu55a1n1 74131a0
Fix tests
hu55a1n1 287f7df
Fix clippy errors
hu55a1n1 c21ce3e
Remove TypedCapabilites
hu55a1n1 1a71f48
Capability as trait
hu55a1n1 32d8733
Add .changelog entry
hu55a1n1 d27b5bb
Fix clippy warnings
hu55a1n1 8d49315
Resurrect channel/packet_validate()
hu55a1n1 a931d4a
Update tests for API changes
hu55a1n1 ac365f8
Minor refactoring
hu55a1n1 9374f2c
Use is_none() instead of matches!(_, None)
hu55a1n1 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
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/improvements/ibc/2013-improve-obj-caps.md
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,2 @@ | ||
- Improve the object capability system. | ||
([#2013](https://github.com/informalsystems/ibc-rs/issues/2013)) |
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
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.
This is an important deviation from the SDK's capability design. We require implementations to be able to create capabilities without mutating the state. The capability returned from this call is later stored to the state by calling
ChannelCapabilityKeeper::store_channel_capability()
. This is required because our handlers do not mutate state, but still need to be able to create capabilities.