Open
Description
Overview
The getProgramAccounts() method call throws and error when used on the Stake program:
Error: Cannot create a string longer than 0x1fffffe8 characters
Steps to reproduce
const STAKE_PROGRAM_ID = "Stake11111111111111111111111111111111111111";
let rpcClient = createSolanaRpc(config.get_program_accounts_rpc_endpoint);
let data = await rpcClient.getProgramAccounts(STAKE_PROGRAM_ID, {encoding: "base64"}).send();
Edit: I use node --version v22.11.0
Description of bug
The core issue is a node internal limit on string size. I used libraries like stream-json to workaround this. Since getProgramAccounts is expected to sometimes return heavy data i consider it a bug that this library isn't handling heavy data coming from this call.