858 Commits

Author SHA1 Message Date
Sebastian Bor
3a4176aa3e
feat: remove set_upgrade_authority_via_cpi_enabled feature (#17933) 2021-06-22 10:05:33 +01:00
Tyera Eulberg
0ab361b828
Use newly stabilized Duration methods/consts (#18101) 2021-06-22 00:11:16 +00:00
Tyera Eulberg
19fe1dd463
Move stake_weighted_timestamp module (#18114)
* Move timestamp module into runtime

* Less public

* Remove unused enum
2021-06-21 16:14:54 -06:00
Alexander Meißner
6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Dmitri Makarov
361c1bdd57
Fix file permissions (#17910) 2021-06-12 02:03:32 +00:00
Trent Nelson
e0d679b319 programs/config: Disallow duplicate signers 2021-06-09 23:09:09 -06:00
Arthur Greef
28fdfed1ba
Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
Jon Cinque
8f5e773caf
system-program: Remove zero lamport check on transfers (#17726)
* system-program: Move lamports == 0 check on transfers

* Address feedback

* Update stake split to explicitly allocate + assign

* Update stake tests referring to split instruction

* Revert whitespace

* Update split instruction index in test

* Remove unnecessary `assign_with_seed` from `split_with_seed`

* Fix stake instruction parser

* Update test to allow splitting into account with lamports
2021-06-06 01:45:45 +02:00
dependabot[bot]
7bb5f24274
chore: bump libsecp256k1 from 0.3.5 to 0.5.0 (#17734)
* chore: bump libsecp256k1 from 0.3.5 to 0.5.0

Bumps [libsecp256k1](https://github.com/paritytech/libsecp256k1) from 0.3.5 to 0.5.0.
- [Release notes](https://github.com/paritytech/libsecp256k1/releases)
- [Changelog](https://github.com/paritytech/libsecp256k1/blob/master/CHANGELOG.md)
- [Commits](https://github.com/paritytech/libsecp256k1/commits)

---
updated-dependencies:
- dependency-name: libsecp256k1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Update crate name

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-04 13:09:35 -06:00
Tyera Eulberg
3a647c4bea
Rename ValidatorExit and move to sdk (#17728) 2021-06-04 03:06:13 +00:00
Jack May
83b9a046d1
Add missing ProgramError to InstructionError mappings (#16231)
* Add missing ProgramError to InstructionError mappings

* add note

* Clarify process of adding new program error
2021-06-03 21:59:04 +00:00
Jack May
80e5b24b38
Fix CPI recursion depth (#17659)
* Fix CPI recursion depth
2021-06-02 11:15:19 +02:00
Jack May
2b50529265
Add memory operation syscalls (#16447) 2021-06-01 15:33:17 -07:00
Jack May
a3240aebde
Always bail if program modifies a ro account (#17569) 2021-05-28 09:50:25 -07:00
sakridge
a8dca3976b
Refactor genesis download/load/check functions (#17276)
* Refactor genesis ingest functions

* Consolidate genesis.bin/genesis.tar.bz2 references
2021-05-24 16:45:36 +02:00
Michael Vines
2c99b23ad7 Add get_sysvar() helper to sdk 2021-05-21 01:30:12 +00:00
Michael Vines
a1a0d6f84b Add stake_program_v4 feature 2021-05-20 21:15:18 +00:00
Tao Zhu
0781fe1b4f
Upgrade Rust to 1.52.0 (#17096)
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script

* upgrade to Rust 1.52.1

* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
Tyera Eulberg
b437b0a49d
Add bip32 support to solana-keygen recover (#17180)
* 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
2021-05-12 19:33:11 +00:00
Trent Nelson
dbac38702a sdk: keypair - drop superfluous iter() 2021-05-11 13:07:58 -06:00
Trent Nelson
967840aed6 sdk: Move signers module into signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
b71e4bdc61 sdk: Move NullSigner to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
12bf6c06c3 sdk: Move Presigner to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
0eba6eb401 sdk: Move Keypair to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
af6f3d776e sdk: Move Signer trait to own module 2021-05-11 13:07:58 -06:00
Tyera Eulberg
a5ec3a0547
SignerSource: rename input scheme to prompt, default to bip44 solana base key (#17154)
* 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
2021-05-10 19:28:47 -06:00
Jack May
8eb05d6ed4
Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Ruud van Asseldonk
9abfa65920
Document that Transaction::sign might panic (#17026) 2021-05-04 08:32:21 -07:00
Tyera Eulberg
694c674aa6
Implement Bip32 for seed-phrase/passphrase signing (#16942)
* Add Keypair helpers for bip32 derivation

* Plumb bip32 for SignerSourceKind::Ask

* Support full-path querystring

* Use as_ref

* Add public wrappers for from_uri cases

* Support master root derivations (and fix too-deep print

* Add ask:// HD documentation

* Update ASK elsewhere in docs
2021-05-03 19:58:56 -06:00
Jeff Washington (jwash)
92b8b20ca5
AccountSharedData.lamports private (#16985) 2021-05-03 17:25:31 +00:00
Jeff Washington (jwash)
ac87bc40ca
tests: .lamports -> .lamports() (#16976) 2021-04-30 18:16:58 +00:00
Jeff Washington (jwash)
3f982fcf65
account.rent_epoch private (#16974) 2021-04-30 12:16:44 -05:00
Tyera Eulberg
d6f30b7537
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
2021-04-29 01:42:21 -06:00
Jeff Washington (jwash)
f533d3be77
Write account path impl ReadableAccount (#16779) 2021-04-28 15:29:22 -05:00
Jeff Washington (jwash)
9218b51de7
accountshareddata.executable is private (#16882) 2021-04-28 12:01:31 -05:00
Jeff Washington (jwash)
da3342759b
private AccountSharedData.rent_epoch (#16877) 2021-04-28 08:52:20 -05:00
Trent Nelson
4ce4f04c58 remote-wallet: derivation-path crate doesn't like empty trailing child indexes 2021-04-27 17:54:02 -06:00
Trent Nelson
722de942ca SDK: More conversion for DerivationPath 2021-04-27 17:54:02 -06:00
Jack May
9b3a59f030
Retain alloc'd and updated data in cpi (#16850) 2021-04-27 13:36:42 -07:00
Jeff Washington (jwash)
998cba74b5
AccountSharedData.executable() (#16835) 2021-04-27 09:12:17 -05:00
Jeff Washington (jwash)
603872685d
private AccountSharedData.owner (#16760)
* private AccountSharedData.owner

* fix perf test
2021-04-26 14:59:17 -05:00
behzad nouri
9706512115
removes old runtime feature gates in gossip and turbine (#16633) 2021-04-26 17:12:02 +00:00
Jeff Washington (jwash)
f2ab0384e4
owner -> owner() (#16783) 2021-04-26 17:06:40 +00:00
Jeff Washington (jwash)
1a4a7059af
owner -> owner() (#16785) 2021-04-23 15:59:13 -05:00
Jeff Washington (jwash)
48c07d32f0
WritableAccount.add/subtract_lamports (#16750)
* add/sub lamports

* make add/sub return Result

* sample replacements

* cleanup

* fix up a few tests as examples

* move enum, cleanup, impl from

* fmt

* cleanup

* add lamports.rs
2021-04-23 20:20:48 +00:00
Jeff Washington (jwash)
87e2e07d34
AccountSharedData.copy_into_owner_from_slice (#16755) 2021-04-23 09:34:08 -05:00
Jeff Washington (jwash)
fc12841d95
Readonlyaccounts (#16743)
* lamports -> lamports()

* format
2021-04-22 20:04:55 +00:00
Jeff Washington (jwash)
8a6b80095e
Set lamports (#16747)
* lamports = -> set_lamports()

* .lamports = X -> .set_lamports(X)
2021-04-22 13:53:06 -05:00
Jack May
be4df39a4c
Remove unactivated ristretto syscall (#16727) 2021-04-22 09:29:42 -07:00
Michael Vines
b8b54567b1 Clean up "APR" language around inflation rewards 2021-04-21 19:02:03 -07:00