Closed Fedor-sa closed 3 years ago
Thanks! I went with your option 1
Fix will be in v1.7.7
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.
Problem
Hi, It looks like getProgramAccount method does not consider account data size when using base58. Example: Setup http://api.mainnet-beta.solana.com "feature-set": 4293946943, "solana-core": "1.6.18" Successful case: Request
{ "method": "getProgramAccounts", "jsonrpc": "2.0", "params": [ "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", { "commitment": "confirmed", "filters": [ { "dataSize": 388 } ], "encoding": "base64" } ], "id": "e54a4d56-f617-4e65-9f6e-5cced4bbd416" }
Public keyDktgxiwBtA6oPQqzFH9uqMVZF7CQAnk7FnrSdD4VVA9g
decoded data length is 388 which is greater than maximum allowed for base58 usage, therefore the samegetProgramAccount
request with base58 encoding should fail, but Error case Request{ "method": "getProgramAccounts", "jsonrpc": "2.0", "params": [ "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", { "commitment": "confirmed", "filters": [ { "dataSize": 388 } ], "encoding": "base58" } ], "id": "e54a4d56-f617-4e65-9f6e-5cced4bbd416" }
Response
{ "account": { "data": [ "GmH4gu6PYUUKDZqX8Ap8ENgBULRJo6WcHmTvhsXgVp8HbQHTHFxwhaPoZy9vVgRCtUYdAyWVXX2QMxzydAN1FXMo88ddVmYciePtsjPnYcGM8invWoK7MzSgWTUAoJ7mhnZZXYHwtQZsrCLDwAPnvpbDq9tqeGdVT8PgW6ARkwWJZ2vPJ9FECnyTfNMs5HeminKXL2ySZFFfWiQezLDGn9aPzrjkcZ6h5Qn5vBgzXuNYVrHUs6bwo9U165Aqz71puEhhTDmuuZFpFr5fCsPnTH2xLnYD3ZhjwLtBhhBb8eBqQwTX5K3kjVjWvFnNBoYzHdpTXDc35N8vCiB3dGJXSwvoBQtVoAWbt4mCvC4YTdyLfNqbg61PmyuXsqDsJ1TdRR4WFbzqba9YJNLxJ1aqQZHAwCxjiTSwzYr2eq9xBb4aAp8M7Chn5dxh7L8QQQ9PV4pYdXUa3BuQk959DUNidBB7LUyzbFnrp7Bq92mbRWNvfc2sYi1xMYNpa6eTXYyHoSL7Hx1JdfdsTmtXfU", "base58" ], "executable": false, "lamports": 3591360, "owner": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", "rentEpoch": 203 }, "pubkey": "DktgxiwBtA6oPQqzFH9uqMVZF7CQAnk7FnrSdD4VVA9g" }
Proposed Solution
According to documentation
I would propose