solana-web3.js
solana-web3.js copied to clipboard
Make PublicKey.createWithSeed (js) same as create_with_seed in runtime to avoid confusion
SystemProgram CreateAccountWithSeed instruction was failing sometimes, because seed too long.
Here ./sdk/src/pubkey.rs which is used here ./runtime/src/system_instruction_processor.rs
Javascript func doesn't care about seed length https://solana-labs.github.io/solana-web3.js/file/src/publickey.js.html#lineNumber82
So you think it's good, but then the runtime does nothing (nothing reported in logs either)
Suggest: make js function same as runtime, with error if seed too long.
I would like to work on this Unless someone is already working on this?
As per @steveluscher's comments on the linked PR #1286 I think this is going to have to get solved in the new API, which will be laced into the existing API under the hood, effectively solving this problem upon incremental release.
It's possible we can either close this and create a new issue for the new API
Ah I had been a little confused since it seemed to link to another issue. But thanks for answering!
Is there any other issues that I can try my hands on? 👀
Is there any other issues that I can try my hands on? 👀
There should be a few in the issues that are geared towards the new API you might want to take a stab at!
Check out the somewhat recent ones
Is there any other issues that I can try my hands on? 👀
There should be a few in the issues that are geared towards the new API you might want to take a stab at!
Check out the somewhat recent ones
Ahhh thanks! I will have a look
This is now createAddressWithSeed() in @solana/web3.js 2.0, and seed length is enforced there.
https://github.com/solana-labs/solana-web3.js/blob/e90ed593754c4bb1a18f2c57c716746a3403f498/packages/addresses/src/program-derived-address.ts#L151-L157
Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.