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

decode query error #49

Merged
merged 2 commits into from
Jul 10, 2024
Merged

decode query error #49

merged 2 commits into from
Jul 10, 2024

Conversation

dai1975
Copy link
Contributor

@dai1975 dai1975 commented Jul 4, 2024

Define parseRpcError() in tx.go and use this func when ibcHandler.xxx() calls fails.

log output yrly query client ibc01 ibc0 with unexist client-id config:

{
  "time": "2024-07-04T09:32:15.559877923Z",
  "level": "ERROR",
  "source": {
    "function": "github.com/hyperledger-labs/yui-relayer/log.(*RelayLogger).Error",
    "file": "/home/dai/local/go/pkg/mod/github.com/hyperledger-labs/[email protected]/log/slog.go",
    "line": 72
  },
  "msg": "failed to get client state",
  "module": "ethereum.chain",
  "chain_id": "ibc0",
  "error": "execution reverted",
  "stack": "execution reverted\n(1) attached stack trace\n  -- stack trace:\n  | github.com/datachainlab/ethereum-ibc-relay-chain/pkg/relay/ethereum.(*Chain).QueryClientState\n  | \t/home/dai/d/relayer/query/ethereum-ibc-relay-chain-fork3/pkg/relay/ethereum/chain.go:220\n  | github.com/hyperledger-labs/yui-relayer/cmd.queryClientCmd.func1\n  | \t/home/dai/local/go/pkg/mod/github.com/hyperledger-labs/[email protected]/cmd/query.go:61\n  | github.com/spf13/cobra.(*Command).execute\n  | \t/home/dai/local/go/pkg/mod/github.com/spf13/[email protected]/command.go:983\n  | github.com/spf13/cobra.(*Command).ExecuteC\n  | \t/home/dai/local/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115\n  | github.com/spf13/cobra.(*Command).Execute\n  | \t/home/dai/local/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039\n  | github.com/hyperledger-labs/yui-relayer/cmd.Execute\n  | \t/home/dai/local/go/pkg/mod/github.com/hyperledger-labs/[email protected]/cmd/root.go:100\n  | main.main\n  | \t/home/dai/d/relayer/query/yui-relayer-build/relayer/main.go:14\n  | runtime.main\n  | \t/home/dai/.asdf/installs/golang/1.22.4/go/src/runtime/proc.go:271\n  | runtime.goexit\n  | \t/home/dai/.asdf/installs/golang/1.22.4/go/src/runtime/asm_arm64.s:1222\nWraps: (2) execution reverted\nError types: (1) *withstack.withStack (2) *rpc.jsonError",
  "revert_reason": "IBCHostClientNotFound{\"clientId\":\"mock-client-100\"}",
  "raw_error_data": "25a8dfe70000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f6d6f636b2d636c69656e742d3130300000000000000000000000000000000000"
}

@dai1975 dai1975 requested a review from siburu July 4, 2024 09:36
Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

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

@dai1975 Thank you. I have put some comments.

pkg/relay/ethereum/events.go Outdated Show resolved Hide resolved
pkg/relay/ethereum/msg.go Outdated Show resolved Hide resolved
Signed-off-by: Daisuke Kanda <[email protected]>
@siburu
Copy link
Contributor

siburu commented Jul 10, 2024

@dai1975 Please ensure make test to pass the test.

@dai1975
Copy link
Contributor Author

dai1975 commented Jul 10, 2024

sorry, fix it.

Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

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

@dai1975 LGTM, thank you!

@siburu siburu merged commit bc1def6 into datachainlab:main Jul 10, 2024
1 check passed
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.

2 participants