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

bug: successful fee-grant and revoke-fee-grant show ERROR in logs and "result": "RPC client error: sendRequest failed: http status 200 OK unmarshaling response: EOF" in CLI #3322

Closed
jcstein opened this issue Apr 19, 2024 · 7 comments · Fixed by #3336
Assignees
Labels
bug Something isn't working external Issues created by non node team members

Comments

@jcstein
Copy link
Member

jcstein commented Apr 19, 2024

Celestia Node version

v0.13.2-17-g6382dc13

OS

mac

Install tools

building on main at a point after #3304, at 6382dc13b92d7b40077154aab823367500371cb8

Others

No response

Steps to reproduce it

make feegrant or revoke feegrant

Expected result

no ERROR in logs, because the transaction was successful

Actual result

ERROR in logs of celestia-node on successful fee-grant and in revoke-fee-grant and RPC client error in CLI, although http status 200 OK

  1. see comment with logs for successful grant-fee tx
  2. see comment with logs for successful revoke-grant-fee tx

Relevant log output

No response

Notes

No response

@jcstein jcstein added the bug Something isn't working label Apr 19, 2024
@github-actions github-actions bot added the external Issues created by non node team members label Apr 19, 2024
@liamsi
Copy link
Member

liamsi commented Apr 19, 2024

I can confirm this is not working as expected and this mainly seems to be a serialization issue:

2024-04-19T21:47:45.267+0200    ERROR   rpc     go-jsonrpc@v0.3.1/handler.go:489        json: error calling MarshalJSON for type *types.Any: JSON marshal marshaling error for &Any{TypeUrl:/cosmos.tx.v1beta1.Tx,Value:[10 191 1 10 188 1 10 42 47 99 111 115 109 111 115 46 102 101 101 103 114 97 110 116 46 118 49 98 101 116 97 49 46 77 115 103 71 114 97 110 116 65 108 108 111 119 97 110 99 101 18 141 1 10 47 99 101 108 101 115 116 105 97 49 103 109 104 120 99 104 106 56 108 116 101 103 115 99 55 117 122 56 103 114 51 106 110 48 106 53 48 117 55 57 48 51 103 116 104 51 53 52 18 47 99 101 108 101 115 116 105 97 49 50 112 115 103 57 48 108 119 118 120 100 107 116 110 113 101 114 114 50 112 53 109 120 117 119 50 118 51 106 101 52 57 55 117 118 54 116 106 26 41 10 39 47 99 111 115 109 111 115 46 102 101 101 103 114 97 110 116 46 118 49 98 101 116 97 49 46 66 97 115 105 99 65 108 108 111 119 97 110 99 101 18 30 10 8 18 4 10 2 8 1 24 76 18 18 10 12 10 4 117 116 105 97 18 4 50 48 48 48 16 192 132 61 26 64 246 131 239 137 195 146 139 141 23 210 30 199 216 59 100 100 152 66 100 16 117 100 206 179 187 127 67 108 191 153 154 72 53 210 124 27 217 173 143 37 227 239 8 75 139 74 213 222 117 29 251 100 26 219 52 49 161 248 36 80 19 108 28 246],XXX_unrecognized:[]}, this is likely because amino is being used directly (instead of codec.LegacyAmino which is preferred) or UnpackInterfacesMessage is not defined for some type which contains a protobuf Any either directly or via one of its members. To see a stacktrace of where the error is coming from, set the var Debug = true in codec/types/compat.go

The most relevant part of the error is:
"XXX_unrecognized:[]}, this is likely because amino is being used directly (instead of codec.LegacyAmino which is preferred) or UnpackInterfacesMessage is not defined for some type which contains a protobuf Any either directly or via one of its members. "

@jcstein
Copy link
Member Author

jcstein commented Apr 19, 2024

The feegrant and revoke actually are successful transactions that land on chain. The logging in node seems to be the issue on my end

@liamsi
Copy link
Member

liamsi commented Apr 19, 2024

Hmm, yeah but somewhere the JSON can't be (de-)serialized (hence node is reporting an error):

{
  "result": "RPC client error: sendRequest failed: http status 200 OK unmarshaling response: EOF"
}

So while the transactions seem to work the JSON result is broken.

Given that @vgonkivs tested it before in #3304 (comment), I assume that one of the changes/commits that came after the testing somehow broke sth.

@vgonkivs vgonkivs self-assigned this Apr 19, 2024
@vgonkivs
Copy link
Member

It's not working for me too on the latest main.

@vgonkivs
Copy link
Member

vgonkivs commented Apr 19, 2024

seems it panics after marshaling TX

Error: json: error calling MarshalJSON for type *types.Any: unknown message type ""

@jcstein
Copy link
Member Author

jcstein commented Apr 19, 2024

I assume that one of the changes/commits that came after the testing somehow broke sth.

Yep! I can confirm that testing this on the PR itself results in successful result

Semantic version: v0.13.2-22-g9f5f4534 (log)

  1. log of grant-fee, with no errors in the light node's logs
  2. log of revoke-grant-fee, with no errors in the light node's logs

@liamsi
Copy link
Member

liamsi commented Apr 21, 2024

If the change that led to this has nothing to do with the feegrant PR, it could be that more tx or other responses can't be unmarshalled right now. I think it would be good if API responses would be tested.

Wondertan pushed a commit that referenced this issue Apr 25, 2024
Resolves #3322

Marshaling TxResponse fails because TxResponse.Tx is not empty but does not contain respective codec for encoding using the standard json.MarshalJSON()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Issues created by non node team members
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants