Jack May
ef17cf3bdb
Cleanup loader features ( #18977 )
2021-07-29 15:03:00 -07:00
Jack May
dfbb0c559b
deprecate fees sysvar ( #18960 )
2021-07-29 10:48:14 -07:00
dependabot[bot]
0cf52e2060
chore: bump serde_json from 1.0.64 to 1.0.65 ( #18968 )
...
* chore: bump serde_json from 1.0.64 to 1.0.65
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.64 to 1.0.65.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.64...v1.0.65 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-07-29 16:52:02 +00:00
Jack May
9529284194
Nonce gets blockhash from invoke_context ( #18950 )
2021-07-29 01:50:20 -07:00
sakridge
84e78316b1
Write helper for multithread update ( #18808 )
2021-07-29 03:16:36 +02:00
Jack May
0167daa116
cleanup feature consistent_recent_blockhashes_sysvar ( #18932 )
2021-07-28 10:25:33 -07:00
dependabot[bot]
14f0ce850d
chore: bump blake3 from 0.3.8 to 1.0.0 ( #18908 )
...
* chore: bump blake3 from 0.3.8 to 1.0.0
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3 ) from 0.3.8 to 1.0.0.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases )
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/0.3.8...1.0.0 )
---
updated-dependencies:
- dependency-name: blake3
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Make versions consistent
* Enable new feature
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-27 17:55:21 -06:00
Jack May
72e374d0f3
Deprecate SysvarRecentBlockhashes ( #18875 )
2021-07-27 16:34:21 -07:00
niedhui
dc6ec02021
Fix link typo in program README ( #18916 )
...
Signed-off-by: niedhui <niedhui@gmail.com>
2021-07-27 08:54:37 -05:00
Jack May
eaeeffa5a3
Add macros for deprecacted ids ( #18907 )
2021-07-26 20:54:46 -07:00
Brian Anderson
846787e7f4
Autolink URL in docs for sdk::feature_set ( #18874 )
2021-07-23 18:48:37 +00:00
Jack May
7fc4cfebc8
Rename BpfComputeBudget ( #18768 )
2021-07-22 10:18:51 -07:00
Jon Cinque
51f3b9aa7c
feature: add new token program feature ( #18780 )
...
* feature: add new token program feature
* Fixup test
* Update to spl-token v3.2.0
* Update Cargo.lock + fmt
* Update token program version in fetch-spl.sh
* Bump associated token program to 1.0.3
* Add aToken so
2021-07-21 14:34:25 +02:00
dependabot[bot]
395ee4ec68
chore: bump libsecp256k1 from 0.5.0 to 0.6.0 ( #18774 )
...
* chore: bump libsecp256k1 from 0.5.0 to 0.6.0
Bumps [libsecp256k1](https://github.com/paritytech/libsecp256k1 ) from 0.5.0 to 0.6.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>
* Update all versions, lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-20 13:14:47 -06:00
Justin Starry
207c90bd8b
Shorten long SerializeWith type paths in abi digest ( #18734 )
2021-07-20 08:59:50 -05:00
steviez
b9dc85a934
Add comments on how to add a new feature switch ( #18686 )
2021-07-18 12:48:09 -05:00
Jack May
5f9f3724d0
Remove unused compute budget item ( #18706 )
2021-07-16 09:12:17 +00:00
Jack May
6cf3c1ab8f
tx wide compute budget ( #18631 )
2021-07-16 00:31:22 -07:00
Justin Starry
d166b9856a
Move transaction sanitization earlier in the pipeline ( #18655 )
...
* Move transaction sanitization earlier in the pipeline
* Renamed HashedTransaction to SanitizedTransaction
* Implement deref for sanitized transaction
* bring back process_transactions test method
* Use sanitized transactions for cost model calculation
2021-07-15 22:51:27 -05:00
Brian Anderson
37ee0b5599
Eliminate doc warnings and fix some markdown ( #18566 )
...
* Fix link target in doc comment
* Fix formatting of log examples in process_instruction
* Fix doc markdown in solana-gossip
* Fix doc markdown in solana-runtime
* Escape square braces in doc comments to avoid warnings
* Surround 'account references' doc items in code spans to avoid warnings
* Fix code block in loader_upgradeable_instruction
* Fix doctest for loader_upgradable_instruction
2021-07-16 00:40:07 +00:00
Trent Nelson
abe5a0a349
gate libsecp256k1 upgrade to v0.5.0
2021-07-15 18:43:55 +00:00
Trent Nelson
3a85b77bb5
hijack secp256k1 enablement feature plumbing for libsecp256k1 upgrade
2021-07-15 18:43:55 +00:00
Trent Nelson
568660b402
Revert "Remove feature switch for secp256k1 program ( #18467 )"
...
This reverts commit fd574dcb3b
.
2021-07-15 18:43:55 +00:00
dependabot[bot]
21868439d5
chore: bump borsh from 0.9.0 to 0.9.1 ( #18664 )
...
* chore: bump borsh from 0.9.0 to 0.9.1
Bumps [borsh](https://github.com/near/borsh-rs ) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/near/borsh-rs/releases )
- [Changelog](https://github.com/near/borsh-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/near/borsh-rs/compare/v0.9.0...v0.9.1 )
---
updated-dependencies:
- dependency-name: borsh
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Bump other borsh deps
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-07-14 22:31:12 -06:00
Dmitri Makarov
d117be6792
Reword help of generate-child-script-on-failure cargo bpf tools option ( #18685 )
2021-07-15 03:31:33 +00:00
Dmitri Makarov
6f72f8b1fc
Generate a script to rerun the failed sub-command in cargo-test-bpf ( #18582 )
...
* Generate a script to rerun the failed sub-command in cargo-test-bpf
* Generate a script to rerun the failed sub-command in cargo-build-bpf
* Add cargo-build-bpf test for generate-child-script-on-failure option
2021-07-15 01:02:42 +00:00
sakridge
7f2254225e
Move entry/poh to own crate to speed up poh bench build ( #18225 )
2021-07-14 14:16:29 +02:00
Kirill Fomichev
5cea25ac3e
Add method `id` to SysbarId trait ( #18604 )
2021-07-13 16:01:32 +00:00
Justin Starry
e806d31224
Optimize Message::is_non_loader_key method ( #18579 )
2021-07-12 10:42:22 -05:00
Dmitri Makarov
cf9a4575ae
Prevent duplication of RUSTFLAGS settings in cargo-build-bpf subprocesses ( #18576 )
2021-07-11 01:24:26 +00:00
dependabot[bot]
31443c5c61
chore: bump cargo_metadata from 0.13.1 to 0.14.0 ( #18544 )
...
Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata ) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases )
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/v0.13.1...v0.14.0 )
---
updated-dependencies:
- dependency-name: cargo_metadata
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-09 16:28:24 +00:00
Ryo Onodera
f96de208e2
Implement MockInvokeContext::is_feature_active properly
2021-07-09 09:08:38 -07:00
Ryo Onodera
f029af0fca
Remove sysvar special cases for rent and assign
2021-07-09 09:08:38 -07:00
Justin Starry
fd574dcb3b
Remove feature switch for secp256k1 program ( #18467 )
...
* Remove feature switch for secp256k1 program
* fix tests
2021-07-09 10:08:03 -05:00
Michael Vines
f6371cce17
Comment cleanup
2021-07-08 21:35:58 -07:00
Jack May
2867584985
Bump compute budget for neon evm ( #17700 )
2021-07-08 10:43:34 -07:00
Jack May
ccdf93e2b8
featurize_policy_update ( #18492 )
2021-07-07 13:19:17 -07:00
s-medvedev
1f288ce527
Add ecrecover syscall ( #17720 )
...
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00
jbiseda
a86ced0bac
generate deterministic seeds for shreds ( #17950 )
...
* generate shred seed from leader pubkey
* clippy
* clippy
* review
* review 2
* fmt
* review
* check
* review
* cleanup
* fmt
2021-07-07 08:21:12 -07:00
Justin Starry
72da25e9d2
Refactor verify_and_update write privileges check ( #18468 )
2021-07-07 09:14:00 -05:00
Dmitri Makarov
e752299ac5
Bump bpf-tools version
...
Update Rust BPF to version 1.53
2021-07-07 05:08:40 -07:00
Michael Vines
ee219ffa47
Add vote/stake checked instructions
2021-07-06 21:53:18 +00:00
Justin Starry
100fabf469
Remove feature switch for demoting sysvar write locks ( #18373 )
2021-07-06 21:22:22 +00:00
Michael Vines
e7b36c8484
borsh: add bool type
2021-07-05 13:14:18 -07:00
Alexander Meißner
7462c27d07
Refactoring: Unify account_deps and accounts ( #17898 )
...
* Changes ThisInvokeContext::get_account() to use accounts instead of pre_accounts.
* Adds explicit keys to accounts to make them symmetric to account_deps.
* Appends account_deps to accounts in transaction loading and removes account_deps everywhere else.
2021-07-05 13:49:37 +02:00
Trent Nelson
2af5ec4f57
sdk: add `is_interactive()` method `Signer` trait
2021-07-03 07:33:59 +00:00
Trent Nelson
216983c50e
SDK: Add test for illegal `Pubkey::create_with_seed` owners
2021-07-02 23:37:15 +00:00
dependabot[bot]
4faa93418f
chore: bump memmap2 from 0.2.3 to 0.3.0 ( #18387 )
...
* chore: bump memmap2 from 0.2.3 to 0.3.0
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs ) from 0.2.3 to 0.3.0.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases )
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.3...v.0.3.0 )
---
updated-dependencies:
- dependency-name: memmap2
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-07-02 22:44:05 +00:00
Ruud van Asseldonk
94ab0eb49f
Document order of recent blockhashes sysvar
...
I wanted to use this sysvar to get a recent block hash, but I didn't
know whether the first or the last entry contains the most recent block
hash.
By calling it for mainnet, printing the results, and comparing that to
the recent blocks on solanabeach.io/blocks, I discovered that the
entries are ordered from most recent to least recent. Document this to
save future readers the trouble.
2021-07-01 22:22:52 -07:00
Dmitri Makarov
25ac664106
Add a command to install rustfilt for a cargo-build-bpf test
2021-07-01 21:09:16 -07:00
dependabot[bot]
0426c2d28e
chore: bump bzip2 from 0.3.3 to 0.4.3 ( #18361 )
...
* chore: bump bzip2 from 0.3.3 to 0.4.3
Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs ) from 0.3.3 to 0.4.3.
- [Release notes](https://github.com/alexcrichton/bzip2-rs/releases )
- [Commits](https://github.com/alexcrichton/bzip2-rs/commits )
---
updated-dependencies:
- dependency-name: bzip2
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 to new api
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-07-01 13:10:52 -06:00
Justin Starry
d5961e9d9f
Reject transactions with extra signatures ( #18306 )
...
* Reject transactions with extra signatures
* fix tests
* fix check
* fix check
* tx method
* fix checks
2021-07-01 18:06:59 +00:00
dependabot[bot]
644632fc8a
chore: bump assert_matches from 1.3.0 to 1.5.0 ( #18358 )
...
* chore: bump assert_matches from 1.3.0 to 1.5.0
Bumps [assert_matches](https://github.com/murarth/assert_matches ) from 1.3.0 to 1.5.0.
- [Release notes](https://github.com/murarth/assert_matches/releases )
- [Commits](https://github.com/murarth/assert_matches/commits )
---
updated-dependencies:
- dependency-name: assert_matches
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-07-01 09:59:01 -06:00
Justin Starry
5ca975383c
Remove feature switch for using message hash for already processed check ( #18340 )
2021-07-01 09:33:55 -05:00
Dmitri Makarov
cf25729eaa
Add cargo-build-bpf integration tests
2021-07-01 06:47:25 -07:00
Trent Nelson
d3a7e22112
sdk: refactor pda generation
2021-06-30 19:01:51 -06:00
dependabot[bot]
78968d132f
chore: bump log from 0.4.11 to 0.4.14 ( #18323 )
...
* chore: bump log from 0.4.11 to 0.4.14
Bumps [log](https://github.com/rust-lang/log ) from 0.4.11 to 0.4.14.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.14 )
---
updated-dependencies:
- dependency-name: log
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Make version consistent
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-30 18:32:01 +00:00
Jon Cinque
bb18ec8893
sdk: Add test to trigger KeypairPubkeyMismatch ( #18326 )
2021-06-30 20:27:13 +02:00
Trent Nelson
02b14caa5f
test-validator: hold rent constant with `--slots-per-epoch`
2021-06-30 00:46:12 -06:00
dependabot[bot]
52fd10ce03
chore: bump byteorder from 1.3.4 to 1.4.3 ( #18300 )
...
* chore: bump byteorder from 1.3.4 to 1.4.3
Bumps [byteorder](https://github.com/BurntSushi/byteorder ) from 1.3.4 to 1.4.3.
- [Release notes](https://github.com/BurntSushi/byteorder/releases )
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.4...1.4.3 )
---
updated-dependencies:
- dependency-name: byteorder
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
* Bump expected instruction count
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-29 15:08:04 -06:00
dependabot[bot]
3b2e34a336
chore: bump curve25519-dalek from 3.0.0 to 3.1.0 ( #18297 )
...
* chore: bump curve25519-dalek from 3.0.0 to 3.1.0
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases )
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md )
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/3.0.0...3.1.0 )
---
updated-dependencies:
- dependency-name: curve25519-dalek
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-29 10:53:34 -06:00
dependabot[bot]
7782a0855d
chore: bump rand_core from 0.6.2 to 0.6.3 ( #18263 )
...
* chore: bump rand_core from 0.6.2 to 0.6.3
Bumps [rand_core](https://github.com/rust-random/rand ) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/rust-random/rand/releases )
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.6.2...rand_core-0.6.3 )
---
updated-dependencies:
- dependency-name: rand_core
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-28 12:07:27 -06:00
Dmitri Makarov
e98a7504f2
Bump bpf-tools version to 1.12
2021-06-25 18:00:44 -07:00
dependabot[bot]
353bf6253b
chore: bump curve25519-dalek from 2.1.0 to 3.0.0 ( #18188 )
...
* chore: bump curve25519-dalek from 2.1.0 to 3.0.0
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases )
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md )
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/2.1.0...3.0.0 )
---
updated-dependencies:
- dependency-name: curve25519-dalek
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Make version consistent
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-24 22:32:32 -06:00
Trent Nelson
7ee39fcb0f
sdk: ensure `ld` can find criterion when running BPF tests
2021-06-24 22:14:54 -06:00
Jack May
94905dae52
Add sdk and program READMEs ( #18154 )
2021-06-23 21:22:35 +00:00
hrls
755b7c7aee
chore(pubkey): remove dead code
2021-06-22 19:43:15 -06:00
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
dependabot[bot]
d458fac2ff
chore: bump bincode from 1.3.1 to 1.3.3 ( #18087 )
...
* chore: bump bincode from 1.3.1 to 1.3.3
Bumps [bincode](https://github.com/servo/bincode ) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/servo/bincode/releases )
- [Commits](https://github.com/servo/bincode/compare/v1.3.1...v1.3.3 )
---
updated-dependencies:
- dependency-name: bincode
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-21 16:06:31 +00:00
Dmitri Makarov
d6bad60c1b
Bump bpf-tools version to 1.11 ( #18079 )
...
Avoid including local paths in compiler generated ELF files
2021-06-19 01:00:59 +00:00
Jack May
d18e02ef44
fix loader instruction checker ( #18047 )
2021-06-18 11:37:39 -07:00
Alexander Meißner
789f33e8db
chore: cargo fmt
2021-06-18 10:42:46 -07:00
Alexander Meißner
6514096a67
chore: cargo +nightly clippy --fix -Z unstable-options
2021-06-18 10:42:46 -07:00
Dmitri Makarov
3570b00560
Make cargo-build-bpf pass additional options to cargo build command
...
Users need to be able to pass additional command line options such as
-p that are not supported by 'cargo build-bpf' but are meaningful for
the 'cargo build' command. This change allows cargo-build-bpf to pass
all command line options specified after '--' option to 'cargo build'.
2021-06-18 10:20:35 -07:00
dependabot[bot]
d99b8f10d0
chore: bump cargo_metadata from 0.12.0 to 0.13.1 ( #17999 )
...
* chore: bump cargo_metadata from 0.12.0 to 0.13.1
Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata ) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases )
- [Commits](https://github.com/oli-obk/cargo_metadata/commits )
---
updated-dependencies:
- dependency-name: cargo_metadata
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Accommodate type change
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-16 17:50:22 +00:00
Jon Cinque
1b1d34da59
Refactor stake program into solana_program ( #17906 )
...
* Move stake state / instructions into solana_program
* Update account-decoder
* Update cli and runtime
* Update all other parts
* Commit Cargo.lock changes in programs/bpf
* Update cli stake instruction import
* Allow integer arithmetic
* Update ABI digest
* Bump rust mem instruction count
* Remove useless structs
* Move stake::id() -> stake::program::id()
* Re-export from solana_sdk and mark deprecated
* Address feedback
* Run cargo fmt
2021-06-15 18:04:00 +02:00
carllin
ccc013e134
Handle removing slots during account scans ( #17471 )
2021-06-14 21:04:01 -07:00
dependabot[bot]
a0872232d3
chore: bump itertools from 0.9.0 to 0.10.1 ( #17929 )
...
* chore: bump itertools from 0.9.0 to 0.10.1
Bumps [itertools](https://github.com/rust-itertools/itertools ) from 0.9.0 to 0.10.1.
- [Release notes](https://github.com/rust-itertools/itertools/releases )
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.9.0...v0.10.1 )
---
updated-dependencies:
- dependency-name: itertools
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix versions
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-14 18:32:20 +00:00
Dmitri Makarov
32742df1b4
Add build script to extract a list of registered syscalls
...
The list is used in cargo-build-bpf to check generated .so modules for
undefined symbols that are not known run-time syscalls.
2021-06-14 04:51:30 -07:00
Dmitri Makarov
361c1bdd57
Fix file permissions ( #17910 )
2021-06-12 02:03:32 +00:00
Dmitri Makarov
3026954d71
Update RUSTFLAGS if it is set, instead of overriding in build-bpf
2021-06-11 13:19:43 -07:00
dependabot[bot]
2e75023840
chore: bump regex from 1.4.5 to 1.5.4 ( #17885 )
...
* chore: bump regex from 1.4.5 to 1.5.4
Bumps [regex](https://github.com/rust-lang/regex ) from 1.4.5 to 1.5.4.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.4.5...1.5.4 )
---
updated-dependencies:
- dependency-name: regex
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-11 09:50:54 -06:00
Dmitri Makarov
c684e2bdc0
Check for undefined symbols in .so and warn about run-time errors ( #17850 )
2021-06-10 22:23:09 +00:00
Jack May
fa6bdd2d12
Warn about InstructionError meta ( #17864 )
2021-06-10 15:13:56 -07:00
Trent Nelson
e0d679b319
programs/config: Disallow duplicate signers
2021-06-09 23:09:09 -06:00
Dmitri Makarov
2fe211c5e0
Remove O2 option for compiling BPF programs ( #17865 )
...
rustc default compiler optimization level is O3. This change removes
the option that overrides the default optimization level, because it
is safe to do so. The code generation is incorrect in some cases
because of link-time optimizations, which remain disabled for
compiling BPF programs. In addition, this commit updates the expected
instruction counts for assert_instruction_count test.
2021-06-10 05:04:17 +00:00
dependabot[bot]
9a2ca8dd2f
chore: bump rustc_version from 0.2.3 to 0.4.0 ( #17854 )
...
* chore: bump rustc_version from 0.2.3 to 0.4.0
Bumps [rustc_version](https://github.com/Kimundi/rustc-version-rs ) from 0.2.3 to 0.4.0.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases )
- [Commits](https://github.com/Kimundi/rustc-version-rs/compare/v0.2.3...v0.4.0 )
---
updated-dependencies:
- dependency-name: rustc_version
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Make versions consistent
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-09 16:57:39 +00:00
Dmitri Makarov
d7a0fd8afa
Print commands output in cargo-build-bpf if verbose option is set ( #17845 )
2021-06-08 20:55:33 +00:00
Arthur Greef
28fdfed1ba
Blake3 syscall ( #17358 )
2021-06-08 11:04:10 -07:00
dependabot[bot]
03f4eb3ed1
chore: bump hex from 0.4.2 to 0.4.3 ( #17829 )
...
* chore: bump hex from 0.4.2 to 0.4.3
Bumps [hex](https://github.com/KokaKiwi/rust-hex ) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases )
- [Commits](https://github.com/KokaKiwi/rust-hex/compare/v0.4.2...v0.4.3 )
---
updated-dependencies:
- dependency-name: hex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-08 09:34:04 -06:00
Dmitri Makarov
6f193bf357
Add separate rules to generate dependencies files for C BPF build
2021-06-08 05:34:40 -07:00
dependabot[bot]
cb086ae492
chore: bump borsh from 0.8.1 to 0.9.0 ( #17780 )
...
* chore: bump borsh from 0.8.1 to 0.9.0
Bumps [borsh](https://github.com/near/borsh-rs ) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/near/borsh-rs/releases )
- [Changelog](https://github.com/near/borsh-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/near/borsh-rs/compare/v0.8.1...v0.9.0 )
---
updated-dependencies:
- dependency-name: borsh
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Clean bump and cargo-for-all-lock-files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-07 21:11:38 +00:00
Dmitri Makarov
910ac94a8c
Fix handling of stale links to bpf-tools in cargo-build-bpf ( #17772 )
2021-06-07 16:26:01 +00:00
dependabot[bot]
43b8d98055
chore: bump generic-array from 0.14.3 to 0.14.4 ( #17782 )
...
* chore: bump generic-array from 0.14.3 to 0.14.4
Bumps [generic-array](https://github.com/fizyk20/generic-array ) from 0.14.3 to 0.14.4.
- [Release notes](https://github.com/fizyk20/generic-array/releases )
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md )
- [Commits](https://github.com/fizyk20/generic-array/compare/0.14.3...0.14.4 )
---
updated-dependencies:
- dependency-name: generic-array
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-07 09:06:34 -06: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
Dmitri Makarov
ae0bea1ad3
Bump BPF tools to v1.10
2021-06-04 19:10:23 -07: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
dependabot[bot]
4bba92d3da
chore: bump serde_json from 1.0.62 to 1.0.64 ( #17735 )
...
* chore: bump serde_json from 1.0.62 to 1.0.64
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.62 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.62...v1.0.64 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-04 17:45:26 +00:00
Tyera Eulberg
3a647c4bea
Rename ValidatorExit and move to sdk ( #17728 )
2021-06-04 03:06:13 +00:00
Dmitri Makarov
47861fc373
Bump BPF tools to v1.9
2021-06-03 17:06:49 -07:00
dependabot[bot]
4971bc45f2
chore: bump pbkdf2 from 0.6.0 to 0.8.0 ( #17703 )
...
* chore: bump pbkdf2 from 0.6.0 to 0.8.0
Bumps [pbkdf2](https://github.com/RustCrypto/password-hashes ) from 0.6.0 to 0.8.0.
- [Release notes](https://github.com/RustCrypto/password-hashes/releases )
- [Commits](https://github.com/RustCrypto/password-hashes/compare/pbkdf2-v0.6.0...pbkdf2-v0.8.0 )
---
updated-dependencies:
- dependency-name: pbkdf2
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
* Bump hmac too
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-03 17:37:28 -06: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
dependabot[bot]
8e1e57a181
chore: bump tar from 0.4.28 to 0.4.35 ( #17666 )
...
* chore: bump tar from 0.4.28 to 0.4.35
Bumps [tar](https://github.com/alexcrichton/tar-rs ) from 0.4.28 to 0.4.35.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases )
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.28...0.4.35 )
---
updated-dependencies:
- dependency-name: tar
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2021-06-02 14:17:58 -06: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
dependabot[bot]
a0d721c6bd
Bump sha2 from 0.9.2 to 0.9.5 ( #17627 )
...
* Bump sha2 from 0.9.2 to 0.9.5
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.9.2 to 0.9.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.2...sha2-v0.9.5 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-06-01 08:58:38 -06:00
dependabot[bot]
ab0f4ff835
Bump serde from 1.0.122 to 1.0.126 ( #17618 )
...
* Bump serde from 1.0.122 to 1.0.126
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.122 to 1.0.126.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.122...v1.0.126 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <anatoly+githubjenkins@solana.io>
2021-05-31 22:41:25 +00:00
dependabot[bot]
88a22d7b0f
Bump rustversion from 1.0.4 to 1.0.5 ( #17610 )
...
* Bump rustversion from 1.0.4 to 1.0.5
Bumps [rustversion](https://github.com/dtolnay/rustversion ) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.4...1.0.5 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-05-31 16:54:15 +00:00
Dmitri Makarov
831e87c65d
Add BPF rustc option to reduce the optimizations to safer level ( #17590 )
2021-05-28 23:14:53 +00:00
dependabot[bot]
a35024123c
chore: bump memmap2 from 0.1.0 to 0.2.3 ( #17548 )
...
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs ) from 0.1.0 to 0.2.3.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases )
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.1.0...v0.2.3 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 13:11:58 -06:00
dependabot[bot]
86c07bf785
Bump bs58 from 0.3.1 to 0.4.0 ( #17573 )
...
* Bump bs58 from 0.3.1 to 0.4.0
Bumps [bs58](https://github.com/mycorrhiza/bs58-rs ) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/mycorrhiza/bs58-rs/releases )
- [Commits](https://github.com/mycorrhiza/bs58-rs/compare/0.3.1...0.4.0 )
Signed-off-by: dependabot[bot] <support@github.com>
* Fixup
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-05-28 18:30:34 +00:00
Jack May
a3240aebde
Always bail if program modifies a ro account ( #17569 )
2021-05-28 09:50:25 -07:00
Dmitri Makarov
2316ddb90a
Revert bpf-tools to version 1.8 because of a codegen bug suspicion ( #17568 )
2021-05-28 09:36:46 +00:00
Michael Vines
8eab0e8602
Bump version to v1.8.0 ( #17541 )
2021-05-27 08:51:53 -07:00
Lijun Wang
54f0fc9f0f
Use type alias for DownloadProgress callback ( #17518 )
...
Convert to use type alias for the callback and cascade the changes to callers. Thanks @jeffwashington for the help making it possible.
Changed the closure for the progress update in the validator main to FnMut and modify the abort count in the closure which is more reliable.
2021-05-26 13:26:07 -07:00
Dmitri Makarov
3ae4806dae
Fix missing builtins in C programs linking with compiler_builtins ( #17475 )
2021-05-25 17:11:02 +00:00
Lijun Wang
4c17243157
snapshot download enhancement ( #17415 )
...
1. Allow the validator bootstrap code to specify the minimal snapshot download speed. If the snapshot download speed is detected below that, a different RPC can be retried. The default is 10MB/sec.
2. To prevent spinning on a number of sub-optimal choices and not making progress, the abort/retry logic is implemented with the following safe guards:
2.1 at maximum we do this retry for 5 times -- this number is configurable with default 5.
2.2 if the download in one notification round (5 second) is more than 2%, do not do retry -- it is not as bad anyway.
2.3 if the remaining estimate time is less than 1 minutes, do not abort retry as it will be done quickly anyway.
2.4 We do this abort/retry logic only at the first notification to avoid wasting download efforts -- the reasoning is being opportunistic and too greedy may not achieve overall shorter download time.
3. The download_snapshot and download_file is modified with the option allowing caller to notified of download progress via a callback. This allows the business logic of retrying to the place it belongs.
2021-05-25 09:32:12 -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
Christian Machacek
8758e9ed82
Remove const qualifier from syscall out-parameters ( #17382 )
2021-05-21 12:09:22 -07:00
Jeff Washington (jwash)
44831c18d2
reuse work in is_non_loader_key ( #16521 )
2021-05-21 10:07:04 -05: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
Dmitri Makarov
2ae57c172a
Bump bpf-tools version to 1.9
...
- upgrade rustc to 1.52.1 and clang to 12.0
2021-05-20 11:35:37 +02: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
Dmitri Makarov
ab871ed4b7
Bump bpf-tools version to 1.8
2021-05-18 08:10:57 +02:00
Christian Machacek
e02b4e1192
Fix a bug in input deserialization in the C SDK ( #17217 )
...
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.
2021-05-14 16:41:55 -06: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
Dmitri Makarov
88626b2945
Bump bpf-tools version to 1.7 ( #17176 )
2021-05-11 19:51:20 +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
Dmitri Makarov
77272a17b3
Fix dump postprocessing in cargo-build-bpf ( #17165 )
2021-05-11 09:24:12 +00: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
Jack May
82fb6712e7
fix c program deploy help ( #17152 )
2021-05-10 15:38:01 -07:00
Jon Cinque
4b60b2863e
sdk: Add get_instance_packed_len for variable-size types ( #17092 )
...
* sdk: Add get_instance_packed_len for variable-size types
* Add comment for get_packed_len
* Add more tests
2021-05-10 23:31:02 +02:00
Christian Machacek
ff95e2aaa6
Add a make target to run the readelf utility on a compiled program
...
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.
2021-05-08 18:49:14 -07:00
Christian Machacek
6927d0c77e
Fix syscalls in the C SDK failing at runtime when compiled as C++ ( #17124 )
...
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_)".
2021-05-08 16:31:50 +00: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
Trent Nelson
cfc1cb1aee
SDK: Factor out pubkey on-curve test to a helper
2021-04-28 20:10:19 -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
Trent Nelson
9b7120bf73
SDK: More conversions for `Pubkey`
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
Justin Starry
8ce4a8d6ab
Annotate clock constants with computed values for quick refeerence ( #16812 )
2021-04-25 22:05:00 +08:00
Jeff Washington (jwash)
1a4a7059af
owner -> owner() ( #16785 )
2021-04-23 15:59:13 -05:00
Michael Vines
1500011fc6
get_packed_len() now correctly handles u32/i32 types
2021-04-23 13:39:42 -07: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
Sebastian Bor
1a658c7f31
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
2021-04-22 00:06:59 +01:00
Jeff Washington (jwash)
03f7b251b8
ReadableAccount.data returns slice ( #16686 )
...
* ReadAbleAccount.data returns slice
* more slice fixup
* more slice
* slice
2021-04-20 16:41:16 -05:00
Jack May
08d5253651
Enforce host aligned memory for program regions ( #16590 )
2021-04-20 11:07:30 -07:00
Jack May
01786f684e
Remove unwrap ( #16652 )
2021-04-19 20:17:56 -07:00
Tyera Eulberg
185bbf2db5
Wrap derivation_path::DerivationPath ( #16609 )
...
* Replace custom DerivationPath impl
* Add method to parse full-path from str with hardening
* Convert Bip44 to trait
* Hoist more work on derivation-path
* Privatize Bip44 trait
2021-04-19 20:57:43 +00:00
Alexander Meißner
9dfcb921cf
Refactoring: Move KeyedAccounts to InvokeContext ( #15410 )
...
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
Michael Vines
a911ae00ba
clippy
2021-04-18 20:55:02 -07:00
Tyera Eulberg
52f4b96a80
Move derivation path into sdk ( #16603 )
...
* Move DerivationPath to sdk
* Remove eprintln
2021-04-16 22:03:24 +00:00
Trent Nelson
285f3c9d56
Feature-gate hash-based duplicate transaction check
2021-04-16 18:51:18 +00:00
Justin Starry
f641429056
Remove blake3 from bpf program dependencies ( #16506 )
2021-04-13 10:06:05 +00:00
Dmitri Makarov
db3bca7edd
Add llvm feature option to compile for Solana BPF target ( #16495 )
2021-04-13 07:20:18 +00:00
Justin Starry
85eb37fab0
Merge pull request from GHSA-8v47-8c53-wwrc
...
* Track transaction check time separately from account loads
* banking packet process metrics
* Remove signature clone in status cache lookup
* Reduce allocations when converting packets to transactions
* Add blake3 hash of transaction messages in status cache
* Bug fixes
* fix tests and run fmt
* Address feedback
* fix simd tx entry verification
* Fix rebase
* Feedback
* clean up
* Add tests
* Remove feature switch and fall back to signature check
* Bump programs/bpf Cargo.lock
* clippy
* nudge benches
* Bump `BankSlotDelta` frozen ABI hash`
* Add blake3 to sdk/programs/Cargo.lock
* nudge bpf tests
* short circuit status cache checks
Co-authored-by: Trent Nelson <trent@solana.com>
2021-04-13 00:28:08 -06:00
Jack May
fa83f3bd73
Return sysvars via syscalls ( #16422 )
2021-04-12 16:04:57 -07:00
Dmitri Makarov
78d1d59889
Augment BPF binary dumps to resolve call instruction targets
2021-04-12 18:36:41 +02:00
Jon Cinque
448d5be79f
docker: Expose all ports in Dockerfile, add back localnet.sh ( #16401 )
...
* docker: Expose all ports in Dockerfile, add back localnet.sh
* Add documentation for where to find containers
* Obliterate script
2021-04-11 21:13:57 +02:00
François Garillot
b08cff9e77
Simplify some pattern-matches ( #16402 )
...
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust ).
2021-04-08 12:40:37 -06:00
Jack May
878e52f0b9
Fix cargo-build/test-bpf --workspace ( #16431 )
2021-04-07 17:22:55 -07:00
Jack May
92f4018b07
Cleanup unsupported sysvars ( #16390 )
...
* Cleanup unsupported sysvars
* fix ser description
2021-04-06 00:08:03 -07:00
Dmitri Makarov
1359bceb5d
Bump bpf-tools to version v1.5 ( #16331 )
...
The new version of bpf-tools eliminates the separate
rust-bpf-sysroot. The Rust standard libraries for the BPF target are
built in tree when the compiler is built. The standard libraries code
is slightly more optimized and some reduction of compute budget can be
expected with this version of bpf-tools.
2021-04-04 13:04:22 +00:00
Jack May
bcd89dd34c
Fix BPF ELF layout ( #16256 )
...
* Fix BPF ELF layout
* whitespace
2021-03-31 08:51:19 +00:00
Jack May
f84e88f0a2
Cleanup nits ( #16211 )
2021-03-30 12:16:21 -07:00
sakridge
54c68ea83f
Drop write lock on sysvars ( #15497 )
...
* Drop write lock on sysvars
* adds env var for demoting sysvar write lock demotion
* moves demote logic to is_writable
* feature gates sysvar write lock demotion
* adds builtins to write lock demotion
* adds system program id to builtins
* adds Feature111...
* adds an abi-freeze test
* mvines set of builtin program keys
Co-authored-by: Michael Vines <mvines@gmail.com>
* update tests
* adds bpf loader keys
* Add test sysvar
* Plumb demote_sysvar to is_writable
* more plumbing of demote_sysvar_write_locks to is_writable
* patches test_program_bpf_instruction_introspection
* hard codes demote_sysvar_write_locks to false for serialization/encoding methods
* Revert "hard codes demote_sysvar_write_locks to false for serialization/encoding methods"
This reverts commit ae3e2d2e777437bddd753933097a210dcbc1b1fc.
* change the hardcoded ones to demote_sysvar_write_locks=true
* Use data_as_mut_slice
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-30 10:05:09 -07:00
Trent Nelson
9ba9d2a8ae
Allow incomplete features in frozen-abi
2021-03-30 02:32:53 +00:00
Justin Starry
abada56ba1
Print the rust version when building bpf programs ( #16181 )
2021-03-29 14:17:08 +08:00
Justin Starry
aabe186e3f
sdk: Use u32::MAX from std to unbreak BPF builds ( #16171 )
2021-03-27 15:53:25 +00:00
Tyera Eulberg
433f1ead1c
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data ( #16142 )
...
* Add Blockstore block and tx apis that allow unrooted responses
* Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender
* Track highest slot with tx-status writes complete
* Rename and unpub fn
* Add commitment to GetConfirmed input configs
* Support confirmed blocks in getConfirmedBlock
* Support confirmed txs in getConfirmedTransaction
* Update sigs-for-addr2 comment
* Enable confirmed block in cli
* Enable confirmed transaction in cli
* Review comments
* Rename blockstore method
2021-03-26 16:47:35 -06:00
Jon Cinque
cffa851e0f
sdk: Add try_from_slice_unchecked for Borsh ( #16098 )
...
* sdk: Add try_from_slice_unchecked for Borsh
* Add tests
* Rename + clarify comment
* Rename back to unchecked
2021-03-26 23:37:35 +01:00
Dmitri Makarov
658ddd1c9c
Bump bpf-tools to version v1.4 ( #16152 )
2021-03-26 19:21:41 +00:00
Michael Vines
07273bfa9e
Show bpf-tools download progress
2021-03-25 12:23:51 -07:00
Jeff Washington (jwash)
66c42f62d8
make AccountSharedData.data private to abstract storage ( #16091 )
...
* format
* 2 more tests
* use
2021-03-25 11:04:20 -05:00
Ryo Onodera
6d5c6c17c5
Simplify account.rent_epoch handling for sysvar rent ( #16049 )
...
* Add some code for special local testing
* Add comment to store_account_and_update_capitalization
* Simplify account.rent_epoch handling for sysvar rent
* Introduce *_for_test functions
* Add deprecation messages to existing api
2021-03-25 15:23:20 +09:00
Trent Nelson
8b3de72e2a
program: Correct clamp in Message::signer_keys()
2021-03-24 23:27:24 -06:00
Kristofer Peterson
6bc858a888
Refactored ShortU16Visitor::visit_seq() to reject overflows, extra leading zeros and ensure one-to-one encoding.
2021-03-24 21:53:35 -06:00
Trent Nelson
9153cb9237
sdk: ShortU16 - rename variables for clarity
...
ShortU16's implementation embeds its usage as the length of a
ShortVec, confusingly referring to both a 'len' and a 'size'
at the same time.
2021-03-24 21:53:35 -06:00
Trent Nelson
cc6dcb48d4
sdk: Add ShortU16 deser test
2021-03-24 21:53:35 -06:00
Dmitri Makarov
664ed76523
Bump bpf-tools to version v1.3 ( #16068 )
...
* Bump bpf-tools to version v1.3
This brings in the fix for increased compute budget that wasn't caught
when bpf-tools v1.2 were released.
* Adjust BPF test programs instruction counts
2021-03-24 07:16:38 +00:00
Jeff Washington (jwash)
2d24d13046
AccountsSharedData: data copy on write ( #15800 )
...
* Arc<AccountData>
* try custom serializer
* adapt test from Behzad's change
* clippy
* simplify serialization
* remove abi example derive
* refactor 'take'
* remove serialization
* remove serialize calls
* remove account_data
* remove intos
* remove left over file
2021-03-23 15:19:31 -05:00
Jeff Washington (jwash)
6f5d8d18e9
remove new alloc on deserialization ( #15636 )
2021-03-23 14:52:59 -05:00
Trent Nelson
482c027d3b
sq: optimize
2021-03-22 12:01:57 -06:00
Dmitri Makarov
14e45155e4
Bump bpf-tools to v1.2 and get rid of xargo
2021-03-19 12:09:15 +01:00
Justin Starry
4c5660ba7a
Santize instruction index when loading instruction from sysvar ( #15942 )
2021-03-19 09:32:41 +08:00
Jeff Washington (jwash)
9760fded2d
remove old code ( #15988 )
2021-03-18 17:51:49 +00:00
Jack May
7f500d610c
Add Close instrruction and tooling to upgradeable loader ( #15887 )
2021-03-17 21:39:29 -07:00
Trent Nelson
12399157f5
SDK: Allow integer math in bump allocator
2021-03-17 22:23:18 -06:00
Trent Nelson
854e6766ce
SDK: Ovf in epoch_schedule
2021-03-17 22:23:18 -06:00
Trent Nelson
98d7673a03
sdk/program: switch allow to mod-level for integer_arithmetic lint
2021-03-17 22:23:18 -06:00
Tyera Eulberg
5b2b824a53
Sdk: remove integer arithmetic ( #15962 )
...
* Fix timing
* Fix secp256k1_instruction
* Fix secp256k1 tests
2021-03-18 01:33:50 +00:00
Trent Nelson
bf33ce8906
sdk: Add accessor for signer pubkeys of a tx message
2021-03-16 22:09:46 -06:00
Jeff Washington (jwash)
806bfdd67b
set_data_from_slice ( #15854 )
...
* data_ensure_equal_to_slice
* rename and change to copy
2021-03-16 16:56:26 -05:00
Michael Vines
eb19e11688
Add cargo-bpf-test --no-run flag, matching cargo-test
2021-03-16 08:23:03 +00:00
Michael Vines
a2eb655322
=1.7.0
2021-03-16 07:51:07 +00:00
Jack May
5760cf0f41
nit: fix spelling ( #15908 )
2021-03-15 23:47:57 -07:00
Ryo Onodera
74aa32175b
Show flags for accounts in tx by solana confirm ( #15804 )
...
* Show flags for accounts in tx by solana confirm
* Address review comments
* Improve comment a bit
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Further apply review suggestions
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-16 14:44:48 +09:00
Jack May
ad9901d7c6
Charge compute budget for bytes passed via cpi ( #15874 )
2021-03-15 22:41:44 -07:00
Michael Vines
8567b41d5f
Improve Instruction::new deprecation warning
2021-03-15 20:04:20 -07:00
Jeff Washington (jwash)
c09ea2c314
More AccountSharedData construction ( #15844 )
...
* one more AccountSharedData construction
* one more construct
2021-03-15 19:27:17 -05:00
carllin
c1ba265dd9
Wallclock BankingStage Throttle ( #15731 )
2021-03-15 17:11:15 -07:00
Jack May
60e5fd11c9
Display actual account length ( #15875 )
2021-03-15 14:17:56 -07:00
Michael Vines
0c9ca5522c
Bump version to v1.7.0
2021-03-13 09:01:21 +00:00
behzad nouri
f2865dfd63
requires stakes for propagating crds values through gossip ( #15561 )
2021-03-12 15:50:14 +00:00
Tyera Eulberg
e5b644e830
Add trait for saturating arithmetic ( #15812 )
...
* Add SaturatingArithmetic trait
* Use Duration saturating arithmetic
* Use new macro to fix poh_config
2021-03-12 06:22:40 +00:00
Jack May
cc38ae72e7
Skip deserialization of readonly accounts ( #15813 )
2021-03-11 19:28:21 -08:00
Ryo Onodera
4bbeb9c033
Remove old feature: simple_capitalization ( #15763 )
...
* Remove old feature: simple_capitalization
* Fix another failing test in core
* Finish up test cleanup
* Further clean up a bit
2021-03-12 11:12:40 +09:00
Jeff Washington (jwash)
3419a5446e
AccountSharedData.set_data ( #15781 )
...
* account.set_data and resize_data
* remove data_resize
2021-03-11 16:40:45 -06:00
Trent Nelson
79ac1997de
sdk: add macro for unchecked div with const denominator
2021-03-11 08:44:36 +00:00
Trent Nelson
24d18b3cf2
docs: add docs links for crates published to crates.io
2021-03-11 08:38:18 +00:00
Jack May
478518308d
Share RO and Executable accounts within invocations ( #15799 )
2021-03-10 23:04:00 -08:00
Jeff Washington (jwash)
1135ffd595
mut data refs as slice ( #15782 )
2021-03-10 15:28:03 -06:00
Jack May
369e13b111
cleanup old runtime features ( #15787 )
2021-03-10 09:48:41 -08:00
Dmitri Makarov
c5a5d7457e
Bump bpf-tools to v1.1 ( #15776 )
2021-03-10 18:13:38 +01:00
Jeff Washington (jwash)
52e54e1100
account.data -> data() ( #15778 )
2021-03-09 22:31:33 +00:00
Jeff Washington (jwash)
8a3135d17b
Account->AccountSharedData ( #15691 )
2021-03-09 15:06:07 -06:00
carllin
2bee9435f3
Add tracer key for tracing transaction path through the network ( #15732 )
2021-03-08 19:31:00 -08:00
Tyera Eulberg
e3e8179f2d
Sdk: start to appease clippy's integer arithmetic check ( #15736 )
...
* Move to module-level clippy allowance
* Fix stake_weighted_timestamp math
* Fix genesis_config
* Fix shred_version
* Fix hard_forks
* Fix process_instruction
* Add ArithmeticOverflow ix error
* Fix nonce_keyed_account
* Update BankSlotDelta frozen abi due to new ix error
2021-03-08 18:37:57 -07:00
Ryo Onodera
8b0c6db871
Remove old feature: cumulative_rent_related_fixes ( #15754 )
2021-03-08 09:58:50 +09:00
Jack May
b53cb8eb2d
Deprecate Instruction::new ( #15695 )
2021-03-04 05:46:48 +00:00
Jack May
4a05210d8e
Clarify Instruction::new ( #15686 )
...
Not related to local-cluster, merging
2021-03-03 17:39:04 -08:00
Jeff Washington (jwash)
be35c1c1b7
add execute detail timings ( #15638 )
2021-03-03 17:07:45 -06:00
Justin Starry
b8e28b8c55
Remove unnecessary packet meta abi lock ( #15653 )
2021-03-03 17:31:52 +08:00
Jack May
a9c8dbfd0c
Add error reporting to system program ( #15644 )
2021-03-02 21:44:25 -08:00
Jack May
4789a13a6e
configure rust-bpf toolchain for each tree ( #15620 )
2021-03-02 00:45:28 -08:00
Trent Nelson
ef63ffce7d
Bump ed25519-dalek to 1.0.1
2021-03-01 21:10:46 +00:00
sakridge
8399851d11
check program owners ( #15495 )
...
* check program owners
* BankSlotDelta should change because InstructionError variant added
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-26 22:21:34 +00:00
Tyera Eulberg
eddb7f98f5
Check vote account initialization ( #15503 )
...
* Check account data_len on Vote account init
* Check account data populated on update_cached_accounts
2021-02-24 10:00:48 -07:00
Michael Vines
fd3b71a2c6
cargo fmt
2021-02-19 20:08:41 -08:00
Michael Vines
995bd0cb6b
Rename IOError to BorshIoError
2021-02-19 10:54:39 -08:00
Michael Vines
6a8dd86722
Remove unix path separators
2021-02-19 08:22:36 -08:00
Jack May
48785b507b
Bump Rust-BPF to v1.46 ( #15273 )
2021-02-18 11:30:08 -08:00
Jack May
02432a548f
Cleanup old features ( #15391 )
2021-02-18 09:56:11 -08:00
Jon Cinque
0f6f6080f3
sdk: Add Borsh support for types and utilities ( #15290 )
...
* sdk: Add Borsh to Pubkey
* Add serialization error for easier borsh integration
* Add Borsh usage to banks-client and sdk
* Rename SerializationError -> IOError
* Add new errors to proto
* Update Cargo lock
* Update Cargo.lock based on CI
* Clippy
* Update ABI on bank
* Address review feedback
* Update sanity program instruction count test
2021-02-18 11:14:56 +01:00
Tyera Eulberg
fcee227021
Add lamports overflow test for nonce withdraw ( #15383 )
2021-02-18 01:37:13 +00:00
Trent Nelson
7f7370c306
Re-allow clippy::integer_arithmetic at crate-level
2021-02-17 13:55:08 -07:00
Jon Cinque
3ac7e09de6
docs: Remove references to "create_address_with_seed" ( #15339 )
2021-02-17 14:25:02 +01:00
Tyera Eulberg
b821a5d8dd
Clean nonce
2021-02-16 19:25:00 -08:00
Tyera Eulberg
7e17a0d3bb
Move fn to sdk
2021-02-16 19:25:00 -08:00
Trent Nelson
b3256aa722
Bump rand_core to 0.6.2
...
https://rustsec.org/advisories/RUSTSEC-2021-0023
2021-02-15 22:51:35 +00:00
Trent Nelson
1a20ab968f
sdk: sanitize `Hash` base58 input
2021-02-13 08:40:35 +00:00
Jack May
6650fbf443
Add per-byte logging cost ( #15279 )
2021-02-12 00:55:17 +00:00
Michael Vines
47c60f8e98
Clean up mainnet-beta inflation candidate features
2021-02-10 17:46:22 -08:00
Tyera Eulberg
da6753b8c0
Warp timestamp and extend max-allowable-drift for accommodate slow blocks ( #15204 )
...
* Remove timestamp_correction feature gating
* Remove timestamp_bounding feature gating
* Remove unused deprecated ledger code
* Remove unused deprecated unbounded-timestamp code
* Enable independent adjustment of fast/slow timestamp bounding
* Update timestamp bounds to 25% fast, 80% slow; warp timestamp
* Update bank hash test
* Add PR number to feature
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-09 15:49:00 -07:00
Michael Vines
dc7041ba07
Require lockup authority to change withdraw authority on locked stake ( #14861 )
2021-02-05 22:40:07 -08:00
Michael Vines
2a60dd8492
Add w3m's inflation pubkeys ( #15142 )
2021-02-05 08:46:09 -08:00
Ryo Onodera
c69027e5aa
chore: bump serde from 1.0.118 to 1.0.122 ( #15126 )
...
* chore: bump serde from 1.0.118 to 1.0.122
* Update programs/bpf/Cargo.lock
2021-02-05 19:23:24 +09:00
Michael Vines
863f08f8d3
Sort inflation candidates alphabetically
2021-02-05 07:16:23 +00:00
sotcsa
e908a4b3fc
Inflation Nomination for sotcsa ( #15105 )
2021-02-04 21:45:17 -08:00
Jack May
bba1b49663
Generate keypair file for c program deployment ( #15080 )
...
* Generate keypair file for c program deployment
* Build and use solana-keygen in test-stable-perf
2021-02-04 13:56:12 -08:00
bonsfi
53dab29528
Add LowFeeValidation Nomination ( #15098 )
2021-02-04 10:50:44 -08:00
calvinzhou-rockx
c6f572c331
Enable inflation candidate for RockX ( #15099 )
2021-02-04 10:39:33 -08:00
DimAn
d87e0c3f1d
Inflation Nomination for Diman ( #15083 )
2021-02-04 09:04:23 -08:00
rk-p2p
2ed074ba2a
Nomination candidate for p2pvalidator ( #15079 )
2021-02-04 08:40:14 -08:00
Michael Vines
c3ba70300b
Correct stakeconomy::vote::id() ( #15062 )
2021-02-03 12:39:55 -08:00
Jack May
d24d5fba0e
Upgradeable loader max_data_len limit ( #15039 )
2021-02-03 09:16:25 -08:00
buburuza27
f2d415cf13
Nomination candidate for buburuza ( #15047 )
2021-02-03 08:30:44 -08:00
Jack May
286e4d6924
bump rust-bpf-sysroot to v0.14 ( #15040 )
2021-02-03 10:43:38 +00:00
bunghi
87815ae1fd
Nomination candidate for bunghi ( #15036 )
...
* Update feature_set.rs
* Update feature_set.rs
* Update sdk/src/feature_set.rs
* Update feature_set.rs
* Update sdk/src/feature_set.rs
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-03 10:10:38 +00:00
Trent Nelson
894b412aef
docs: bump nofiles recommendations to match maps
2021-02-02 21:59:21 -07:00
dependabot[bot]
1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 ( #14828 )
...
* chore: bump serde from 1.0.112 to 1.0.122
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Update frozen_abi digest following serde update
* Revert "chore: bump serde from 1.0.112 to 1.0.122"
This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.
* Revert "[auto-commit] Update all Cargo lock files"
This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.
* chore: bump serde from 1.0.112 to 1.0.118
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Remove serum-dex pinning
* blind commit!
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: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Brian Long
8e0fdff17c
Inflation Nomination for BL ( #14972 )
2021-02-01 20:21:30 -08:00
Leopold Schabel
c06568f3db
Certus One inflation enablement feature pair ( #14961 )
2021-02-01 08:12:01 -08:00
Michael Vines
e0f6695cc2
Update sdk/src/feature_set.rs
2021-01-30 10:04:50 -08:00
Stakeconomy.com
4ba9e39941
Update feature_set.rs
2021-01-30 10:04:50 -08:00
Michael Vines
15baf43d1e
Template for an Inflation Candidate nomination
...
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-30 10:04:50 -08:00
nampdn
f98889adc0
style(spacing): reformat tab spacing
2021-01-29 23:08:24 -08:00
Michael Vines
a7ff1684f5
Template for an Inflation Candidate nomination
...
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-29 23:08:24 -08:00
Jack May
07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades ( #14923 )
2021-01-29 12:43:42 -08:00
Trent Nelson
85b5dbead6
Add feature for pending SPL Token self-transfer fix
2021-01-29 04:19:33 +00:00
Tyera Eulberg
ffa5c7dcc8
Deprecate commitment variants ( #14797 )
...
* Deprecate commitment variants
* Add new CommitmentConfig builders
* Add helpers to avoid allowing deprecated variants
* Remove deprecated transaction-status code
* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist
* Remove deprecated banks code
* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now
* Heavier hand with rpc/rpc-subscription commitment
* Remove deprecated variants from local-cluster
* Remove deprecated variants from various tools
* Remove deprecated variants from validator
* Update docs
* Remove deprecated client code
* Add new variants to cli; remove deprecated variants as possible
* Don't send new commitment variants to old clusters
* Retain deprecated method in test_validator_saves_tower
* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test
* Refactor node version check to handle commitment variants and transaction encoding
* Hide deprecated variants from cli help
* Add cli App comments
2021-01-26 19:23:07 +00:00
Jack May
4a4881d30f
Update find_program_address docs ( #14840 )
2021-01-25 16:03:26 -08:00
Jack May
74c83e6854
Rotate feature key: use loaded executable accounts ( #14838 )
2021-01-25 15:34:45 -08:00
Michael Vines
cbffab7850
Upgrade to Rust v1.49.0
2021-01-23 19:16:36 -08:00
sakridge
191193289f
Upgrade sha2 to 0.9.3 ( #14746 )
2021-01-22 22:25:22 -08:00
Michael Vines
bf1943e489
Add solana-test-validator --warp-slot argument
2021-01-22 21:17:02 -08:00
Jack May
e505a9b209
Revert disabling script ( #14788 )
2021-01-23 01:08:06 +00:00
Jack May
77572a7c53
Track account writable deescalation ( #14626 )
2021-01-22 15:28:01 -08:00
Michael Vines
3c6dbd21d2
Add ic_msg()/ic_logger_msg() macros
2021-01-21 21:41:33 +00:00
Michael Vines
072e5e54d8
Add generalized voting process to enable full inflation
2021-01-20 23:37:21 -08:00
Trent Nelson
447e3de1f2
Nonce address doesn't sign AdvanceNonceAccount
2021-01-21 04:14:36 +00:00
Trent Nelson
2783aee483
SDK: Sanitize base58 signature input
2021-01-20 23:59:26 +00:00
Trent Nelson
250b3969d4
SDK: Sanitize base58 pubkey input
2021-01-20 23:59:26 +00:00
Tyera Eulberg
a7086a0f83
Cli: promote commitment to a global arg + config.yml ( #14684 )
...
* Make commitment a global arg
* Add commitment to solana/cli/config.yml
* Fixup a couple Display/Verbose bugs
2021-01-20 09:48:10 -07:00
Jack May
a480b63234
Bail on small deploy buffers ( #14677 )
2021-01-20 01:56:44 +00:00
Jack May
e3bd9e5300
Prevent the invoke and upgrade of programs in the same tx batch ( #14653 )
...
* Prevent the invoke and upgrade of programs in the same tx batch
* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
behzad nouri
c6ae0667e6
feature gates turbine retransmit peers patch ( #14631 )
2021-01-19 04:16:19 +00:00
Jack May
6e8a1ba7de
Load executable accounts from invoke context ( #14574 )
2021-01-14 00:19:22 -08:00
Tyera Eulberg
b0e6e29527
Update timestamp max allowable drift to 50% of PoH ( #14531 )
...
* Repurpose warp-timestamp feature for general bump
* Change max_allowable_drift to 50%
* Fill in PR#
* Fix rpc test setup
2021-01-11 23:27:30 +00:00
Jack May
ec48631fc5
Bail on all CPI errors ( #14500 )
...
* Bail on all CPI errors
* whitespace
2021-01-09 02:27:39 +00:00
Jack May
58487c6360
Add buffer authority to upgradeable loader ( #14482 )
2021-01-08 09:37:57 -08:00
Jeff Washington (jwash)
773b21b34e
consolidate DEFAULT_HASHES_PER_TICK ( #14463 )
2021-01-07 09:49:42 -06:00
Jeff Washington (jwash)
938d482135
consolidate constants related to time for future refactoring ( #14440 )
2021-01-07 09:49:24 -06:00
Jack May
5eacc5d08d
Enable program upgrades via CPI ( #14449 )
2021-01-06 14:31:14 -08:00
Jack May
a8b5a32b50
Gate cpi program account passing ( #14443 )
2021-01-05 21:53:41 +00:00
Ryo Onodera
aa4da339ff
Improve solana catchup ( #14313 )
...
* Improve solana catchup
* Overidable port, retry, args error clean up
* print cleanup
* Reduce diff
* Tweak warns a bit
2021-01-05 10:10:27 +09:00
Jack May
0619805806
Upgradeable programs needs program account's address as program id ( #14417 )
2021-01-04 21:45:05 +00:00
carllin
5affd8aa72
Add secondary indexes ( #14212 )
2020-12-31 18:06:03 -08:00
Jack May
2d8dacb72b
Gate CPI authorized programs ( #14361 )
2020-12-30 18:13:37 -08:00
Justin Starry
3d0cd2cdb0
Add --test arg to cargo-test-bpf ( #14342 )
2020-12-30 04:03:26 +00:00
Jack May
5524938a50
Limit CPI instruction size ( #14317 )
2020-12-29 01:14:17 +00:00
Trent Nelson
3881ae10fb
Deinitialize nonce data upon zero balance
2020-12-22 19:37:26 -07:00
Tyera Eulberg
7042f11791
Feature-gate stake-program-v3 ( #14232 )
...
* Remove deprecated legacy stake program
* Add legacy stake program
* Strip out duplicative legacy code
* Feature-deploy stake-program-v3
* Add ownership check in stake processor
2020-12-22 11:20:38 -07:00
Jack May
ab205b682a
Upgradeable programs called same as non-upgradeable ( #14239 )
...
* Upgradeable programs called same as non-upgradeable
* nudge
2020-12-22 09:26:55 -08:00
Jack May
3316e7166c
Rework upgradeable loader cli ( #14209 )
2020-12-21 13:02:53 -08:00
behzad nouri
7b08cb1f0d
improves performance in replay-stage ( #14217 )
...
bank::vote_accounts returns a hash-map which is slow to iterate, but all uses
only require an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/runtime/src/bank.rs#L4300-L4306
Similarly, calculate_stake_weighted_timestamp takes a hash-map whereas it only
requires an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/sdk/src/stake_weighted_timestamp.rs#L21-L28
2020-12-21 19:18:19 +00:00
Tyera Eulberg
079424d7d1
Warp-timestamp pr#
2020-12-21 10:52:18 -07:00
Tyera Eulberg
e15f95a36f
Fix timestamp handling on ledger warp ( #14210 )
...
* Reset timestamp for slot and epoch-start on warp
* Fix genesis timestamp metric source
* Remove check that timestamp > unix_timestamp_from_genesis
Default to previous timestamp, not genesis timestamp
* Move timestamp metrics to report even on warp
* Initialize slot 0 timestamps correctly
* Add feature gate to warp testnet timestamp
* Review suggestion: simplify warp-timestamp slot check
2020-12-20 21:36:56 +00:00
Jack May
e8cc0bef6c
Add CPI support for upgradeable loader ( #14193 )
2020-12-17 15:39:49 -08:00
Michael Vines
efc091e28a
Add transactionCount field to GetEpochInfo
2020-12-17 12:29:50 -08:00
Michael Vines
636a455790
Create a random `-keypair.json` file alongside the program deploy artifact for easy upgrades
2020-12-16 19:51:16 +00:00
Michael Vines
9993d2c623
Use AsRef
2020-12-16 19:51:16 +00:00
Michael Vines
1e977ac025
Bump version to v1.6.0
2020-12-15 18:28:04 +00:00
Jack May
d513b0c4ca
Add Program loader/environment instruction errors ( #14120 )
2020-12-15 09:54:07 -08:00
Jack May
ab98c1f2d4
Add try_find_program_address syscall ( #14118 )
2020-12-15 08:15:01 -08:00
Jack May
9e90394583
Upgradeable loader ( #13689 )
2020-12-14 15:35:10 -08:00
Michael Vines
7143aaa89b
Clippy
2020-12-14 08:03:29 -08:00
Ryo Onodera
de9ac43ebf
Simple cap by including sysvars and native programs ( #13884 )
...
* Simpler cap by including sysvars and native programs
* Fix tests
* Add comment
* revert some unrelated code
* Update test_bank_update_sysvar_account for cap.
* Test cap. for add_native_program using new helper
* Improve the cap adjustment with new tests
* Fix typo...
* Adjust test for improved code coverage
* Rename simpler_capitalization => simple_capitalization
* More rename and bonus commenting
2020-12-14 21:03:24 +09:00
dependabot[bot]
88d950e5a8
chore: bump log from 0.4.8 to 0.4.11 ( #13691 )
...
* chore: bump log from 0.4.8 to 0.4.11
Bumps [log](https://github.com/rust-lang/log ) from 0.4.8 to 0.4.11.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/compare/0.4.8...0.4.11 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 13:48:23 +09:00
Jack May
1d95b5476e
Add next_account_infos helper ( #14087 )
2020-12-12 20:12:56 -08:00
dependabot[bot]
a9185d4ea1
chore: bump rustversion from 1.0.3 to 1.0.4 ( #14022 )
...
* chore: bump rustversion from 1.0.3 to 1.0.4
Bumps [rustversion](https://github.com/dtolnay/rustversion ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.3...1.0.4 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 03:56:27 +09:00
Trent Nelson
edff62af3d
Switch to memmap2 fork
2020-12-11 23:44:03 +00:00
Tyera Eulberg
d6eff3d62c
Filter out stake and vote accounts with incorrect owners ( #14062 )
...
* Add failing test
* Check stake/vote accounts for validity
* Feature gate change
* Add datapoint
* Add test realism
2020-12-11 12:21:25 -07:00
Michael Vines
0a9ff1dc9d
Initial solana-test-validator command-line program
2020-12-11 04:17:38 +00:00
Ryo Onodera
164b7895b3
Tiny add_native_program bug fixes with cleanups ( #14042 )
...
* Tiny add_native_program bug fixes with cleanups
* Fix typo
2020-12-11 11:03:31 +09:00
Jack May
d9655ea507
Add message helpers to get program info ( #14047 )
2020-12-10 16:39:43 -08:00
Jack May
7abd8084b6
Add get_minimum_balance_for_rent_excemption to Client ( #14048 )
2020-12-10 16:39:28 -08:00
Jack May
5ea80e673f
Fix priv escalation test ( #14046 )
2020-12-10 22:36:33 +00:00
Jack May
1dc71fb5aa
Bump criterion to v2.3.3 ( #14002 )
2020-12-07 21:53:28 +00:00
Jack May
20c0e8793e
Rent account passed to loader can be read-only ( #13997 )
2020-12-07 19:44:32 +00:00
Alexander Meißner
a706706572
Validator CLI option to enable just-in-time compilation of BPF ( #13789 )
...
* Adds a CLI option to the validator to enable just-in-time compilation of BPF.
* Refactoring to use bpf_loader_program instead of feature_set to pass JIT flag from the validator CLI to the executor.
2020-12-07 09:49:55 +01:00
Jack May
3f841df7cf
Cap number of program address seeds ( #13924 )
2020-12-02 22:25:06 +00:00
Trent Nelson
17defbff13
Make `Accounts::is_non_loader_key()` a method on `Message`
2020-12-02 20:10:08 +00:00
Trent Nelson
274312ebb5
sdk: Check owner when verifying nonce accounts
2020-12-02 20:10:08 +00:00
Alexander Meißner
aebc3a17ce
Fix undefined symbol "custom panic" in BPF test programs ( #13840 )
...
* Implements missing "custom_panic" symbol
2020-12-01 16:52:20 +01:00
Jack May
57dd60f671
Use msg! in program entrypoint ( #13889 )
2020-12-01 10:56:26 +00:00
Michael Vines
6705b5a98c
Add msg! macro for program logging, deprecate info! macro
2020-11-30 20:39:42 -08:00
behzad nouri
e1793e5a13
caches vote-state de-serialized from vote accounts ( #13795 )
...
Gossip and other places repeatedly de-serialize vote-state stored in
vote accounts. Ideally the first de-serialization should cache the
result.
This commit adds new VoteAccount type which lazily de-serializes
VoteState from Account data and caches the result internally.
Serialize and Deserialize traits are manually implemented to match
existing code. So, despite changes to frozen_abi, this commit should be
backward compatible.
2020-11-30 17:18:33 +00:00
Tyera Eulberg
c930f92411
Restore bank feature used to deprecate Rewards sysvar ( #13786 )
2020-11-24 10:22:31 -07:00
Alexander Meißner
c833ede4af
Rbpf v0.2.1 ( #13732 )
...
* Refactoring to match rbpf-v0.2.1 and add JIT compilation caching.
* Removes obsolete bpf-trace.py which has been replaced by the rbpf CLI tool.
2020-11-24 18:00:19 +01:00
Tyera Eulberg
c75d97e3f2
Add new inflation feature-ids ( #13671 )
...
* Add new inflation feature-ids, and full_inflation default values
* Compute inflation start from full_inflation activation
* Include pico_inflation in inflation start computation
* Add full-inflation constructor
* Align inflation taper with rewards accrual start and catch overflow edge case
2020-11-20 09:54:41 -07:00
Ryo Onodera
43d5e47ea9
Rewrite stake accounts for clear migration ( #13461 )
...
* Reduce overage stake by rewritng stake accounts
* Write tests and finish implemention
* Create and use new feature gate
* Clean up logging
* Fix typo
* Simplify enable_rewrite_stake
* Fix typo...
* Even simplify gating
* Add metrics
2020-11-20 05:15:06 +09:00
Michael Vines
f25c969ad8
Disable publishing of cargo-build-bpf/cargo-test-bpf to crates.io
2020-11-18 19:09:04 +00:00
Michael Vines
baa6b3a261
Add stable program logging for BPF and native programs
2020-11-14 08:26:01 -08:00
Michael Vines
9f95704706
Add --offline flag
2020-11-12 20:03:12 -08:00
Jack May
48dd9f7efd
Move secp256k1 instruction helper to the sdk ( #13560 )
2020-11-12 16:58:40 -08:00
Jack May
e390c8cb7f
Add stubs and heap region definitions ( #13521 )
...
* Add stubs and heap region definitions
* nudge
2020-11-11 05:50:16 +00:00
Tyera Eulberg
91f4e99b4c
Fix parsing CreateAccountWithSeed instructions ( #13513 )
...
* Reduce required num_system_accounts and handle 2-account instructions properly
* Update CreateAccountWithSeed account docs to be correct
* Add CreateAccountWithSeed test
2020-11-10 23:51:53 +00:00
Jack May
9ca8e98525
Add printf declaration ( #13514 )
2020-11-10 23:40:48 +00:00
Jack May
23c558510a
add missing c logging stubs ( #13511 )
2020-11-10 22:19:54 +00:00
Jack May
c280d40b40
align cluster and sim logging as hex ( #13484 )
2020-11-10 02:43:20 +00:00
Tyera Eulberg
c0e2ef06dc
Fix Bank accounts hash mismatch related to Clock::unix_timestamp ( #13477 )
...
* Test for different ancestors with mismatch bank hash
* Test cleanup
* Remove nondeterministic ancestor check
* Update timestamp bounding feature key
* Update design doc
* Filter recent_timestamps to nodes voting within the last epoch
Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2020-11-10 02:10:09 +00:00
Jack May
461ae40eea
provide full Rust panic messages in BPF and add memory optimizations ( #13455 )
2020-11-09 13:40:26 -08:00
behzad nouri
73ac104df2
propagates errors out of Packet::from_data ( #13445 )
...
Packet::from_data is ignoring serialization errors:
https://github.com/solana-labs/solana/blob/d08c3232e/sdk/src/packet.rs#L42-L48
This is likely never useful as the packet will be sent over the wire
taking bandwidth but at the receiving end will either fail to
deserialize or it will be invalid.
This commit will propagate the errors out of the function to the
call-site, allowing the call-site to handle the error.
2020-11-08 15:10:03 +00:00
Tyera Eulberg
4c5f345798
Fix stake split rent-exempt adjustment ( #13357 )
...
* Add failing tests
* Fix stake split
* Calculate split rent-exempt-reserve and use
* Add comment in rent.rs
* Add tests for edge cases when splitting to larger accounts, and reject overflow splits
* Reframe InsufficientFunds checks in terms of lamports var
* Test hardening review comments
2020-11-06 20:32:05 +00:00
Michael Vines
0ea795caa8
cargo-build-bpf/cargo-test-bpf now support --workspace/--all
2020-11-06 12:27:46 -08:00
Michael Vines
1a70a2a25b
cargo-test-bpf now sets the "test-bpf" feature for crate tests
...
The feature allows for tests to distinguish between `cargo test` and
`cargo test-bpf` primarily for the purpose of excluding CPI tests that
require the system program under `cargo test`, as the path to enabling
CPI in `cargo test`-based testing is unclear
2020-11-06 10:21:07 -08:00
Tyera Eulberg
1b1d9f6b0c
Feature-gate stake program ( #13394 )
...
* Add legacy stake-program handling
* Strip out duplicative legacy code
* Add feature for stake-program-fix
* Feature-deploy new stake program
* Expand comment
2020-11-06 08:08:11 +00:00
Michael Vines
b511e51415
Define BPF_OUT_DIR for program-test, also handle -- arguments better
2020-11-05 14:29:17 -08:00
Michael Vines
77d9d06a44
Search BPF_OUT_DIR for programs
2020-11-05 14:29:17 -08:00
Michael Vines
5a435a4342
Check file modification times before strip and dump
2020-11-05 14:29:17 -08:00
Michael Vines
6c36a2085f
Add cargo-test-bpf
2020-11-05 14:29:17 -08:00
Michael Vines
8c4995b22b
Improve invoke_signed() docs
2020-11-04 23:44:04 +00:00
Michael Vines
661a935075
Final program ELF is now placed in ./target/deploy/ instead of .
2020-11-04 23:03:55 +00:00
Jack May
f6a73098a4
Update sol_log_compute_units ( #13360 )
2020-11-03 08:16:31 -08:00
Tyera Eulberg
3a1e125ce3
Add Clock sysvar details, update struct docs
2020-10-31 21:30:42 -07:00
Tyera Eulberg
4260b3b416
Sample votes from ancestors back to root
2020-10-31 21:30:42 -07:00
Tyera Eulberg
90778615f6
Use bounded timestamp-correction when feature enabled
2020-10-31 21:30:42 -07:00
Tyera Eulberg
80db6c0980
Add bounded timestamp-estimation method
2020-10-31 21:30:42 -07:00
Tyera Eulberg
0049ab69fb
Repurpose unused as Clock::epoch_start_timestamp; add gated update
2020-10-31 21:30:42 -07:00
Tyera Eulberg
96b8aa8bd1
Add bounding feature
2020-10-31 21:30:42 -07:00
Michael Vines
8acc47ee1b
MockInvokeContext::get_programs() implementation
2020-10-31 18:12:24 -07:00
Michael Vines
4b65e32f22
Move Feature struct to solana-program
2020-10-30 17:57:51 -07:00
Ryo Onodera
1df15d85c3
Fix tower/blockstore unsync due to external causes ( #12671 )
...
* Fix tower/blockstore unsync due to external causes
* Add and clean up long comments
* Clean up test
* Comment about warped_slot_history
* Run test_future_tower with master-only/master-slave
* Update comments about false leader condition
2020-10-30 19:31:23 +09:00
Michael Vines
da9548fd12
de-mut some InvokeContext methods
2020-10-30 09:20:09 +00:00
Jack May
72d41e5801
Update AccountInfo comments ( #13302 )
2020-10-30 08:16:44 +00:00
Michael Vines
da361afbb9
Revert "Updates rbpf to v0.2.0, ( #12951 )"
...
This reverts commit 6606590b81
.
2020-10-29 21:45:24 -07:00
Michael Vines
7d686b72a0
Add Bank::set_bpf_compute_budget()
2020-10-29 21:45:24 -07:00
Michael Vines
66e51a7363
Add sol_log_compute_units syscall
2020-10-29 21:45:24 -07:00
Michael Vines
225bed11c7
Remove Entrypoint type
2020-10-29 21:45:24 -07:00
Michael Vines
df8dab9d2b
Native/builtin programs now receive an InvokeContext
2020-10-29 21:45:24 -07:00
Jack May
b5c8b86e7c
clarify comment ( #13289 )
2020-10-29 21:16:01 +00:00
Jack May
c458d4b213
move Account to solana-sdk ( #13198 )
2020-10-28 22:01:07 -07:00
Michael Vines
92d6521a7f
Add try_find_program_address()
2020-10-28 19:34:51 -07:00
Ryo Onodera
7d2962135d
Use pico inflation for ledger-tool capitalization --enable-inflation ( #13215 )
...
* Use pico inflation for ledger-tool capitalization --enable-inflation
* rust fmt
2020-10-28 15:30:39 +09:00
Jack May
4e0d1b1d4a
more portable install.sh ( #13114 )
2020-10-27 22:43:34 -07:00
Jack May
26eba5ac7d
Fix pr crossing for sysvar keyed-accounts ( #13189 )
2020-10-26 21:59:32 -07:00
Jack May
322c667655
check sysvar id for AccountInfo ( #13175 )
2020-10-26 20:38:45 -07:00
Michael Vines
1b343665a1
Move KeyedAccount out of solana-program. Native programs are not supported by solana-program
2020-10-26 18:54:54 -07:00
Jack May
e3c0cc980b
fix .gitignore ( #13177 )
2020-10-27 00:42:26 +00:00
Jack May
fc83a666fc
macos portable rust-bpf ( #13176 )
2020-10-27 00:11:33 +00:00
Michael Vines
c4fb77f057
Delete .lib.rs.swo
2020-10-26 16:01:25 -07:00
Michael Vines
0cc9c94c43
Rename "everything" feature to "full"
2020-10-24 17:26:11 +00:00
Michael Vines
a4956844bd
Update frozen_abi hashes
...
The movement of files in sdk/ caused ABI hashes to change
2020-10-24 08:37:55 -07:00
Michael Vines
dd711ab5fb
Rename solana-program-sdk to solana-program
2020-10-24 08:37:55 -07:00
Michael Vines
85c51f5787
Only activate legacy program feature for the solana-sdk crate
2020-10-24 08:37:55 -07:00
Michael Vines
63db324204
Initial population of solana-program-sdk
2020-10-24 08:37:55 -07:00
Michael Vines
3718771ffb
Add solana-program-sdk boilerplate
2020-10-24 08:37:55 -07:00
Michael Vines
b169d9cfbe
Add --bpf-out-dir argument to control where the final build products land
2020-10-23 04:57:03 +00:00
Michael Vines
959880db60
Remove unused pubkey::Pubkey imports
2020-10-21 19:08:13 -07:00
Michael Vines
7bc073defe
Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand`
2020-10-21 19:08:13 -07:00
Michael Vines
76f11c7dae
Add hash_new_rand(), mark Hash::new_rand() as deprecated
2020-10-21 19:08:13 -07:00
Michael Vines
0e68ed6a8d
Add pubkey_new_rand(), mark Pubkey::new_rand() deprecated
2020-10-21 19:08:13 -07:00
Michael Vines
61be155413
Remove do.sh
2020-10-21 18:56:40 -07:00
Michael Vines
07a853d6cc
Add cargo-build-bpf
2020-10-21 18:56:40 -07:00
Tyera Eulberg
46d0019955
Parse stake and system instructions ( #13035 )
...
* Fix token account check
* Add helper to check num accounts
* Add parse_stake
* Add parse_system
* Fix AuthorizeNonce docs
* Remove jsonParsed unstable markers
* Clippy
2020-10-20 21:02:17 -06:00
Michael Vines
6858950f76
Remove frozen ABI modules from solana-sdk
2020-10-20 16:11:30 -07:00
Jon Cinque
81d0c8ae7f
Force unset CARGO to use correct version of cargo ( #13027 )
2020-10-20 14:50:34 -07:00
sakridge
83c53ae4b5
Fix secp256k1 instruction indexing and add tests ( #13026 )
2020-10-20 14:13:24 -07:00
Michael Vines
c5e16383b0
Add everything feature
2020-10-19 17:21:52 -07:00
Michael Vines
9c53e1dfb2
Add SyscallStubs to enable syscall interception when building programs for non-BPF
2020-10-19 21:00:17 +00:00
Ryo Onodera
54517ea454
Follow up to persistent tower with tests and API cleaning ( #12350 )
...
* Follow up to persistent tower
* Ignore for now...
* Hard-code validator identities for easy reasoning
* Add a test for opt. conf violation without tower
* Fix compile with rust < 1.47
* Remove unused method
* More move of assert tweak to the asser pr
* Add comments
* Clean up
* Clean the test addressing various review comments
* Clean up a bit
2020-10-19 16:37:03 +09:00
Jack May
3f9e6a600b
program log pubkey as base58 ( #12901 )
2020-10-15 09:11:54 -07:00
Jack May
969f7b015b
Respect RefCell when calling invoke ( #12858 )
...
* Respect RefCell when calling invoke
* nudge
2020-10-15 01:06:41 +00:00
Jack May
d4e953277e
Expose program error constants ( #12861 )
2020-10-14 00:38:08 -07:00
Jack May
56211378d3
terminology update, nonce to bump seed ( #12840 )
2020-10-13 10:11:08 -07:00
Eric Williams
1ab36203de
Retry inflation parameter update along with documentation updates ( #12778 )
...
* update initial inflation parameter
* update economics section of docs
2020-10-12 13:10:57 -07:00
Michael Vines
403790760c
Default to 50% rent burn
2020-10-09 21:52:31 -07:00
Jack May
9ac8db3533
document program address collisions ( #12774 )
2020-10-09 23:19:41 +00:00
Tyera Eulberg
b028c47d2b
Correct Bank timestamp drift every slot ( #12737 )
...
* Move timestamp helper to sdk
* Add Bank method for getting timestamp estimate
* Return sysvar info from Bank::clock
* Add feature-gated timestamp correction
* Rename unix_timestamp method to be more descriptive
* Review comments
* Add timestamp metric
2020-10-09 21:53:41 +00:00
carllin
c879e7c1ad
Fix fee mismatch on snapshot deserialize ( #12697 )
...
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-08 23:44:41 -07:00
Michael Vines
11df2e2236
Bump version to v1.5.0
2020-10-08 04:51:36 +00:00
Michael Vines
2c38865e70
Revert "Inflation cli fix and parameter update ( #12709 )"
...
This reverts commit b3f695c83f
.
2020-10-07 19:43:15 -07:00
Jack May
dd7fae4afb
Fix syscall featurization ( #12714 )
...
* Fix syscall featurization
* nudge
2020-10-07 18:38:38 -07:00
Eric Williams
b3f695c83f
Inflation cli fix and parameter update ( #12709 )
...
update initial inflation parameter to reflect current design
2020-10-07 17:12:32 -07:00
Jack May
41ad3dd8f0
Remove skip-no-mangle entirely ( #12696 )
2020-10-07 09:13:48 -07:00
Jack May
630eb3b907
Local program allocator ( #12679 )
2020-10-06 11:03:51 -07:00
Jack May
bff3825298
Remove unnecessary skip-no-mangle feature from sdk ( #12684 )
2020-10-06 11:03:29 -07:00
Tyera Eulberg
865d01c38d
Fix TransactionStatusMeta breakage in blockstore ( #12587 )
...
* Add helper to facilitate deserializing legacy structs
* Use default_on_eof to fix blockstore vis-a-vis TransactionStatusMeta
* Add should-panic test and comments
2020-09-30 11:49:35 -06:00
Jack May
058bca6632
add sha256 syscall ( #12569 )
2020-09-29 23:29:20 -07:00
Trent Nelson
3c7b9c2938
Move remaining nonce utils from runtime to SDK
2020-09-30 05:45:42 +00:00
Trent Nelson
65b868f4eb
Move nonced tx helpers to SDK
2020-09-30 05:45:42 +00:00
Jack May
2ff983647f
Move process_instruction defs to runtime ( #12507 )
2020-09-29 01:36:46 -07:00
Michael Vines
aa5c008fa8
Add pico-inflation feature
2020-09-28 08:25:00 -07:00
Michael Vines
c10da16d7b
Port instructions sysvar and secp256k1 program activation to FeatureSet
2020-09-25 11:40:36 -07:00
Jack May
b8c4b88188
Cleanup names, fix line dependent test ( #12477 )
2020-09-25 09:00:06 -07:00
Trent Nelson
07dfa37cce
Add `Signers` impl for `Vec<Box<dyn Signer>>`
2020-09-25 07:12:04 +00:00
behzad nouri
bb183938d9
adds an atomic variant of the bloom filter ( #12422 )
...
For crds_gossip_pull, we want to parallelize build_crds_filters, which
requires concurrent writes to bloom filters.
This commit implements a variant of the bloom filter which uses atomics
for its bits vector and so is thread-safe.
2020-09-24 18:37:19 +00:00
Justin Starry
6601ec8f26
Record and store invoked instructions in transaction meta ( #12311 )
...
* Record invoked instructions and store in transaction meta
* Enable cpi recording if transaction sender is some
* Rename invoked to innerInstructions
2020-09-24 22:36:22 +08:00
Jack May
65049bd112
Bump rust-bpf to v0.2.4 ( #12361 )
2020-09-20 23:10:50 +00:00
sakridge
22d8b3c3f8
Cleanup and feature gate instruction processing ( #12359 )
2020-09-20 10:58:12 -07:00
sakridge
f561eb917f
Add way to look at tx instructions ( #11943 )
2020-09-19 12:17:46 -07:00
Ryo Onodera
cb8661bd49
Persistent tower ( #10718 )
...
* Save/restore Tower
* Avoid unwrap()
* Rebase cleanups
* Forcibly pass test
* Correct reconcilation of votes after validator resume
* d b g
* Add more tests
* fsync and fix test
* Add test
* Fix fmt
* Debug
* Fix tests...
* save
* Clarify error message and code cleaning around it
* Move most of code out of tower save hot codepath
* Proper comment for the lack of fsync on tower
* Clean up
* Clean up
* Simpler type alias
* Manage tower-restored ancestor slots without banks
* Add comment
* Extract long code blocks...
* Add comment
* Simplify returned tuple...
* Tweak too aggresive log
* Fix typo...
* Add test
* Update comment
* Improve test to require non-empty stray restored slots
* Measure tower save and dump all tower contents
* Log adjust and add threshold related assertions
* cleanup adjust
* Properly lower stray restored slots priority...
* Rust fmt
* Fix test....
* Clarify comments a bit and add TowerError::TooNew
* Further clean-up arround TowerError
* Truly create ancestors by excluding last vote slot
* Add comment for stray_restored_slots
* Add comment for stray_restored_slots
* Use BTreeSet
* Consider root_slot into post-replay adjustment
* Tweak logging
* Add test for stray_restored_ancestors
* Reorder some code
* Better names for unit tests
* Add frozen_abi to SavedTower
* Fold long lines
* Tweak stray ancestors and too old slot history
* Re-adjust error conditon of too old slot history
* Test normal ancestors is checked before stray ones
* Fix conflict, update tests, adjust behavior a bit
* Fix test
* Address review comments
* Last touch!
* Immediately after creating cleaning pr
* Revert stray slots
* Revert comment...
* Report error as metrics
* Revert not to panic! and ignore unfixable test...
* Normalize lockouts.root_slot more strictly
* Add comments for panic! and more assertions
* Proper initialize root without vote account
* Clarify code and comments based on review feedback
* Fix rebase
* Further simplify based on assured tower root
* Reorder code for more readability
Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-19 14:03:54 +09:00
Tyera Eulberg
58542cf7f6
Add Pack and COption to sdk ( #12294 )
...
* Add COption to sdk
* Add Pack to sdk
* Except program_option from nits check
* No Default::default
2020-09-17 21:10:02 -06:00
sakridge
3930cb865a
Add keccak-secp256k1 instruction ( #11839 )
...
* Implement keccak-secp256k1 instruction
Verifies eth addreses with ecrecover function
* Move secp256k1 test
2020-09-15 18:23:21 -07:00
Jack May
5ab4109b7e
Add memory allocation support for C programs ( #12254 )
2020-09-15 16:42:20 -07:00
Jack May
3278d78f08
Cache re-usable work performed by the loader ( #12135 )
2020-09-14 17:42:37 -07:00
carllin
3c69cd6d61
Update commitment options ( #12173 )
2020-09-11 11:19:06 -07:00
Ryo Onodera
de4a613610
Check bank capitalization ( #11927 )
...
* Check bank capitalization
* Simplify and unify capitalization calculation
* Improve and add tests
* Avoid overflow and inhibit automatic restart
* Fix test
* Tweak checked sum for cap. and add tests
* Fix broken build after merge conflicts..
* Rename to ClusterType
* Rename confusing method
* Clarify comment
* Verify cap. in rent and inflation tests
Co-authored-by: Stephen Akridge <sakridge@gmail.com>
2020-09-12 01:48:06 +09:00
Ryo Onodera
53b8ea4464
Rename to ClusterType and restore devnet compat. ( #12068 )
...
* Rename to ClusterType and restore devnet compat.
* De-duplicate parse code and add comments
* Adjust default Devnet genesis & reduce it in tests
2020-09-08 23:55:09 +09:00
Ryo Onodera
89bca6110a
Clarify comments and names in inflation code ( #11977 )
2020-09-03 14:15:12 +09:00
Michael Vines
29cfbce21d
Revert "Remove ::solana_sdk hack ( #11326 )"
...
This reverts commit c099b29b36
.
2020-09-02 15:24:38 -07:00
carllin
af08221aec
Switch account hashing to blake3 ( #11969 )
...
* Switch account hashing to blake3
Co-authored-by: Carl <carl@solana.com>
2020-09-02 00:37:36 -07:00
Jack May
0ed360b5e5
fix program test stubs ( #11956 )
...
* fix program tset stubs
* nudge
2020-08-31 21:48:16 -07:00
Jack May
ae0fd3043a
Add support for deprecated loader ( #11946 )
2020-08-31 14:06:58 -07:00
Jon Cinque
8c43a3da32
Update nofile flag in Docker to run Solana
...
Currently, the Solana Docker container does not start because it
requires `nofile` to be at least 500000, and the default behavior is
1024.
This fixes the documentation and running script to properly set the ulimit to
500000.
2020-08-28 16:49:28 -07:00
Jack May
ea179ad762
Bump compute budget ( #11864 )
...
* Bump compute budget
* nudge
2020-08-26 21:48:51 +00:00
Jack May
db4bbb3569
Switch programs activation to whole-set based gating ( #11750 )
...
* Implement Debug for MessageProcessor
* Switch from delta-based gating to whole-set gating
* Remove dbg!
* Fix clippy
* Clippy
* Add test
* add loader to stable operating mode at proper epoch
* refresh_programs_and_inflation after ancestor setup
* Callback via snapshot; avoid account re-add; Debug
* Fix test
* Fix test and fix the past history
* Make callback management stricter and cleaner
* Fix test
* Test overwrite and frozen for native programs
* Test epoch callback with genesis-programs
* Add assertions for parent bank
* Add tests and some minor cleaning
* Remove unsteady assertion...
* Fix test...
* Fix DOS
* Skip ensuring account by dual (whole/delta) gating
* Fix frozen abi implementation...
* Move compute budget constatnt init back into bank
Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-08-26 01:49:15 +09:00
Jon Cinque
9a366281d3
sdk: Make PubKey::create_program_address available in program unit tests ( #11745 )
...
* sdk: Make PubKey::create_program_address available in program unit tests
This finishes the work started in #11604 to have
`create_program_address` available when `target_arch` is not `bpf` and
`program` is enabled. Otherwise, there is an undefined reference error
to `sol_create_program_address`, which is only defined in `bpf`.
A small test to simply call the function has been added in order to catch
the problem in the future.
The default dependency to `solana-sdk/default` doesn't cause a problem with
existing programs since `build.sh` always specifies
`--no-default-features`, and programs in `solana-program-library` all
use it too.
* Add `default-features = false` for inter-program dependencies
Fix the build error found during CI. The `--no-default-features` flag
only applies to the top-level package, and not to dependencies. A program that
depends on another program, i.e. `128bit` which depends on `128bit_dep`,
must specify `default-features = false` when including that package,
otherwise the `bpf` build will try to pull in default packages, which
includes `std`.
2020-08-24 19:28:36 +02:00
Jack May
8d362f682b
The constraints on compute power a program can consume is limited only to its instruction count ( #11717 )
2020-08-21 15:31:19 -07:00
Greg Fitzgerald
f02a78d8ff
Add StakeInstruction::AuthorizeWithSeed ( #11700 )
...
* Add StakeInstruction::AuthorizeWithSeed
* chore: add authorize-with-seed to web.js
* fix: add address_owner
* Add SystemInstruction::TransferWithSeed
* Update ABI hash
* chore: better variable names
* Add AuthorizeWithSeedArgs
* Reorder and rename arguments for clarity
2020-08-21 18:28:01 +00:00
Aaron Hill
c099b29b36
Remove ::solana_sdk hack ( #11326 )
...
Fixes #10933
Now that https://github.com/rust-lang/rust/pull/72121 has been merged,
using a `$crate` path from a nested `macro_rules!` will work properly
across multiple crates. This allows us to stop using `::solana_sdk`
to reference to the `respan!` macro.
2020-08-18 17:59:41 +00:00
Michael Vines
d15173ad9d
Address latest nightly clippy lints, but globally disable stable_sort_primitive
2020-08-17 22:36:10 -07:00
Jack May
e9b610b8df
Add SystemInstruction::CreateAccount support to CPI ( #11649 )
2020-08-17 13:38:42 -07:00
Jack May
f1ba2387d3
More efficient padding ( #11656 )
2020-08-17 10:24:34 -07:00
Jack May
768b386f0a
fix region checks ( #11651 )
2020-08-16 23:11:52 -07:00
Jack May
7c736f71fe
Make BPF Loader static ( #11516 )
2020-08-14 12:32:45 -07:00
Trent Nelson
30dbe257cf
Reimplement decode_len() with ShortU16 vistor helper
2020-08-14 08:17:52 -06:00
Trent Nelson
6222fbcc66
Factor out ShortU16 deser vistor logic to helper
2020-08-14 08:17:52 -06:00
Trent Nelson
338f66f9aa
Add failing test for decoding ShortU16 alias values
2020-08-14 08:17:52 -06:00
Jack May
9290e561e1
Align host addresses ( #11384 )
...
* Align host addresses
* support new program abi
* update epoch rollout
* Enforce aligned pointers in cross-program invocations
2020-08-11 16:11:52 -07:00
Ryo Onodera
6c242f3fec
Fix bad rent in Bank::deposit as if since epoch 0 ( #10468 )
...
* Fix bad rent in Bank::deposit as if since epoch 0
* Remove redundant predicate
* Rename
* Start to add tests with some cleanup
* Forgot to add refactor code...
* Enchance test
* Really fix rent timing in deposit with robust test
* Simplify new behavior by disabling rent altogether
2020-08-12 00:04:32 +09:00
Jack May
140b2392f6
Unified signature for create_program_address ( #11460 )
2020-08-10 10:24:11 -07:00
Jack May
5a7e99f283
Fix cbindgen compatibility ( #11455 )
2020-08-07 15:13:48 -07:00