You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I encountered an overflow error when converting the result from JSON using the rpc.GetTokenAccountsByOwnerAsync method, specifically when the rentEpoch value exceeds ulong.MaxValue. This issue arises when processing rentEpoch values larger than what ulong can represent.
To Reproduce
Steps to reproduce the behavior:
Call the rpc.GetTokenAccountsByOwnerAsync method to retrieve information about token accounts associated with an owner.
Identify a scenario where the rentEpoch value in the returned JSON data exceeds ulong.MaxValue.
Observe an overflow error during the conversion of JSON to .NET objects when encountering large rentEpoch values.
Expected behavior
I expected the library to either handle rentEpoch values of any size properly or provide a clear error message indicating that the value exceeds the supported range. Ideally, measures such as using a different data type or implementing a validation mechanism should be taken to accommodate scenarios where rentEpoch could surpass ulong limits.
Describe the bug
I encountered an overflow error when converting the result from JSON using the
rpc.GetTokenAccountsByOwnerAsync
method, specifically when therentEpoch
value exceedsulong.MaxValue
. This issue arises when processingrentEpoch
values larger than whatulong
can represent.To Reproduce
Steps to reproduce the behavior:
rpc.GetTokenAccountsByOwnerAsync
method to retrieve information about token accounts associated with an owner.rentEpoch
value in the returned JSON data exceedsulong.MaxValue
.rentEpoch
values.Expected behavior
I expected the library to either handle
rentEpoch
values of any size properly or provide a clear error message indicating that the value exceeds the supported range. Ideally, measures such as using a different data type or implementing a validation mechanism should be taken to accommodate scenarios whererentEpoch
could surpassulong
limits.Additional context
Error json excerpt
{"id":1,"jsonrpc":"2.0","result":{"context":{"apiVersion":"1.17.18","slot":246405854},"value":[{"account":{"data":{"parsed":{"info":{"isNative":false,"mint":"4wjPQJ6PrkC4dHhYghwJzGBVP78DkBzA2U3kHoFNBuhj","owner":"xxxxxxxxxxxxxxxxxx","state":"initialized","tokenAmount":{"amount":"100754","decimals":6,"uiAmount":0.100754,"uiAmountString":"0.100754"}},"type":"account"},"program":"spl-token","space":165},"executable":false,"lamports":2039280,"owner":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","rentEpoch":18446744073709552000,"space":165},"pubkey":"RVM2fCzme8o13BcyuZ2Ja1U7e6bHkf43Fze3iQNgJ1e"}....
Note: This issue report was created with the assistance of ChatGPT.
The text was updated successfully, but these errors were encountered: