-
Notifications
You must be signed in to change notification settings - Fork 641
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(callbacks): adr8 implementation #3939
Merged
Merged
Changes from 1 commit
Commits
Show all changes
365 commits
Select commit
Hold shift + click to select a range
59d7aac
imp(callbacks.test): added 'TestUnmarshalPacketData'
srdtrk 8e2474c
docs(callbacks): simapp comment for callback stacks updated
srdtrk d94fd69
imp(callbacks.test): added 'TestOnChanCloseInit'
srdtrk 1dffefc
fix(simapp): passed feeKeeper as channel keeper to callbacks middleware
srdtrk bc2f7be
imp(callbacks.test): added 'TestSendPacket'
srdtrk b1a9ca0
imp(callbacks.test): added TestWriteAcknowledgement
srdtrk 4523c48
imp(callbacks.test): added 'TestOnChanCloseConfirm'
srdtrk fcad9a6
imp(callbacks.test): added 'TestOnAcknowledgementPacketError'
srdtrk fd57484
imp(callbacks.test): added 'TestOnTimeoutPacketError'
srdtrk 049df73
imp(callbacks.test): added export_test.go
srdtrk 8f2e40e
imp(callbacks.test): added 'TestProcessCallbackDataGetterError'
srdtrk 7ed98a9
merge: branch 'main' into serdar/adr8-middleware
srdtrk 5f34afb
imp(callbacks.test): added events tests
srdtrk 2a07dc2
merge: branch 'main' into serdar/adr8-middleware
srdtrk ddbfd78
imp(callbacks): using PacketDataUnmarshaler to unmarshal instead of t…
srdtrk a63277a
imp(callbacks): updated the api of getCallbackData functions
srdtrk aaf99be
imp(callbacks): added TestGetSourceCallbackDataTransfer and TestGetDe…
srdtrk bb7ee1d
imp(callbacks.test): added export_test for type tests
srdtrk b9c35b9
imp(callbacks.test): added 'TestGetCallbackDataErrors'
srdtrk 8f19753
imp(fee_test): added 'TestUnmarshalPacketDataError'
srdtrk 70b7a5c
style(adr8): renamed the contract api functions
srdtrk 26d707c
feat(callbacks.test): added incentivized transfer tests
srdtrk decbae9
imp(callbacks_test): added timeout test case to fee test
srdtrk d6b8787
style(ica.adr8): updated godocs
srdtrk 835feb0
style(ica.adr8): updated godocs
srdtrk 9090524
feat(adr8): replaced PacketDataUnmarshaller with PacketInfoProvider
srdtrk 58b27ab
imp(callbacks): added sender and receiver addresses to ContractKeeper…
srdtrk b55be0d
docs(ica): godocs updated
srdtrk b8c60f7
style(adr8): renamed PacketDataUnmarshaler to PacketInfoProvider
srdtrk ca20778
style(callbacks): renamed channel to ics4Wrapper
srdtrk 08308b6
docs(callbacks): updated godocs
srdtrk e244013
imp(adr8_test): tested new GetPacketSender and GetPacketReceiver inte…
srdtrk 5bf8c99
merge: branch 'main' into serdar/adr8-middleware
srdtrk 8c9d49e
feat(adr8): added IBCSendPacketCallback to ContractKeeper
srdtrk c7e55b3
imp(testing/mock): added callback counter helpers
srdtrk 4a90b24
imp(ica, transfer): added WithICS4Wrapper api function
srdtrk 2e1bcf2
feat(callbacks_test): SendPacket tests are now passing
srdtrk 5a1782c
merge: branch 'main' into serdar/adr8-middleware
srdtrk c42d7e1
imp(fee_test): added more tests to TestPacketInfoProviderInterfaceError
srdtrk 7d7b0d8
style(callbacks): renamed PacketUnmarshalerIBCModule to PacketInfoPro…
srdtrk f0a3829
feat(callbacks): added maxGas param to middleware
srdtrk bf60673
fix(callbacks): fixed SendPacket
srdtrk dd3dac6
feat(callbacks): implemented WriteAcknowledgement callbacks
srdtrk 95e210f
style(mock): updated the name of callback counter
srdtrk 2c53939
fix(callbacks): fixed using channelID instead of portID
srdtrk 43c74da
feat(callbacks): all acknowledgements implemented
srdtrk 594aa55
merge: branch 'main' into serdar/adr8-middleware
srdtrk 6362719
style(ica.adr8): used more consistent formating in ica and transfer
srdtrk 55ad7a9
docs(ica, transfer): updated 'WithICS4Wrapper's godocs
srdtrk 31417f1
imp(callbacks_test): improved WriteAcknowledgement tests
srdtrk 1509448
tests(mock, callbacks): moved mock PacketUnmarshaller logic to mock m…
srdtrk ec51b71
tests(callbacks): added mock async ack test
srdtrk 8f95493
ci: CODEOWNERS updated to include callbacks
srdtrk 46b59b8
merge: branch 'main' into serdar/adr8-middleware
srdtrk c4267eb
docs(callbacks_test): updated godocs
srdtrk 0f3c66a
imp(callbacks): only handling oog panic in recovery now
srdtrk 86942b6
style(callbacks): fix variable name
srdtrk 7d46a3f
imp(mock): mock panic is now a real oog panic
srdtrk 1c3dd89
tests(adr8): added state reversal test
srdtrk 8b9e373
style(callbacks): renamed hasEnoughGas to remainingGasIsAtGasLimit
srdtrk db10c16
tests(adr8): moved panic and error treshold to 400k and 500k gas resp…
srdtrk 68dee6b
fix(callbacks): fixed panic handling
srdtrk 4c30873
imp(callbacks_test): added a low relayer gas test
srdtrk 7f11ee8
fix(transfer_test.adr8): fixed a typo in a test case
srdtrk 38184e6
docs(callbacks): improved godocs
srdtrk 69fcf65
imp(callbacks): added CommitGasLimit to CallbackData for events
srdtrk c1307ec
imp(callbacks): AttributeKeyCallbackCommitGasLimit added to events
srdtrk c2f168b
fix(callbacks): fixed major gas panic issue
srdtrk 71b1e3e
imp(callbacks_test): improved the oog panic test
srdtrk 8f6f576
style(callbacks): used '.GetData()' instead of '.Data'
srdtrk d0aa099
docs(adr8): updated some godocs
srdtrk 33f2ed0
style(ica/host_test): fixed test case memo styling
srdtrk 8f310a5
merge: branch 'main' into serdar/adr8-middleware
srdtrk 5e86213
style(ica/controller): docs and style fixes
srdtrk 0f65c26
imp(ica/host): adr8 removed from icahost
srdtrk e96b5f3
docs(adr8): updated godocs for withics4wrapper
srdtrk 04dda1e
docs(adr8): updated godocs for gasLimit specs
srdtrk 34ce83d
style(adr8_test): fixed test case naming
srdtrk 35dc6b2
docs(adr8): updated godocs for some interface functions
srdtrk 89f1bf2
style(fee.adr8): renamed unmarshaler to provider in some cases
srdtrk 38368e8
imp(adr8_test): improved mock unmarshaler
srdtrk b8562a0
docs(transfer.adr8): updated godocs
srdtrk 9e1834a
docs(adr8): updated godocs
srdtrk ffc51a3
docs(adr8): updated godocs
srdtrk 1633631
docs(callbacks): updated godocs
srdtrk bcabe69
style(callbacks): moved SendPacket func to top
srdtrk 46b7642
docs(callbacks): updated godocs
srdtrk 3c046db
imp(callbacks): logging to debug instead of info
srdtrk a2bf305
style(callbacks): renamed remainingGasIsAtGasLimit -> commitTxIfOutOfGas
srdtrk 7009e86
docs(callbacks): updated godocs
srdtrk 9fbf5dc
docs(callbacks): updated event docs
srdtrk ad56b17
fix(callbacks): added CallbackTypeSendPacket to events
srdtrk c7ee59a
imp(callbacks): events emit port and channel id based on src vs dest
srdtrk 7eeabfd
docs(callbacks): updated godocs
srdtrk bf73815
imp(callbacks): changed some event to a log
srdtrk aa70889
imp(callbacks): improved log
srdtrk e1e2b7f
docs(callbacks): updated godocs
srdtrk 9504df6
imp(callbacks): unsuccessful ack now bypasses callback in 'OnRecvPacket'
srdtrk 063c682
imp(callbacks_test): added mock logger
srdtrk c55051c
imp(mock): created mock logger
srdtrk 005ab70
style: ran 'golangci-lint run --fix'
srdtrk 7d582c5
style(callbacks): made code more concise
srdtrk 8a5e94b
style(callbacks): renamed PacketInfoProviderIBCModule to CallbacksCom…
srdtrk 6249fb1
style(callbacks): improved they style of getCallbackData and negated …
srdtrk ee8f647
style(callbacks): used constants for 'success' and 'failure' attributes
srdtrk dcc6109
docs(adr8): updated godocs
srdtrk 23c977c
style(ica/controller): added more explicit prefix check
srdtrk 814aa6d
merge: branch 'main' into serdar/adr8-middleware
srdtrk 98ef145
imp(adr8): moved 'GetPacketSender' and 'GetPacketReceiver' to 'Callba…
srdtrk 7e55af8
style(adr8): renamed PacketInfoProvider to PacketDataUnmarshaler
srdtrk f6edd8f
imp(callbacks_test): switched hostStack for controllerStack
srdtrk 45914c0
imp(callbacks_test): added missing test case
srdtrk b7209fb
imp(callbacks): callbacks can now reject SendPacket
srdtrk 7d7f4b3
imp(callbacks_test): added TestSendPacketReject
srdtrk 0cf5b18
style(callbacks_test): using TestCoin instead
srdtrk db0c3d8
imp(callbacks_test): added TestWriteAcknowledgementOogError and TestO…
srdtrk d8f8c95
imp(callbacks_test): added TestOnAcknowledgementPacketOogError
srdtrk 7f0d73c
merge: branch 'main' into serdar/adr8-middleware
srdtrk 13e4e2a
merge: branch 'main' into serdar/adr8-middleware
srdtrk 117728b
imp(adr8): removed packetReceiver concept
srdtrk 75b65e6
imp(adr8): removed srcChannelID from GetPacketSender interface
srdtrk 18b1997
imp(callbacks): oogError is now simply oogPanic
srdtrk 7dcf002
merge: branch 'main' into serdar/adr8-middleware
srdtrk 604d92e
imp(callbacks): added more mw initialization notnil checks
srdtrk 1d6bf31
docs(callbacks): updated godocs
srdtrk 70567b3
feat(adr8): moved adr8 logic to callbacks middleware
srdtrk d36d115
style(callbacks): replaced AuthAddr -> SenderAddr
srdtrk ca991cd
imp(callbacks_test): increased codecov
srdtrk fb8625d
docs(adr8): improved some godocs around AdditionalPacketDataProvider …
srdtrk df722d8
revert(docs): reverted changes to adr8 specs, this needs a seperate PR
srdtrk f8b105a
imp(callbacks_test): improved tests slightly
srdtrk cf3d6e2
docs(callbacks): improved godocs for keys.go
srdtrk 3af92d4
docs(mock.adr8): updated godocs for mock logger
srdtrk a31a348
merge: branch 'main' into serdar/adr8-middleware
srdtrk 9d74ab9
imp(adr8): changed GetAdditionalData function signature
srdtrk 58a6227
imp(callbacks): split AdditionalPacketDataProvider into two interfaces
srdtrk caf51e9
merge: branch 'main' into serdar/adr8-middleware
srdtrk 85eb9fa
merge: branch 'main' into serdar/adr8-middleware
srdtrk 609df9e
style(mock): used interface impl convention
srdtrk f60594f
tests: removed ErrorMock
srdtrk 86449c6
style(callbacks_test): improved test style
srdtrk 44649b1
style(callbacks_test): improved test name
srdtrk 3db7f89
style(core, apps): renamed PacketSenderRetriever to PacketData
srdtrk 996ad31
merge: branch 'main' into serdar/adr8-middleware
srdtrk 3fa67ec
style(adr8): conforming to revive linter
srdtrk e0a1593
fix(transfer_test, ica/controller_test): fixed failing tests
srdtrk b8afa0b
style: conforming to revive linter
srdtrk 6c9233c
merge: branch 'main' into serdar/adr8-middleware
srdtrk 10e4990
nit(ica): removed uneeded diffs
srdtrk bbb4994
merge: branch 'main' into serdar/adr8-middleware
srdtrk 5e46fa4
style(callbacks): some style updates
srdtrk 72c2041
docs(callbacks): updated godocs
srdtrk 5972db1
imp(callbacks): added 'WithICS4Wrapper'
srdtrk 565f9da
style(callbacks): rename GasLimit -> ExecutionGasLimit
srdtrk 9e22b74
imp(callbacks): allowRetry was removed
srdtrk 78ec500
style(callbacks): moved callbackAddr code block above gas logic
srdtrk 0e354f2
style(callbacks): renamed ContractAddr,SenderAddr ->
srdtrk 997c086
style(callbacks): updated godocs and var names for keys and errors
srdtrk 50898c5
docs(callbacks): updated godocs for contract keeper
srdtrk aae1ab4
test: remove unnecessary code
colin-axner c76bc4a
test: apply review code suggestions
colin-axner 202445b
test: move SendPacket test up in layout
colin-axner b91b6c6
refactor: panic with errors in NewIBCMiddleware
damiannolan b54318d
test: refactor TestWithICS4Wrapper to simplify and reduce LOC
damiannolan 1de0dc4
chore: rm mock logger and usage in tests
damiannolan 810f595
nit: explicitly return 0 sequence when error is not nil
damiannolan fee8533
lint: make use of unused test var maxCallbackGas
damiannolan 10db12e
merge: branch 'main' into serdar/adr8-middleware
srdtrk 7c75b51
imp(callbacks): reduced case logic for eventTrigger
srdtrk 2d59da4
style(callbacks): improved event keys
srdtrk 5dffa43
refactor(callbacks): refactored gas logic
srdtrk a926b02
imp(callbacks): empty address returns an error now
srdtrk d13eece
style(callbacks): styled function arguments
srdtrk e0c2f33
refactor: simplify testing setup for callbacks
colin-axner c093b0e
Merge branch 'serdar/adr8-middleware' of github.com:cosmos/ibc-go int…
colin-axner 59d5333
rename: mock's keeper.go to contract_keeper.go
colin-axner b33d903
refactor: remove mock keeper, use only mock contract keeper
colin-axner 6a04c2c
rename: StateCounter -> StateEntryCounter
colin-axner 62747d7
nit: simapp in-code docs
colin-axner e817dbc
merge: remote-tracking branch 'origin/serdar/adr8-middleware' into se…
srdtrk a04197c
refactor: simplify mock contract keeper process callback
colin-axner 85eafff
test: remove unnecessary test cases in transfer/fee integration tests
colin-axner de5c1ec
merge: remote-tracking branch 'origin/serdar/adr8-middleware' into se…
srdtrk 39622c0
imp(callbacks): moved 'callbackDataGetter' logic up a level
srdtrk ee928ea
merge: branch 'main' into serdar/adr8-middleware
srdtrk a18c877
refactor(callbacks): moved emit event logic up a level
srdtrk 0f6dd17
style(callbacks): styled function arguments
srdtrk 15f9187
docs(callbacks): improved godocs of contract keeper
srdtrk e534ac1
style: renamed CallbackTypeAcknowledgement -> CallbackTypeAcknowledge…
srdtrk 68fc17a
docs(callbacks): fixed events godocs
srdtrk cb77b3f
style(callbacks_test): fixed typo
srdtrk 3359e11
style(callbacks): rename timeout -> timeout_packet
srdtrk e044eff
style(callbacks): rename ContractAddress -> CallbackAddress
srdtrk 54f9c9b
imp(callbacks): don't handle panics for SendPacket
srdtrk 5d7c1cd
style: renamed CallbackTypeWriteAcknowledgement -> CallbackTypeReceiv…
srdtrk b53514f
style: renamed CallbackType -> CallbackTrigger
srdtrk 87364c6
style(callbacks_test): fixed typo in test case
srdtrk b093f53
docs(mock.adr8): updated godocs of contract keeper
srdtrk 7964e5c
imp(callbacks): moved logging after possible retry
srdtrk b0ce5e4
style(callbacks): renamed function argument callbackType -> callbackT…
srdtrk b215102
imp(callbacks): fixed logger name
srdtrk c6b603d
imp(callbacks): 'LogDebugWithPacket' added
srdtrk 124640c
refactor(ibc_middleware_test): turn SendPacket into table test
colin-axner c2d1cb4
test: add test cases for SendPacket table test
colin-axner f9fe981
refactor(ibc_middleware_test): turn OnAcknowledgementPacket tests int…
colin-axner 848a6d2
test(OnAcknowledgement): add counter and state entry checks
colin-axner be5813c
merge: remote-tracking branch 'origin/serdar/adr8-middleware' into se…
srdtrk 59209ad
test(ica_test): remove duplicate tests
colin-axner a7a48ea
testing: fix usage on TimeoutPacket to use counterparty portID/channe…
colin-axner fa1c993
test(ica_test): simplify timeout logic
colin-axner 5b14987
merge: remote-tracking branch 'origin/serdar/adr8-middleware' into se…
srdtrk 8f7c92e
Merge branch 'main' into serdar/adr8-middleware
colin-axner da93f5b
test(types/callback_test.go): remove unused testing bool
colin-axner df6d28d
Merge branch 'serdar/adr8-middleware' of github.com:cosmos/ibc-go int…
colin-axner f051f9a
merge: remote-tracking branch 'origin/serdar/adr8-middleware' into se…
srdtrk 8a4fb50
style: ran golangci-lint
srdtrk 4b54677
style: renamed CallbackTrigger -> CallbackType
srdtrk dc325ed
refactor(ibc_middleware_test): turn OnTimeout into a table test
colin-axner c008f50
Merge branch 'serdar/adr8-middleware' of github.com:cosmos/ibc-go int…
colin-axner ba0adf0
refactor(ibc_middleware_test): turn OnRecvPacket into a table test
colin-axner 6ab4d2a
style(callbacks_test): added nolint comments
srdtrk 82c83b2
style(callbacks_test): fixed some typos
srdtrk 7df0085
imp(callbacks_test): added table tests for WriteAcknowledgement'
srdtrk c4905ca
imp(callbacks_test): removed dest_callback test cases for ica as it i…
srdtrk 47fb2d9
fix(callbacks): fixed send_packet panic handling
srdtrk be12942
fix(callbacks_test): fix failing tests due to SendPacket panic
srdtrk 4fa945b
imp(callbacks): added 'AllowRetry' function
srdtrk 773c0e3
imp(callbacks): processCallback panic recovery logic is simplified
srdtrk d78ccb8
style(callbacks): updated style of the comment
srdtrk aee07af
fix(callbacks_test): removed potential premature return
srdtrk 71d5151
docs(callbacks_test): updated inline comment
srdtrk e133673
imp(callbacks_test): 'TestProcessCallback' added
srdtrk 8f741b0
imp(callbacks): upgraded the panic on timeout logic
srdtrk d45ae4a
docs(callbacks): added inline comments
srdtrk 5c4703d
merge: branch 'main' into serdar/adr8-middleware
srdtrk 28ac059
imp(callbacks): removed 'LogDebugWithPacket'
srdtrk 1ea7c0d
docs(callbacks): updated godocs and inline comments
srdtrk 01483b1
imp(callbacks): prevent maxCallbackGas from being 0
srdtrk 836d513
imp(callbacks): removed logger
srdtrk fb156d7
imp(callbacks): added 'ErrCannotUnmarshalPacketData'
srdtrk 57b428a
imp(callbacks_test): created ''TestGetCallbackData
srdtrk ef639eb
imp(callbacks_test): improved 'TestNewIBCMiddleware'
srdtrk 9558877
imp(callbacks): issue#4323 - add strings.Trimspace
srdtrk 1058d45
docs(callbacks): issue#4325 - inline comment added for explaining why…
srdtrk 70962fe
style(callbacks): passing nil instead of err to events in SendPacket
srdtrk 9a09845
docs(callbacks): issue#4325 - added inline comments explaining why so…
srdtrk a168006
imp(callbacks_test): added test cases for '0' user defined gas limit
srdtrk 867d9a4
merge: branch 'main' into serdar/adr8-middleware
srdtrk 4e6bc61
imp(simapp): removed unneeded comment
srdtrk 3073c93
imp(callbacks_test): using testAccAddress for transfer tests now
srdtrk 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
style(callbacks_test): fixed some typos
- Loading branch information
commit 82c83b24eedc3d43fec6b8ebf719c7e967a590f7
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
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
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.
great work on these tests, these were pretty easy to follow!