Closed Phylante closed 10 months ago
Looks like the account encoding is defaulting to base58, which is bad. Hence why the response says "data":"error: data too large for bs58 encoding"
.
I'll fix the default in solana-py, but in the meantime you should be able to avoid this issue with await websocket.program_subscribe(program_id, encoding="base64")
It's been a while, but just tested this, and it does the trick. Thank you very much
Hello, I am reporting this while using solana-py==0.30.2 and solders==0.18.1 The reason I report this in solders and not solana-py is that the issue seem related directly to the JSON parsing, hence, solders.
I've taken the canonical example given on the documentation, and changed the
log_subscribe
call withprogram_subscribe
.Before any further investigation, you should check that the ID I provided is indeed supposed to be taken as a parameter for the
program_subscribe
method, as I am still a newbie with solana, and I may have taken it for a program address while it is not (but I believe it is, according to solscan).Here is a full working example to reproduce :
When running this, I get a stacktrace. In order to provide something that may help, I put a few print in
_process_rpc_response
, basically printing theraw
parameter The output of the program looks like that, stacktrace included :Running this code with the program ID "11111111111111111111111111111111" gives me some notifications, so I assume this is a bug with this particular message.
Thanks in advance for looking into this.