Closed yito88 closed 5 months ago
The cause is a difference in Tendermint's event type between Cosmos and Namada.
Cosmos(Gaia) emitted a WriteAcknowledgement
event in Tx
event type. Namada emitted all events in EndBlock
and they were included in NewBlock
event type. Hermes doesn't assume that WriteAcknowledgement
event is included in NewBlock
. (So, transfers from Namada to Gaia worked well.)
When the event is captured in Hermes, Hermes spawns a relaying thread and relays the packet for the ack. However, Namada's WriteAcknowledgement
event was ignored by Hermes because it was in NewBlock
event.
I fixed Hermes to check WriteAcknowledgement
event in NewBlock
, and it worked well.
https://github.com/heliaxdev/hermes/commit/764973dd79233e7a709b9e709763a327ebaddfdc
Bunun nedeni, Tendermint'in Cosmos ve Namada arasındaki olay türündeki farklılıktır. Cosmos(Gaia) bir mesaj yaydı
WriteAcknowledgement
olayTx
etkinlik tipi. Namada tüm olayları yayınladıEndBlock
ve onlar da dahil edildiNewBlock
etkinlik tipi. Hermes bunu varsaymıyorWriteAcknowledgement
etkinlik dahildirNewBlock
. (Yani Namada'dan Gaia'ya transferler işe yaradı.) Olay Hermes'te yakalandığında, Hermes bir aktarma iş parçacığı oluşturur ve paketi onay için iletir. Ancak Namada'nınWriteAcknowledgement
olay Hermes tarafından göz ardı edildi çünküNewBlock
etkinlik.Hermes'i kontrol etmesi için düzelttim
WriteAcknowledgement
olayNewBlock
ve iyi çalıştı. 764973d
hello yito when i want to swap tokens with xcs contract in osmosis and send them to namada, the tokens get stuck in relayer.
if I then send a regular ibc transfer, the tokens stuck in relayer are transferred to namada. is this issue related to my problem?
Hi @hkey0, thank you for reporting it. Actually, this issue has been resolved by using the upstream tendermint-rs
.
Could you share your operations to reproduce the issue and the versions of Namada and Hermes?
Hi @hkey0, thank you for reporting it. Actually, this issue has been resolved by using the upstream
tendermint-rs
. Could you share your operations to reproduce the issue and the versions of Namada and Hermes?
I didn't expect you to respond so quickly. So I was resting. Sorry for the late reply.
I am using the latest version of Namada (0.31.6). I installed Hermes following the instructions here. https://docs.namada.net/operators/ibc#from-source
I set up relayer, deployed xcs and swap router contract in osmosis testnet, set pools and channels from the contract. I can start a transaction in osmosis, swap tokens and transfer tokens to namada (atomically) but most of the time the funds get stuck in relayer. Then when I do a regular ibc transfer, the stuck funds are transferred to namada.
I sent you a message on discord (yuji088) to chat in detail. My nickname is hkey
. Can we chat on discord for instant and fast communication?
The original issue was resolved by using the upstream tendermint-rs
Summary of Bug
When a Namada chain sent a token to another Namada chain, (if the other chain didn't send, i.e.
SendPacket
event didn't happen,) the source chain didn't receive the ack though Hermes caught theWriteAcknowledgement
event from the destination chain.tx packet-ack
manually, the source chain received the ack as expectedVersion
v1.7.1-namada-beta4
Steps to Reproduce
Acceptance Criteria
For Admin Use