solana-web3.js icon indicating copy to clipboard operation
solana-web3.js copied to clipboard

Make PublicKey.createWithSeed (js) same as create_with_seed in runtime to avoid confusion

Open mcf-rocks opened this issue 4 years ago • 6 comments

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.

mcf-rocks avatar Nov 11 '20 14:11 mcf-rocks