You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a local dev environment we are running a provider chain that is connected via relayer to a consumer chain (neutron clone).
The overall idea is that the entire governance logic on that particular consumer is being done via the provider. Here Interchain-Accounts seem like a good solution to implement such a logic.
So for that we have created a custom module to handle a custom proposal type.
If a proposal passes the ConsumerGovProposal function is triggered and in here we are trying to create
an ICA programmatically:
govAccountAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String()
portID, err := icatypes.NewControllerPortID(govAccountAddress)
if err != nil {
k.Logger(ctx).Error("SubmitTx: failed to create NewControllerPortID:", "error", err)
return nil, errors.Wrap(err, "failed to create NewControllerPortID")
}
k.Logger(ctx).Info("Created PortId", "portid", portID)
_, found := k.icsControllerKeeper.GetInterchainAccountAddress(ctx, connectionID, portID)
if !found {
k.Logger(ctx).Info("ICA Address not found. Register new ICA")
icaMetadata := icatypes.Metadata{
Version: "ics27-1",
ControllerConnectionId: connectionID,
HostConnectionId: connectionID,
Encoding: "proto3",
TxType: "sdk_multi_msg",
}
versionBz, err := json.Marshal(icaMetadata)
if err != nil {
return nil, errors.Wrap(err, "failed to marshal ICA metadata")
}
msg := &icacontrollertypes.MsgRegisterInterchainAccount{
ConnectionId: connectionID,
Owner: govAccountAddress,
Version: string(versionBz),
Ordering: channeltypes.UNORDERED,
}
res , err2 := k.icaControllerMsgServer.RegisterInterchainAccount(ctx, msg)
if err2 != nil {
k.Logger(ctx).Error("RegisterInterchainAccount: failed to register account:", "error", err2)
return nil, errors.Wrap(err2, "failed to create InterchainAccount")
}
k.Logger(ctx).Info("Response", "res", res.String())
}
So for testing we run the provider, vote for consumer addition, run the consumer and then establish a connection, cannel and run the relayer. Next we submit a custom proposal and when the voting period passes it triggers the above function.
And that one always looks like it's working since we never enter the error block:
if err2 != nil {
k.Logger(ctx).Error("RegisterInterchainAccount: failed to register account:", "error", err2)
return nil, errors.Wrap(err2, "failed to create InterchainAccount")
}
Now as far as I have understood the process of creating an ICA, icacontrollertypes.MsgRegisterInterchainAccount should trigger an automatic channel creation with the provided connectionID via IBC.
And indeed the OnChanOpenInit is successfully called, but then nothing happens...
I.e. the relayer is not reacting nor the OnChanOpenTry on the consumer...
It does look like the event is emitted correctly (as far as I could debug) but for some reason it seems that the relayer is not picking it up...
So the most obvious idea is to check the chains.packet_filter of the .config of hermes but we have added:
It seems like a relayer problem, but without knowing a bit more about which version of ibc-go and hermes, it is hard to know for sure. Maybe try to set the allow list to simply "", "" to see if that does anything.
I've tried to set the allow list like you suggested, but still no response from the relayer...
We are using ibc-go v8 and hermes version 1.10.4+542e14f
Hi,
In a local dev environment we are running a provider chain that is connected via relayer to a consumer chain (neutron clone).
The overall idea is that the entire governance logic on that particular consumer is being done via the provider. Here Interchain-Accounts seem like a good solution to implement such a logic.
So for that we have created a custom module to handle a custom proposal type.
If a proposal passes the
ConsumerGovProposal
function is triggered and in here we are trying to createan ICA programmatically:
So for testing we run the provider, vote for consumer addition, run the consumer and then establish a connection, cannel and run the relayer. Next we submit a custom proposal and when the voting period passes it triggers the above function.
And that one always looks like it's working since we never enter the error block:
All the inputs look correct to me and I've compared them to the instructions here:
https://github.com/cosmos/ibc-go/wiki/How-to-use-groups-with-ICA
Now as far as I have understood the process of creating an ICA,
icacontrollertypes.MsgRegisterInterchainAccount
should trigger an automatic channel creation with the providedconnectionID
via IBC.And indeed the
OnChanOpenInit
is successfully called, but then nothing happens...I.e. the relayer is not reacting nor the
OnChanOpenTry
on the consumer...It does look like the event is emitted correctly (as far as I could debug) but for some reason it seems that the relayer is not picking it up...
So the most obvious idea is to check the
chains.packet_filter
of the .config of hermes but we have added:so I guess that shouldn't be the problem...
So I wanted to ask if anyone knows or has some ideas what the problem might be?
The text was updated successfully, but these errors were encountered: