When the input contains more accounts than the user has requested to be deserialized, and one of the excess ones is a dup, the input pointer is not adjusted correctly.
Compare the lines added by this commit to line 401: "input += 7; // padding". Since the input data layout does not depend on the number of accounts the user wants to deserialize, this adjustment by 7 bytes must happen in both branches.
(cherry picked from commit e02b4e1192)
Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
* Fix spelling
* Add validator for SignerSources
* Add helper to generate Keypair from supporting SignerSources
* Add bip32 support to solana-keygen recover
* Make SignerSourceKind const strs, use for Debug impl and URI schemes
(cherry picked from commit b437b0a49d)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* sdk: Add get_instance_packed_len for variable-size types
* Add comment for get_packed_len
* Add more tests
(cherry picked from commit 4b60b2863e)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Rename ask to prompt
* Default to Solana bip44 base if no derivation-path
* Add SignerSource legacy field, support legacy ASK
* Update docs
* Fix docs: validator current doesn't support uri SignerSources
(cherry picked from commit a5ec3a0547)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
The readelf utility (already shipped with the solana tools) shows meta-information about ELF files, such as symbol tables. It is useful for investigating "unresolved symbol" errors that crop up at runtime.
This commit also fixes the objdump flags (two dashes are required and there is no "color" option) as well as a few typos.
(cherry picked from commit ff95e2aaa6)
Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
Some syscalls are wrongly declared "static" in solana_sdk.h, which makes clang++ assume they are local to the compilation unit. It therefore ignores the extern "C" {} block and mangles their names. While that doesn't break C++ compilation, the syscall fails at runtime with something along the lines of "ELF error: Unresolved symbol (_ZL26sol_create_program_addressPK13SolSignerSeediPK9SolPubkeyS4_)".
(cherry picked from commit 6927d0c77e)
Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
* Allow SetUpgradeAuthority instruction in CPI calls (#16676)
* feat: allow SetAuthority in CLI calls
* chore: clippy match_like_matches_macro
* chore: clippy match_like_matches_macro
* chore: rename CLI to CPI
* chore: move check for cpi authorised instruction to syscalls
* chore: add set_upgrade_authority cpi test
* chore: assert upgrade authority was changed
* feat: gate set_upgrade_authority via cpi with a feature
* chore: move feature to the end of the list
* chore: remove white spaces
* chore: remove white spaces
* chore: update comment to rerun build
(cherry picked from commit 1a658c7f31)
# Conflicts:
# programs/bpf/Cargo.toml
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* chore: fixe merge conflicts
Co-authored-by: Sebastian Bor <Sebastian_Bor@hotmail.com>
* Refactor SignerSource to expose DerivationPath to other kinds of signers (#16933)
* One use statement
* Add stdin uri scheme
* Convert parse_signer_source to return Result
* A-Z deps
* Convert Usb data to Locator
* Pull DerivationPath out of Locator
* Wrap SignerSource to share derivation_path
* Review comments
* Check Filepath existence, readability in parse_signer_source
(cherry picked from commit d6f30b7537)
# Conflicts:
# sdk/Cargo.toml
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* SDK: More conversions for `Pubkey`
(cherry picked from commit 9b7120bf73)
* SDK: More conversion for `DerivationPath`
(cherry picked from commit 722de942ca)
* remote-wallet: Add helpers for locating remote wallets
(cherry picked from commit 64fcb792c2)
* remote-wallet: Plumb `Locator` into `RemoteWalletInfo`
(cherry picked from commit 3d12be29ec)
* remote-wallet: `derivation-path` crate doesn't like empty trailing child indexes
(cherry picked from commit 4ce4f04c58)
* remote-wallet: Move `Locator` to its own module
(cherry picked from commit cac666d035)
Co-authored-by: Trent Nelson <trent@solana.com>
* Retain alloc'd and updated data in cpi (#16850)
(cherry picked from commit 9b3a59f030)
# Conflicts:
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
* Return sysvars via syscalls (#16422)
(cherry picked from commit fa83f3bd73)
* bad merge
* Fix branch diffs
* nudge
Co-authored-by: Jack May <jack@solana.com>
* docker: Expose all ports in Dockerfile, add back localnet.sh
* Add documentation for where to find containers
* Obliterate script
(cherry picked from commit 448d5be79f)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>