-
Notifications
You must be signed in to change notification settings - Fork 28
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
Integrate IBC hooks #801
Integrate IBC hooks #801
Conversation
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.
Reviewable status: 0 of 21 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)
integration-tests/contracts/ibc/ibc-hooks-counter/src/contract.rs
line 132 at r1 (raw file):
use super::*; pub fn receive_ack(
I have question here lets discuss
https://github.com/cosmos/ibc-apps/tree/main/modules/ibc-hooks#interface-for-receiving-the-acks-and-timeouts
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.
Reviewable status: 0 of 21 files reviewed, 7 unresolved discussions (waiting on @keyleu, @masihyeganeh, @miladz68, @wojtek-coreum, and @ysv)
go.mod
line 11 at r2 (raw file):
// github.com/coinbase/rosetta-sdk-go module in v0.7.9 but now it is standalone module. // And this causes "ambiguous import" error. Note: it gets broken only when using go work. github.com/coinbase/rosetta-sdk-go v0.7.9 => github.com/coinbase/rosetta-sdk-go v0.8.4
Did you try to use it in require
as normal dependency instead of the replace
?
go.mod
line 35 at r2 (raw file):
github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 github.com/cosmos/ibc-go/v7 v7.3.1
Do you remember that you need to update the version to the latest with the fixed security issue?
Same for integration-tests module.
app/app.go
line 563 at r2 (raw file):
app.keys[ibchookstypes.StoreKey], ) wasmHooks := ibchooks.NewWasmHooks(&app.IBCHooksKeeper, nil, ChosenNetwork.Provider.GetAddressPrefix())
nit: You can merge 2 lines, since you don't use wasmHooks
later
app/app.go
line 688 at r2 (raw file):
// Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it app.Ics20WasmHooks.ContractKeeper = &app.WasmKeeper
Can you pass it as arg in the ibchooks.NewWasmHooks(&app.IBCHooksKeeper, nil, ChosenNetwork.Provider.GetAddressPrefix())
? Because you set it to nil inNewWasmHooks
func , and later set it manually,
integration-tests/contracts/ibc/ibc-hooks-counter/src/contract.rs
line 119 at r2 (raw file):
ack: _, success, }) => sudo::receive_ack(deps, env.contract.address, success),
We need to have a test to test it.
integration-tests/contracts/ibc/ibc-hooks-counter/src/integration_tests.rs
line 1 at r2 (raw file):
#[cfg(test)]
Do you need the rust integration tests, unit tests, etc? I propose to keep only the code you need for the go-based integration test.
integration-tests/ibc/hooks_test.go
line 132 at r2 (raw file):
requireT.NotEqual(ibcHookCallerOnCoreumAddr1, ibcHookCallerOnCoreumAddr2) ibcHookMemo := fmt.Sprintf(`{"wasm":{"contract": "%s", "msg":{"increment":{}}}}`, coreumContractAddr)
Could you please explain in the comment how it works?
integration-tests/ibc/hooks_test.go
line 200 at r2 (raw file):
} func awaitHooksContractState(
nit: I would call it awaitHooksContractCounterState
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.
Reviewable status: 21 of 25 files reviewed, 3 unresolved discussions (waiting on @keyleu, @masihyeganeh, @miladz68, @wojtek-coreum, and @ysv)
.github/workflows/ci.yml
line 114 at r7 (raw file):
with: path: ~/.cache/golangci-lint key: ${{ runner.os }}-linter-cache-v3-${{ steps.goversion.outputs.GO_VERSION }}
Why do you need that change?
integration-tests/ibc/hooks_test.go
line 258 at r7 (raw file):
) // Sudo IBCAck or IBCTimeout message will be sent to the contract specified in memo.
Let's discuss it today one more time, please.
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.
Reviewable status: 21 of 25 files reviewed, 3 unresolved discussions (waiting on @dzmitryhil, @keyleu, @masihyeganeh, @miladz68, @wojtek-coreum, and @ysv)
.github/workflows/ci.yml
line 114 at r7 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Why do you need that change?
Done.
integration-tests/ibc/hooks_test.go
line 258 at r7 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Let's discuss it today one more time, please.
ok
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.
Reviewed 1 of 2 files at r6, 2 of 3 files at r7, 1 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dzmitryhil, @keyleu, @masihyeganeh, @wojtek-coreum, and @ysv)
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.
Reviewable status: 24 of 25 files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @keyleu, @masihyeganeh, @miladz68, and @wojtek-coreum)
integration-tests/ibc/hooks_test.go
line 258 at r7 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
ok
discussed on call
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.
Reviewed 1 of 1 files at r9, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @keyleu, @masihyeganeh, and @wojtek-coreum)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu, @masihyeganeh, and @wojtek-coreum)
17c0511
to
08b6487
Compare
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.
Reviewed 6 of 6 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu, @masihyeganeh, and @wojtek-coreum)
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.
Reviewed 7 of 10 files at r5, 1 of 3 files at r7, 1 of 1 files at r8, 6 of 6 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu, @masihyeganeh, and @wojtek-coreum)
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.
Reviewed 1 of 5 files at r4, 7 of 10 files at r5, 1 of 3 files at r7, 1 of 1 files at r8, 1 of 6 files at r10, 5 of 5 files at r11, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @wojtek-coreum)
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.
Reviewed 5 of 5 files at r11, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @wojtek-coreum)
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.
Reviewed 5 of 5 files at r11, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @wojtek-coreum)
Description
Reviewers checklist:
Authors checklist
This change is