Dmitri Makarov
dcce90555b
Bump sbf-tools to v1.27
2022-05-19 21:56:56 +00:00
Dmitri Makarov
569b00025c
fix: replace rust cfg annotations that use bpf by target_os solana
2022-05-18 20:39:43 -07:00
Justin Starry
a1522d0024
Use consistent naming for compute unit limit ( #25229 )
...
* Use consistent naming for compute unit limit
* feedback
2022-05-18 13:14:31 +08:00
Jack May
21e066ef26
Merge pull request from GHSA-wxrh-ff9f-fc6w
2022-05-16 12:30:37 -07:00
Justin Starry
f81c5df1f0
Include account index in rent paying account tx error ( #25189 )
2022-05-16 23:35:34 +08:00
Tao Zhu
b1b3702e6d
Prioritize transactions in banking stage by their compute unit price ( #25178 )
...
* - get prioritization fee from compute_budget instruction;
- update compute_budget::process_instruction function to take instruction iter to support sanitized versioned message;
- updated runtime.md
* update transaction fee calculation for prioritization fee rate as lamports per 10K CUs
* review changes
* fix test
* fix a bpf test
* fix bpf test
* patch feedback
* fix clippy
* fix bpf test
* feedback
* rename prioritization fee rate to compute unit price
* feedback
Co-authored-by: Justin Starry <justin@solana.com>
2022-05-16 12:06:33 +08:00
Justin Starry
6c10515ccf
Revert "Serialize lamports per signature in snapshots ( #25181 )" ( #25228 )
...
This reverts commit 35d2a0fd69
.
2022-05-15 12:04:17 +00:00
Ashwin Sekar
35d2a0fd69
Serialize lamports per signature in snapshots ( #25181 )
...
* Serialize lamports per signature
* pr comments
2022-05-14 10:57:51 -07:00
Dmitri Makarov
3c70220142
Remove obsolete string C header input file
...
string.h doesn't contain any syscall declarations that need to be
processed by the gen-headers C header file generating utility.
2022-05-13 10:37:25 -07:00
Justin Starry
d8a8393994
Don't extract invoked keys from a message when using a lookup table ( #25065 )
...
* Refactor message compiled keys
* Prohibit invoked keys from being extracted by lookup table
2022-05-13 10:32:10 +08:00
Jack May
8902a66b20
Revert "Disallow deployment of deprecated _sol_alloc_free syscall ( #24986 )" ( #25170 )
...
This reverts commit 8f1d4c1665
.
2022-05-12 17:58:17 -05:00
Jack May
cde15ff687
support 64-bit prioritization fee ( #25027 )
2022-05-12 11:07:36 -07:00
Dmitri Makarov
9d18fe019b
Bump sbf-tools version to 1.26
2022-05-12 03:53:55 +00:00
Justin Starry
68800982ea
Add size_of const fns for upgradeable loader states ( #25131 )
2022-05-11 22:22:59 +08:00
Jack May
8f1d4c1665
Disallow deployment of deprecated _sol_alloc_free syscall ( #24986 )
...
* Disallow deployment of deprecated _sol_alloc_free syscall
* remove cli argument
2022-05-11 05:22:49 +00:00
Justin Starry
e3bdc38f0a
Add sanitized types for use in banking stage ( #25067 )
2022-05-11 00:30:48 +08:00
Jason
c80896b58f
speedup sysvar or builtin test ( #25047 )
...
* Add a quick lookup table to speed up sysvar/builtin key check
* Fix up the syntax
* Fix syntax
* Fix syntax 2
* Rename the static variable, improve commenting
* Fix merge error
* Fixed two clippy suggestions
* Improved commenting
2022-05-10 10:37:51 -05:00
Brian Anderson
8dd7aa9b40
Update sysvar module short docs ( #25070 )
2022-05-09 05:51:17 +00:00
samkim-crypto
aba6a89517
Curve25519 syscall group ops ( #25071 )
...
* zk-token-sdk: implement group ops trait for curve25519
* zk-token-sdk: extend syscall trait implementation for group ops for ristretto
* zk-token-sdk: register curve25519 group ops to bpf loader
* zk-token-sdk: update curve25519_syscall_enabled address
2022-05-08 11:28:07 +09:00
Brooks Prumo
e6c02f30dd
Raise minimum stake delegation to 1 SOL ( #24603 )
2022-05-07 19:01:05 -04:00
samkim-crypto
d9deab4d2c
Curve25519 point validation syscall ( #23771 )
...
* zk-token-sdk: add curve25519 basic ops
* zk-token-sdk: add bpf operations for curve25519 ops
* zk-token-sdk: rebase
* zk-token-sdk: add tests for curve25519 opertions
* zk-token-sdk: rustfmt
* zk-token-sdk: organize syscalls by trait
* zk-token-sdk: organize syscalls by trait
* zk-token-sdk: cleaning up
* zk-token-sdk: rename mods
* zk-token-sdk: cargo fmt
* zk-token-sdk: fix tests for edwards and ristretto
* zk-token-sdk: add Syscall object for curve point validation
* zk-token-sdk: docs for curve syscall traits
* zk-token-sdk: fix errors from rebase
* zk-token-sdk: update Vec to slice
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* zk-token-sdk: use enum with num-derive for curve ids
* zk-token-sdk: update vec to slice
* zk-token-sdk: make curve25519 tests be deterministic
* zk-token-sdk: rebase
* token-2022: re-organizing curve point validation
* token-2022: cargo fmt
* zk-token-sdk: minor
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-05-07 16:20:53 +09:00
Brian Anderson
c785f1ffc5
Fix indentation of Message API examples ( #25051 )
2022-05-06 14:50:43 -06:00
Justin Starry
082502d4f3
Fail tx sanitization when ix program id uses lookup table ( #25035 )
...
* Fail tx sanitization when ix program id uses lookup table
* feedback
2022-05-07 03:19:50 +08:00
Dmitri Makarov
66366615bb
Generate syscall headers
2022-05-05 19:50:54 -07:00
Jason
ee1b92c480
Reorder a boolean computation to speed up processing ( #24913 )
...
* Move a computation to where it's actually needed in is_writable(), which speeds up the code.
* Simplified a bool expr, even though it's a little less clear now
* Reorganize to make demote_program_id explicit again
* Remove the unnecessary let; replace it with a comment
* try different comment style
* Used cargo fmt that time
* Made demote_program_id its own function, for clarity
2022-05-05 15:19:06 -05:00
carllin
870ac80b79
Prioritize BankingStage packets individually in min-max heap ( #24187 )
2022-05-04 21:50:56 -05:00
dependabot[bot]
bece7f32c8
chore: bump log from 0.4.16 to 0.4.17 ( #24987 )
...
* chore: bump log from 0.4.16 to 0.4.17
Bumps [log](https://github.com/rust-lang/log ) from 0.4.16 to 0.4.17.
- [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/commits/0.4.17 )
---
updated-dependencies:
- dependency-name: log
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>
2022-05-05 01:49:18 +00:00
dependabot[bot]
61a9faae17
chore: bump serde_json from 1.0.80 to 1.0.81 ( #24960 )
...
* chore: bump serde_json from 1.0.80 to 1.0.81
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.80 to 1.0.81.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.80...v1.0.81 )
---
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 <you@example.com>
2022-05-04 14:57:38 -06:00
Jon Cinque
326e53be97
stake: Allow initialized stakes to be below the min delegation ( #24670 )
...
* stake: Allow initialized stakes to be below the min delegation
* Add PR number in feature
* Fixup RPC subscription test
* Address feedback pt 1
* Address feedback pt 2
* Update FrozenAbi Digest
* Address feedback: no new error type, more comments
2022-05-04 12:17:29 +02:00
dependabot[bot]
9258d81ba3
chore: bump serde from 1.0.136 to 1.0.137 ( #24957 )
...
* chore: bump serde from 1.0.136 to 1.0.137
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.136 to 1.0.137.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.137 )
---
updated-dependencies:
- dependency-name: serde
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>
2022-05-03 22:14:59 -06:00
dependabot[bot]
2c9d2a2140
chore: bump serde_json from 1.0.79 to 1.0.80 ( #24943 )
...
* chore: bump serde_json from 1.0.79 to 1.0.80
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.79 to 1.0.80.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.79...v1.0.80 )
---
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>
2022-05-03 13:46:45 -06:00
Jack May
e070c5ca38
default compute units per instruction ( #24899 )
2022-05-03 09:50:06 -07:00
Jon Cinque
b4503d4110
token: Add features for new program releases ( #24742 )
...
* token: Add features for new program releases
* Add PR number
2022-04-28 23:43:57 +02:00
Jack May
224e0b27a1
Simplify register and bind ( #24724 )
...
* Revert "Bumps solana_rbpf to v0.2.27 (#24694 )"
This reverts commit f3d27cc400
.
* Simplify syscall register and bind (#24546 )
* declare syscalls with macro (#24564 )
2022-04-28 10:24:42 +02:00
Ryo Onodera
412a5a0d33
Credits auto rewind on vote recreation ( #22546 )
...
* Credits auto rewind on vote recreation
* Update comment
* Improve comments and tests
* Recommended fn rename
* Restore old feature, and replace new feature key
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-04-26 15:49:35 -06:00
Michael Vines
533eadd024
Remove StakeState::get_rent_exempt_reserve()
2022-04-25 21:43:04 -07:00
Jeff Washington (jwash)
14ee36a2af
cleanup in vote/stake accounts ( #24608 )
...
* cleanup in vote/stake accounts
* reorder comparisons in accounts_equal
2022-04-23 08:28:21 -05:00
dependabot[bot]
3fda7aaa4d
chore: bump anyhow from 1.0.56 to 1.0.57 ( #24618 )
...
* chore: bump anyhow from 1.0.56 to 1.0.57
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.56...1.0.57 )
---
updated-dependencies:
- dependency-name: anyhow
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>
2022-04-22 23:34:34 -06:00
dependabot[bot]
b101e00ffa
chore: bump bytemuck from 1.8.0 to 1.9.1 ( #24604 )
...
* chore: bump bytemuck from 1.8.0 to 1.9.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.8.0 to 1.9.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.8.0...v1.9.1 )
---
updated-dependencies:
- dependency-name: bytemuck
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>
2022-04-22 20:50:47 -06:00
dependabot[bot]
948abf00ac
chore: bump pbkdf2 from 0.10.1 to 0.11.0 ( #24394 )
...
* chore: bump pbkdf2 from 0.10.1 to 0.11.0
Bumps [pbkdf2](https://github.com/RustCrypto/password-hashes ) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/RustCrypto/password-hashes/releases )
- [Commits](https://github.com/RustCrypto/password-hashes/compare/pbkdf2-v0.10.1...pbkdf2-v0.11.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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-22 10:47:19 -06:00
Brian Anderson
7206f894eb
Move solana_program::example_mocks declaration to appear last in source files ( #24577 )
2022-04-22 06:43:27 +00:00
behzad nouri
f937fcbd95
updates rewards at epoch boundary using cached accounts
...
Loading vote and stake accounts from accounts-db takes a significant
portion of time updating rewards at epoch boundary.
This commit bypasses accounts-db and instead uses vote and stake
accounts cached in bank stakes:
https://github.com/solana-labs/solana/blob/d2702201c/runtime/src/stakes.rs#L148-L152
These cached accounts are synchronized with accounts-db after each
transaction, and so there should not be any change in the resulting
computation:
https://github.com/solana-labs/solana/blob/d2702201c/runtime/src/bank.rs#L4526
Nevertheless, to avoid any chances of introducing a consensus issue, the
switch to cached account is feature gated.
2022-04-21 15:28:41 +00:00
Justin Starry
d5127abf46
Only add hashes for completed blocks to recent blockhashes ( #24389 )
...
* Only add hashes for completed blocks to recent blockhashes
* feedback
2022-04-21 21:05:29 +08:00
Brian Anderson
658752cda7
And short descriptions to all solana-program modules and macros. ( #24128 )
...
* And short descriptions to all solana-program modules and macros.
Also fill out some of the docs within these modules.
* Update sdk/program/src/lib.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/sanitize.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/pubkey.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update hash module docs
* Make solana-program crate docs match Pubkey docs
* Update sdk/program/src/program_memory.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-04-20 19:20:17 -06:00
dependabot[bot]
15e30add26
chore: bump js-sys from 0.3.55 to 0.3.57 ( #24485 )
...
* chore: bump js-sys from 0.3.55 to 0.3.57
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen ) from 0.3.55 to 0.3.57.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases )
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits )
---
updated-dependencies:
- dependency-name: js-sys
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>
2022-04-20 11:54:44 -06:00
Dmitri Makarov
6bf58572ca
Update llvm include path in C toolchain makefile
2022-04-19 21:38:36 -07:00
Jack May
5eb1ba402f
cpi charge for executables ( #24396 )
2022-04-19 19:31:11 -07:00
Justin Starry
2ad1baa753
Add const fn StakeState::size_of and static assertion ( #24416 )
2022-04-20 01:04:12 +08:00
Alexander Meißner
860ecd6572
Deprecate `KeyedAccount` and `StackFrame` ( #24480 )
...
* Marks KeyedAccount as deprecated.
* Marks StackFrame as deprecated.
2022-04-19 17:11:04 +02:00
Alexander Meißner
db3dd458a4
Reverts the feature removal of: ( #24476 )
...
Remove `NativeLoader` from program runtime (#24296 )
2022-04-19 17:10:35 +02:00