Skip to content
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

refator: refator some code of Ckb4Ibc endpoint, solved some fatal bugs #364

Merged
merged 6 commits into from
Nov 2, 2023

Conversation

ashuralyk
Copy link
Contributor

@ashuralyk ashuralyk commented Oct 31, 2023

background

there are so many bugs in Axon and CKB endpoints which can stop relaying packet events or just miss some of them, to unwrap, here are some reasons make this case happen:

  1. monitor of CKB endpoint always fetches first 5 packet events in the response data of ckb-indexer, so the packet event beyonds 5th won't process
  2. query_* methods both in Axon and CKB endpoints isn't working well (CKB is worse), and Hermes uses them to indicate wether the counterparty has handled the unhandled packet events
  3. the WriteAck packet cell in CKB endpoint should be consumed in the next time of creating new RecvPacket cell, if not do this, WriteAck packet cell is accumulating and consuming relayer's CKB capacity
  4. Axon endpoint should replay recent packet events, because some of them may not be relayed to CKB
  5. at the same time, there can be over two type of packets share the same sequence, for example, SendPacket packet with sequence 14 and WriteAck packet with sequence 14 too, this could cause query issue
  6. currently, forcerelay is doing better than before

change logs

  1. Axon endpoint supports replaying recent packet events
  2. CKB endpoint will fetch IBC events through ckb-indexer in a loop process
  3. packet related query_* methods are refactored in CKB endpoint
  4. CKB endpoint supports consuming useless WriteAck packet cells
  5. CKB endpoint searches single packet cell using a limit of packet status
  6. ckb contracts has updated

related PRs

@ashuralyk ashuralyk force-pushed the feat/complete-query-packet-events branch 2 times, most recently from 1ad1724 to 6a59831 Compare November 1, 2023 00:52
@ashuralyk ashuralyk force-pushed the feat/complete-query-packet-events branch from 6a59831 to 18bb928 Compare November 1, 2023 03:45
Copy link
Collaborator

@Flouse Flouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the contract version changed?

Copy link
Collaborator

@Flouse Flouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashuralyk
Copy link
Contributor Author

Is the contract version changed?

no, I'll fix it

@ashuralyk
Copy link
Contributor Author

ashuralyk commented Nov 1, 2023

@ashuralyk ashuralyk added this pull request to the merge queue Nov 2, 2023
Merged via the queue into main with commit 983ecb7 Nov 2, 2023
32 checks passed
@blckngm blckngm deleted the feat/complete-query-packet-events branch December 8, 2023 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants