feat: feegrant module for blobs submission via DA Light node
Overview
Works:
- https://mocha.celenium.io/address/celestia1rgj3z5rfydj3xulhm6glqr0zs7j8rr9rfh6ekw
- https://mocha.celenium.io/tx/f28aeffeb003a21d4810660bb7d529b744d24419440e29080b3284a247977fe1
- https://mocha.celenium.io/tx/802a17777fbeab416f6fa2c25f0c56dd9cc8a92afc2a96293d114ac7c22efb5c
Resolves #1470
Checklist
- [ ] New and updated code has appropriate documentation
- [ ] New and updated code has new and/or updated testing
- [ ] Required CI checks are passing
- [ ] Visual proof for any user facing features like CLI or documentation updates
- [ ] Linked issues closed with keywords
Summary by CodeRabbit
- New Features
- Introduced a guide on using the FeeGrant module for blobs submission on Celestia's Mocha testnet, allowing third-party accounts to cover transaction fees.
[!WARNING]
Rate limit exceeded
@jcstein has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 8 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the
@coderabbitai reviewcommand as a PR comment. Alternatively, push new commits to this PR.We recommend that you space out your commits to avoid hitting the rate limit.
How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.
Commits
Files that changed from the base of the PR and between 713b8f8287a1b02a100040e0de162e8dbcd74f4b and 844e2222162231e04596200ba3a22e62111b427b.
Walkthrough
This update introduces documentation for the FeeGrant module on Celestia's Mocha testnet, enabling third-party accounts to cover transaction fees for data availability node accounts during blob submissions. The addition enhances developer guidance for utilizing Celestia's features more efficiently.
Changes
| File(s) | Change Summary |
|---|---|
.vitepress/config.ts |
Added sidebar link for the FeeGrant module guide |
developers/feegrant-for-blobs.md |
New guide on using the FeeGrant module for blob submissions |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| feat: fee grant module doc (#1470) | ✅ |
🐇 Poem by CodeRabbit 🐇
In the realm of data, under testnet's glow,
A module arises, with fees it bestows.
"Worry not," it whispers, to nodes far and wide,
"For your blobs' journey, a sponsor's by your side."
🌟 Through Celestia's skies, our data now leaps,
With the FeeGrant's magic, the blockchain it sweeps.
🚀 To the devs, we bow, for making it clear,
Onwards we hop, with nothing to fear!
🌈🐰
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This PR also covers a basic example of #1492
cannot repro successful use of feegrant from celestia-node. blob is paid for from 10000utia on celestia-node
- feegrant tx https://mocha.celenium.io/tx/7a2a5a13217c4be1d6053285f030abe4a82ae8b3d7a7fe93b4c9ce36bd909f2d
- pfb tx, where the fee is deducted from light node account https://mocha.celenium.io/tx/df74459d949248a92403ca98037ab3a8b155de63173c00ecee14a8adedebeea1
notes from @vgonkivs added in https://github.com/celestiaorg/docs/pull/1500/commits/c335d08699af9124206fe545812e77bfb08f747f:
I’ve just merged the fee granting pr. Some TLDR for you for docs updating:
- using node you now can easily give permission for other nodes to submit transactions on your behalf(I mean your node will pay fees for these txs)
- you can revoke the grant as well
- The node that receives the grant has to run a node with
--granter.address=celestia1v96seg23ehfhfjwk0wcy3s5y0krptt284vh236to use granting functionality.
The granter address will be stored until the next run of your local node. So, in case the granter revokes permission, you will have to restart the node without this flag. I guess, important to know that such transactions(with granter) will consume more gas than the regular ones. https://github.com/celestiaorg/celestia-node/pull/3304 - here is the PR. to grant permission, you’ll have to execute:
celestia state grant-fee celestia12psg90lwvxdktnqerr2p5mxuw2v3je497uv6tj 2000 1000000--node.store ~/.celestia-light-mocha-4/
to revoke:
celestia state revoke-grant-fee celestia12psg90lwvxdktnqerr2p5mxuw2v3je497uv6tj 2000 1000000 --node.store ~/.celestia-light-mocha-4/
to run the node in a grantee mode:
celestia full start --core.ip full.consensus.mocha-4.celestia-mocha.com --p2p.network=mocha --granter.address=celestia1v96seg23ehfhfjwk0wcy3s5y0krptt284vh236
This PR also added a gasMultiplier, for the transactions with the Options. Not sure if is it relevant for docs or not.
I’ve also added a specific error for the case when you run your node as a grantee, but the granter revokes his permission. In this case, your tx will be failed with an error:
granter has revoked the grant . This will mean that you have to restart the node w/o a flag.
when trying to submit a blob, i first have:
celestia blob submit 0x42690c204d39600fddd3 0x676d
{
"result": "rpc error: code = Unknown desc = timed out waiting for tx to be included in a block"
}
and then >12 seconds later, submitting again fails with:
celestia blob submit 0x42690c204d39600fddd3 0x676d --gas.price 0.02
{
"result": ": incorrect account sequence"
}
balance before transaction:
{
"result": {
"denom": "utia",
"amount": "9840"
}
}
retrying later once tx is out of mempool:
celestia blob submit 0x42690c204d39600fddd3 0x676d --gas.price 0.02
{
"result": {
"height": 1635793,
"commitments": [
"0MFhYKQUi2BU+U1jxPzG7QY2BVV1lb3kiU+zAK7nUiY="
]
}
}
balance after transaction, clearly deducted from grantee's balance instead of granter's balance:
celestia state balance
{
"result": {
"denom": "utia",
"amount": "8084"
}
}
I guess, important to know that such transactions(with granter) will consume more gas than the regular ones.
@vgonkivs is this just due to the transaction size being larger? or something else?
after a few blobs, the balance of celestia10f7nxmcjptwxldjnrrqumfzkxv5l96gnzg2267 is 104 utia
trying to post a blob, from an account with a feegrant (running without the special flag), fails:
celestia blob submit 0x42690c204d39600fddd3 0x676d
{
"result": ": insufficient funds"
}
I will try this now with celestia-node special flag and only using celestia-node, not combo of celestia-app/node
I guess, important to know that such transactions(with granter) will consume more gas than the regular ones. @vgonkivs is this just due to the transaction size being larger? or something else?
Yes, because we are specifying the granter via an additional option.
for @vgonkivs vis. i was testing the previous UX and will next test the UX with commands from your advice above
after a few blobs, the balance of celestia10f7nxmcjptwxldjnrrqumfzkxv5l96gnzg2267 is 104 utia trying to post a blob, from an account with a feegrant (running without the special flag), fails:
To use granter, you need to run your node with a specific flag, otherwise, you will have to pay for the tx.
- feegrant tx from node account 1
- running with new account with balance 104utia
celestia light start --p2p.network mocha --core.ip rpc-mocha.pops.one --keyring.accname notjosh --granter.address=celestia1h08dla2jg2529n6vjd7pxsd3gla5dvhptkve53
- submitting a blob from the grantee account is successful https://mocha.celenium.io/tx/374eeffe8cc561bec82fdb7d71d230648756ca74bf9885b5ed18db3438135190
- balance on grantee account is still 104 utia
- another test transaction, successful https://mocha.celenium.io/tx/67e7a7d34166c6b17f85d57e1db6c0740617e1470379b80bbe3e0f4c27a0638e
@Bidon15 I plan to remove usage of celestia-app from this PR and just use celestia-node, as it works that way edit: using it as an optional section
It is also possible to send a fee grant tx to the app directly and then run a node with --granter.address
The reason why we've added this flag is to allow you at some point stop using granter money(if you want)
awesome. incoming commit with updates to show the new user flow with celestia-node as well as an optional bit on making the allowance tx from celestia-app
@vgonkivs can you help me understand what changes UX wise for this? i can't find it in the menu:
This PR also added a
gasMultiplier, for the transactions with the Options.
thank you 🙌
ERROR in logs of celestia-node on successful grant-fee tx
feegrant outputs by celestia-node CLI:
celestia state grant-fee $GRANTEE_ADDRESS 2000 1000000
{
"result": "RPC client error: sendRequest failed: http status 200 OK unmarshaling response: EOF"
}
and in logs shows an ERROR although the transaction was successful:
2024-04-18T20:42:09.140-0400 INFO das das/worker.go:148 sampled header {"type": "recent", "height": 1639315, "hash": "3814D708A07D4E0D8C79E9746E890CA7BD6A47FE530AA4CEBD7413C5A4EC2B7D", "square width": 64, "data root": "E5614F3603EE4756988131DC4C70D88CFEC8248768AA3AB2AEAB29B4A60E3238", "finished (s)": 0.000005333}
2024-04-18T20:42:12.629-0400 INFO bitswap-server server/server.go:547 Bitswap Client ReceiveError: stream reset
2024-04-18T20:42:21.209-0400 INFO header/store store/store.go:375 new head {"height": 1639316, "hash": "71B6A851ECAA30DB380D5F9CF8994DE9CCB279AF669C212CF17E55A3EBED92CC"}
2024-04-18T20:42:21.210-0400 INFO das das/worker.go:148 sampled header {"type": "recent", "height": 1639316, "hash": "71B6A851ECAA30DB380D5F9CF8994DE9CCB279AF669C212CF17E55A3EBED92CC", "square width": 64, "data root": "8193BF804F997D0AC790259F9195B57C72B457FE4DE49EDAFDD870BE9612F7A0", "finished (s)": 0.000019167}
goroutine 24761 [running]:
runtime/debug.Stack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:16 +0x1c
github.com/cosmos/cosmos-sdk/codec/types.anyCompatError({0x102c073b7, 0xc}, {0x1040908c0, 0x14003d4db60})
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:24 +0x3c
github.com/cosmos/cosmos-sdk/codec/types.(*Any).MarshalJSON(0x1056f00f0?)
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:56 +0x5c
encoding/json.marshalerEncoder(0x140036d3cc0, {0x1040908c0?, 0x140035f8388?, 0x14004094690?}, {0x78?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:440 +0xc0
encoding/json.structEncoder.encode({{{0x140019d2908, 0xd, 0x10}, 0x14005aeb9e0, 0x14005aeba10}}, 0x140036d3cc0, {0x1040845a0?, 0x140035f8300?, 0x14000846d48?}, {0x0?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.ptrEncoder.encode({0x14000846e38?}, 0x140036d3cc0, {0x104015ea0?, 0x140035f8300?, 0x14000846e48?}, {0x20?, 0x39?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:876 +0x1ec
encoding/json.(*encodeState).reflectValue(0x140036d3cc0, {0x104015ea0?, 0x140035f8300?, 0x1012297c0?}, {0xe8?, 0x6e?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.interfaceEncoder(0x140036d3cc0, {0x103c413e0?, 0x14003c56010?, 0xda00000000000000?}, {0x4?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:658 +0xcc
encoding/json.structEncoder.encode({{{0x140013f8fc8, 0x4, 0x4}, 0x140042286c0, 0x14004228840}}, 0x140036d3cc0, {0x103ec4f80?, 0x14003c56000?, 0x14000847028?}, {0x30?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.(*encodeState).reflectValue(0x140036d3cc0, {0x103ec4f80?, 0x14003c56000?, 0x6?}, {0x48?, 0xd?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.(*encodeState).marshal(0x4?, {0x103ec4f80?, 0x14003c56000?}, {0x80?, 0xff?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:297 +0xc0
encoding/json.(*Encoder).Encode(0x14000847218, {0x103ec4f80, 0x14003c56000})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/stream.go:209 +0xa4
github.com/filecoin-project/go-jsonrpc.(*handler).handle.func1({0x1041007a0?, 0x1400504fde0?})
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:488 +0x84
github.com/filecoin-project/go-jsonrpc.withLazyWriter(0x1400617ef30, 0x14000847708)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:507 +0xd0
github.com/filecoin-project/go-jsonrpc.(*handler).handle(0x14003ce9590, {0x104127ff8, 0x14004d86f00}, {{0x14006514ed0, 0x3}, {0x103b98140, 0x14006514ed8}, {0x14006514ee0, 0xe}, {0x14005aec1e0, ...}, ...}, ...)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:487 +0x16d4
github.com/filecoin-project/go-jsonrpc.(*handler).handleReader(0x14003ce9590, {0x104127ff8, 0x14004d86f00}, {0x14d1c3c50, 0x14005b01a40}, {0x1040fdc20, 0x1400383a000}, 0x1040ef2b0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:268 +0x554
github.com/filecoin-project/go-jsonrpc.(*RPCServer).ServeHTTP(0x1400190a600, {0x104111160, 0x1400383a000}, 0x140036125a0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/server.go:104 +0x140
github.com/filecoin-project/go-jsonrpc/auth.(*Handler).ServeHTTP(0x14001568690, {0x104111160, 0x1400383a000}, 0x1400564e360)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/auth/handler.go:47 +0x378
net/http.serverHandler.ServeHTTP({0x10410aab8?}, {0x104111160?, 0x1400383a000?}, 0x6?)
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3137 +0xbc
net/http.(*conn).serve(0x14004f70000, {0x104127ff8, 0x1400142bce0})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2039 +0x508
created by net/http.(*Server).Serve in goroutine 4996
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x3f0
2024-04-18T20:42:24.010-0400 ERROR rpc [email protected]/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 104 48 56 100 108 97 50 106 103 50 53 50 57 110 54 118 106 100 55 112 120 115 100 51 103 108 97 53 100 118 104 112 116 107 118 101 53 51 18 47 99 101 108 101 115 116 105 97 49 101 53 48 48 108 48 110 108 119 113 106 55 120 53 118 115 113 99 120 113 100 56 114 110 115 53 107 104 118 102 119 48 115 107 103 117 54 48 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 31 10 9 18 4 10 2 8 1 24 151 5 18 18 10 12 10 4 117 116 105 97 18 4 50 48 48 48 16 192 132 61 26 64 229 74 212 101 128 129 83 34 15 198 98 219 160 223 112 171 14 51 30 114 245 160 51 100 108 246 37 6 225 70 104 199 62 191 139 119 80 254 139 1 179 221 196 133 58 118 113 13 87 137 18 1 89 213 110 20 196 145 45 148 232 240 214 45],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
2024-04-18T20:42:32.812-0400 INFO header/store store/store.go:375 new head {"height": 1639317, "hash": "B146D4C030B88E8AF4F5433EB1B0C96D38C5AE22D5BA8128C88FCAA9432BED96"}
trying again granting to a random account, shows the same error in CLI logs, although transaction is successful:
celestia state grant-fee celestia15y6vx794quv9y5y4na3x44s6xy7rkukl6wst0j 2000 1000000
{
"result": "RPC client error: sendRequest failed: http status 200 OK unmarshaling response: EOF"
}
and the same ERROR in the celestia-node logs:
goroutine 47225 [running]:
runtime/debug.Stack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:16 +0x1c
github.com/cosmos/cosmos-sdk/codec/types.anyCompatError({0x102c073b7, 0xc}, {0x1040908c0, 0x14008a32960})
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:24 +0x3c
github.com/cosmos/cosmos-sdk/codec/types.(*Any).MarshalJSON(0x1056f00f0?)
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:56 +0x5c
encoding/json.marshalerEncoder(0x14008e52480, {0x1040908c0?, 0x14007199f48?, 0x0?}, {0x2?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:440 +0xc0
encoding/json.structEncoder.encode({{{0x140019d2908, 0xd, 0x10}, 0x14005aeb9e0, 0x14005aeba10}}, 0x14008e52480, {0x1040845a0?, 0x14007199ec0?, 0x6?}, {0xc0?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.ptrEncoder.encode({0x14004c0ce38?}, 0x14008e52480, {0x104015ea0?, 0x14007199ec0?, 0x14004c0ce48?}, {0x20?, 0x39?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:876 +0x1ec
encoding/json.(*encodeState).reflectValue(0x14008e52480, {0x104015ea0?, 0x14007199ec0?, 0x1012297c0?}, {0xe8?, 0xce?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.interfaceEncoder(0x14008e52480, {0x103c413e0?, 0x14008e52450?, 0xda00000100fd7f34?}, {0x4?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:658 +0xcc
encoding/json.structEncoder.encode({{{0x140013f8fc8, 0x4, 0x4}, 0x140042286c0, 0x14004228840}}, 0x14008e52480, {0x103ec4f80?, 0x14008e52440?, 0x14004c0d078?}, {0xfc?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.(*encodeState).reflectValue(0x14008e52480, {0x103ec4f80?, 0x14008e52440?, 0x101226b68?}, {0x38?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.(*encodeState).marshal(0x4?, {0x103ec4f80?, 0x14008e52440?}, {0x80?, 0xbf?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:297 +0xc0
encoding/json.(*Encoder).Encode(0x14004c0d218, {0x103ec4f80, 0x14008e52440})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/stream.go:209 +0xa4
github.com/filecoin-project/go-jsonrpc.(*handler).handle.func1({0x1041007a0?, 0x1400750af60?})
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:488 +0x84
github.com/filecoin-project/go-jsonrpc.withLazyWriter(0x140019362d0, 0x14004c0d708)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:507 +0xd0
github.com/filecoin-project/go-jsonrpc.(*handler).handle(0x14003ce9590, {0x104127ff8, 0x14006847980}, {{0x14003910190, 0x3}, {0x103b98140, 0x14003910198}, {0x140039101a0, 0xe}, {0x14003999c20, ...}, ...}, ...)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:487 +0x16d4
github.com/filecoin-project/go-jsonrpc.(*handler).handleReader(0x14003ce9590, {0x104127ff8, 0x14006847980}, {0x14d1c3c50, 0x14005465600}, {0x1040fdc20, 0x1400399cc40}, 0x1040ef2b0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:268 +0x554
github.com/filecoin-project/go-jsonrpc.(*RPCServer).ServeHTTP(0x1400190a600, {0x104111160, 0x1400399cc40}, 0x14004bc4360)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/server.go:104 +0x140
github.com/filecoin-project/go-jsonrpc/auth.(*Handler).ServeHTTP(0x14001568690, {0x104111160, 0x1400399cc40}, 0x140013f7e60)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/auth/handler.go:47 +0x378
net/http.serverHandler.ServeHTTP({0x10410aab8?}, {0x104111160?, 0x1400399cc40?}, 0x6?)
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3137 +0xbc
net/http.(*conn).serve(0x14003c1b710, {0x104127ff8, 0x1400142bce0})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2039 +0x508
created by net/http.(*Server).Serve in goroutine 4996
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x3f0
2024-04-18T20:47:52.070-0400 ERROR rpc [email protected]/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 104 48 56 100 108 97 50 106 103 50 53 50 57 110 54 118 106 100 55 112 120 115 100 51 103 108 97 53 100 118 104 112 116 107 118 101 53 51 18 47 99 101 108 101 115 116 105 97 49 53 121 54 118 120 55 57 52 113 117 118 57 121 53 121 52 110 97 51 120 52 52 115 54 120 121 55 114 107 117 107 108 54 119 115 116 48 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 31 10 9 18 4 10 2 8 1 24 153 5 18 18 10 12 10 4 117 116 105 97 18 4 50 48 48 48 16 192 132 61 26 64 232 30 223 27 255 98 108 124 19 74 168 233 227 111 151 178 105 124 76 250 226 39 212 30 83 60 1 47 39 30 46 145 122 139 212 42 216 236 115 192 10 106 77 62 75 50 166 171 93 134 120 150 53 71 36 75 205 193 147 109 80 55 179 6],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
revoking the feegrant also shows an ERROR in the logs of celestia-node, although successful:
goroutine 56596 [running]:
runtime/debug.Stack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:16 +0x1c
github.com/cosmos/cosmos-sdk/codec/types.anyCompatError({0x102c073b7, 0xc}, {0x1040908c0, 0x1400761f620})
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:24 +0x3c
github.com/cosmos/cosmos-sdk/codec/types.(*Any).MarshalJSON(0x1056f00f0?)
/Users/joshstein/go/pkg/mod/github.com/celestiaorg/[email protected]/codec/types/compat.go:56 +0x5c
encoding/json.marshalerEncoder(0x140071a3bc0, {0x1040908c0?, 0x14004de2688?, 0x0?}, {0x2?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:440 +0xc0
encoding/json.structEncoder.encode({{{0x140019d2908, 0xd, 0x10}, 0x14005aeb9e0, 0x14005aeba10}}, 0x140071a3bc0, {0x1040845a0?, 0x14004de2600?, 0x5?}, {0x0?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.ptrEncoder.encode({0x140013dee38?}, 0x140071a3bc0, {0x104015ea0?, 0x14004de2600?, 0x140013dee48?}, {0x20?, 0x39?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:876 +0x1ec
encoding/json.(*encodeState).reflectValue(0x140071a3bc0, {0x104015ea0?, 0x14004de2600?, 0x1012297c0?}, {0xe8?, 0xee?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.interfaceEncoder(0x140071a3bc0, {0x103c413e0?, 0x140071a3b90?, 0xda00000100fd7f34?}, {0x4?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:658 +0xcc
encoding/json.structEncoder.encode({{{0x140013f8fc8, 0x4, 0x4}, 0x140042286c0, 0x14004228840}}, 0x140071a3bc0, {0x103ec4f80?, 0x140071a3b80?, 0x140013df078?}, {0xfc?, ...})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:704 +0x190
encoding/json.(*encodeState).reflectValue(0x140071a3bc0, {0x103ec4f80?, 0x140071a3b80?, 0x101226b68?}, {0x38?, 0x0?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:321 +0x70
encoding/json.(*encodeState).marshal(0x105876900?, {0x103ec4f80?, 0x140071a3b80?}, {0x80?, 0xdf?})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/encode.go:297 +0xc0
encoding/json.(*Encoder).Encode(0x140013df218, {0x103ec4f80, 0x140071a3b80})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/encoding/json/stream.go:209 +0xa4
github.com/filecoin-project/go-jsonrpc.(*handler).handle.func1({0x1041007a0?, 0x14007d9c760?})
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:488 +0x84
github.com/filecoin-project/go-jsonrpc.withLazyWriter(0x14005174708, 0x140013df708)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:507 +0xd0
github.com/filecoin-project/go-jsonrpc.(*handler).handle(0x14003ce9590, {0x104127ff8, 0x140015cf950}, {{0x14008cb2bf0, 0x3}, {0x103b98140, 0x14008cb2bf8}, {0x140088459f8, 0x14}, {0x140066b64b0, ...}, ...}, ...)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:487 +0x16d4
github.com/filecoin-project/go-jsonrpc.(*handler).handleReader(0x14003ce9590, {0x104127ff8, 0x140015cf950}, {0x14d1c3c50, 0x140044f9480}, {0x1040fdc20, 0x14002f942a0}, 0x1040ef2b0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/handler.go:268 +0x554
github.com/filecoin-project/go-jsonrpc.(*RPCServer).ServeHTTP(0x1400190a600, {0x104111160, 0x14002f942a0}, 0x14004ad47e0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/server.go:104 +0x140
github.com/filecoin-project/go-jsonrpc/auth.(*Handler).ServeHTTP(0x14001568690, {0x104111160, 0x14002f942a0}, 0x14004ad46c0)
/Users/joshstein/go/pkg/mod/github.com/filecoin-project/[email protected]/auth/handler.go:47 +0x378
net/http.serverHandler.ServeHTTP({0x10410aab8?}, {0x104111160?, 0x14002f942a0?}, 0x6?)
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3137 +0xbc
net/http.(*conn).serve(0x14007478090, {0x104127ff8, 0x1400142bce0})
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2039 +0x508
created by net/http.(*Server).Serve in goroutine 4996
/Users/joshstein/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x3f0
2024-04-18T20:52:04.122-0400 ERROR rpc [email protected]/handler.go:489 json: error calling MarshalJSON for type *types.Any: JSON marshal marshaling error for &Any{TypeUrl:/cosmos.tx.v1beta1.Tx,Value:[10 148 1 10 145 1 10 43 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 82 101 118 111 107 101 65 108 108 111 119 97 110 99 101 18 98 10 47 99 101 108 101 115 116 105 97 49 104 48 56 100 108 97 50 106 103 50 53 50 57 110 54 118 106 100 55 112 120 115 100 51 103 108 97 53 100 118 104 112 116 107 118 101 53 51 18 47 99 101 108 101 115 116 105 97 49 101 53 48 48 108 48 110 108 119 113 106 55 120 53 118 115 113 99 120 113 100 56 114 110 115 53 107 104 118 102 119 48 115 107 103 117 54 48 18 31 10 9 18 4 10 2 8 1 24 154 5 18 18 10 12 10 4 117 116 105 97 18 4 50 48 48 48 16 192 132 61 26 64 220 132 51 69 189 210 96 168 75 128 40 142 143 99 99 233 110 198 199 186 212 248 30 52 231 19 187 17 78 58 254 95 108 71 252 239 217 198 172 95 213 184 211 218 216 207 16 95 142 133 156 114 63 222 111 148 171 237 11 85 160 118 62 11],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
although this revoke-fee-grant transaction was also successful, the CLI does not appear to really tell the user this:
celestia state revoke-grant-fee $GRANTEE_ADDRESS 2000 1000000
{
"result": "RPC client error: sendRequest failed: http status 200 OK unmarshaling response: EOF"
}
the grantee whose grant has been revoked, however works as expected, no ERROR logs:
celestia blob submit 0x42690c204d39600fddd3 0x6665656772616e74
{
"result": "granter has revoked the grant"
}