Trent Nelson
92e343da26
move `./run.sh` into `./scripts`
2021-09-11 14:49:17 -06:00
Sean Young
098585234d
Add return data implementation
...
This consists of:
- syscalls
- passing return data from invoked to invoker
- printing to stable log
- rust and C SDK changes
2021-09-10 14:25:54 +01:00
Alexander Meißner
88c1b8f047
Index loaders / executable accounts ( #19469 )
...
* Appends loaders / executable_accounts to accounts in transaction loading.
* Adds indices to loaders / executable_accounts.
* Moves MessageProcessor::create_keyed_accounts() into InvokeContext::push().
* Removes "executable_accounts",
now referenced by transaction wide index into "accounts".
* Removes create_pre_accounts() from InstructionProcessor,
as it is already in MessageProcessor.
* Collect program account indices directly in load_executable_accounts().
2021-09-10 08:36:21 +02:00
Tyera Eulberg
38bbb77989
Return error if Transaction contains writable executable or ProgramData accounts ( #19629 )
...
* Return error if Transaction locks an executable as writable
* Return error if a ProgramData account is writable but the upgradable loader isn't present
* Remove unreachable clause
* Fixup bpf tests
* Review comments
* Add new TransactionError
* Disallow writes to any upgradeable-loader account when loader not present; remove is_upgradeable_loader_present exception for all other executables
2021-09-08 15:21:52 -06:00
Jack May
778b2adbea
Check seed length before trying to cal program address ( #19699 )
2021-09-07 21:37:24 -07:00
Jack May
529fefc7cc
Remove native id check in pda creation ( #19595 )
2021-09-07 14:44:52 -07:00
Justin Starry
76176a4620
Recover from interrupted bpf sdk installs ( #19651 )
2021-09-06 01:59:58 -07:00
Sean Young
8b9e472a6c
feat: add ed25519 signature verify program
...
Solang requires a method for verify ed25519 signatures. Add a new
builtin program at address Ed25519SigVerify111111111111111111111111111
which takes any number of ed25519 signature, public key, and message.
If any of the signatures fails to verify, an error is returned.
The changes for the web3.js package will go into another commit, since
the tests test against a released solana node. Adding web3.js ed25519
testing will break CI.
2021-09-05 18:59:37 +01:00
Sean Young
d461a9ac10
verify_precompiles needs FeatureSet
...
Rather than pass in individual features, pass in the entire feature set
so that we can add the ed25519 program feature in a later commit.
2021-09-05 18:59:37 +01:00
Tyera Eulberg
decec3cd8b
Demote write locks on transaction program ids ( #19593 )
...
* Add feature
* Demote write lock on program ids
* Fixup bpf tests
* Update MappedMessage::is_writable
* Comma nit
* Review comments
2021-09-04 03:05:30 +00:00
Jon Cinque
2c3bdedea3
stake: Advance `credits_observed` on activation epoch ( #19309 )
...
* stake: Advance `credits_observed` on activation epoch
* Add test for merging stakes just after activation
2021-09-03 23:20:56 +02:00
Jack May
5cf8d8795b
Feature cleanup ( #19528 )
2021-08-31 14:51:26 -07:00
dependabot[bot]
c21bf29ce7
chore: bump serde_json from 1.0.66 to 1.0.67 ( #19501 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.66 to 1.0.67.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.66...v1.0.67 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 06:05:25 +00:00
dependabot[bot]
dc3d7ad2bd
chore: bump sha2 from 0.9.5 to 0.9.6 ( #19511 )
...
* chore: bump sha2 from 0.9.5 to 0.9.6
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.9.5 to 0.9.6.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.5...sha2-v0.9.6 )
---
updated-dependencies:
- dependency-name: sha2
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-08-30 19:58:26 -06:00
Kenta Iwasaki
4ad7069827
cargo-build-bpf: allow sdk path to be set by environment variables
...
In many Linux distros such as NixOS, the directory in which packages are
installed is assumed to be read-only. To work around this, it is
expected that the filepaths which packaged CLI tools take in are able to
be freely configured through either 1) command-line flags, 2)
environment variables, or 3) a configuration file.
In this commit, environment variables 'BPF_SDK_PATH' and 'BPF_OUT_PATH',
which map respectively to command-line flags '--bpf-sdk-path' and
'--bpf-out-dir', are now handled in cargo-build-bpf.
Additionally, given that arbitrary filepaths may now be set in which the
BPF SDK is located, the requirement in which
'$BPF_SDK_PATH/dependencies/bpf-tools' must strictly be a symbolic link
to the directory '$HOME/.cache/solana/${bpf-tools.version}/bpf-tools has
been relaxed.
Ideally, the directory in which bpf-tools is expected to be downloaded
to and stored should be configurable. Though, this commit serves as a
temporary fix which enables NixOS users to now start being able to build
applications with the Solana SDK.
2021-08-30 23:11:48 +02:00
dependabot[bot]
6a53ec28e0
chore: bump serde from 1.0.129 to 1.0.130 ( #19497 )
...
* chore: bump serde from 1.0.129 to 1.0.130
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.129 to 1.0.130.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.129...v1.0.130 )
---
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 <you@example.com>
2021-08-30 18:19:34 +00:00
dependabot[bot]
f19ff84593
chore: bump pbkdf2 from 0.8.0 to 0.9.0 ( #19492 )
...
* chore: bump pbkdf2 from 0.8.0 to 0.9.0
Bumps [pbkdf2](https://github.com/RustCrypto/password-hashes ) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/RustCrypto/password-hashes/releases )
- [Commits](https://github.com/RustCrypto/password-hashes/commits )
---
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 <anatoly+githubjenkins@solana.io>
2021-08-30 09:36:40 -06:00
behzad nouri
6909a79b6f
removes require-stake-for-gossip feature ( #19476 )
...
The feature is already activated on all clusters.
2021-08-27 21:17:15 +00:00
Justin Starry
c52d3736e8
Clean up feature set entries ( #19427 )
...
* Clean up feature set entries
* fix test
* bump
2021-08-25 13:57:27 -07:00
dependabot[bot]
46890ac197
chore: bump serde from 1.0.128 to 1.0.129 ( #19395 )
...
* chore: bump serde from 1.0.128 to 1.0.129
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.128 to 1.0.129.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.128...v1.0.129 )
---
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 <you@example.com>
2021-08-24 12:32:30 -06:00
Jack May
a89f180145
Allow closing upgradeable program accounts ( #19319 )
2021-08-24 10:05:54 -07:00
Brooks Prumo
96360f3139
clippy: Use `unwrap_or_default()`
...
Clippy was unhappy:
```text
error: use of `.unwrap_or_else(..)` to construct default value
--> sdk/src/signer/keypair.rs:171:27
|
171 | let derivation_path = derivation_path.unwrap_or_else(DerivationPath::default);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `derivation_path.unwrap_or_default()`
|
= note: `-D clippy::unwrap-or-else-default` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_else_default
```
2021-08-23 11:17:21 -05:00
dependabot[bot]
aea9960c75
chore: bump serde from 1.0.127 to 1.0.128 ( #19370 )
...
* chore: bump serde from 1.0.127 to 1.0.128
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.127 to 1.0.128.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.127...v1.0.128 )
---
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 <anatoly+githubjenkins@solana.io>
2021-08-23 09:33:34 -06:00
jon-chuang
3e5ba8dcaa
bug: `sysvar::Instructions` is not owned by `Sysvar1111111111111111111111111111111111111` ( #19242 )
...
* Fix instructions sysvar owner
* Update feature switch address
Co-authored-by: Justin Starry <justin@solana.com>
2021-08-20 08:32:28 -07:00
Jon Cinque
73aa004c59
stake: Remove v2 program references ( #19308 )
...
* stake: Remove v2 program references
* Remove stake v2 feature, along with stake rewrite
2021-08-20 01:08:44 -04:00
Jack May
3ec33e7d02
Fail secp256k1 if the instruction data looks incorrect ( #19300 )
2021-08-19 13:13:54 -07:00
Jack May
e1fb45bd3f
nit: fix case ( #19321 )
2021-08-19 09:46:06 -07:00
Jeff Washington (jwash)
89a31ff473
change untar to use unpack instead of unpack_in ( #19216 )
...
* change untar to use unpack instead of unpack_in
* hacky, but maybe passes tests
* chore: bump tar from 0.4.35 to 0.4.37
Bumps [tar](https://github.com/alexcrichton/tar-rs ) from 0.4.35 to 0.4.37.
- [Release notes](https://github.com/alexcrichton/tar-rs/releases )
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.35...0.4.37 )
---
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
* cleanup
* cleanup, add validate_inside_dst
* collapse use
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* delete comment line
* add comments
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 <teulberg@gmail.com>
2021-08-18 15:49:02 -05:00
Justin Starry
c50b01cb60
Store versioned transactions in the ledger, disabled by default ( #19139 )
...
* Add support for versioned transactions, but disable by default
* merge conflicts
* trent's feedback
* bump Cargo.lock
* Fix transaction error encoding
* Rename legacy_transaction method
* cargo clippy
* Clean up casts, int arithmetic, and unused methods
* Check for duplicates in sanitized message conversion
* fix clippy
* fix new test
* Fix bpf conditional compilation for message module
2021-08-17 15:17:56 -07:00
dependabot[bot]
098e2b2de3
chore: bump memmap2 from 0.3.0 to 0.3.1 ( #19255 )
...
* chore: bump memmap2 from 0.3.0 to 0.3.1
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs ) from 0.3.0 to 0.3.1.
- [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/v.0.3.0...v0.3.1 )
---
updated-dependencies:
- dependency-name: memmap2
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-08-17 15:49:50 -06:00
Justin Starry
fd33f523ab
Generate packet offsets for versioned messages ( #19138 )
...
* Add support for generating packet offsets for new versioned message
* Remove outdated test
* match over version
2021-08-16 17:55:15 -07:00
Jack May
9be988db41
Fix memoverlap check ( #19232 )
2021-08-16 16:16:52 -07:00
Kirill Fomichev
d10e37a829
add test for AsRef
2021-08-15 07:43:50 -07:00
Kirill Fomichev
930465e67c
Add AsRef<AccountInfo> for AccountInfo
2021-08-15 07:43:50 -07:00
Jack May
04c0c608a3
Split solana_sdk.h ( #19172 )
2021-08-13 09:49:24 -07:00
Jack May
0b50bb2b20
Deprecate FeeCalculator returning APIs ( #19120 )
2021-08-13 09:08:20 -07:00
Tao Zhu
414d904959
Reject blocks for costs above the max block cost ( #18994 )
...
* added realtime cost checking logic to reject block that would exceed max limit:
- defines max limits at block_cost_limits.rs
- right after each bath's execution, accumulate its cost and check again
limit, return error if limit is exceeded
* update abi that changed due to adding additional TransactionError
* To avoid counting stats mltiple times, only accumulate execute-timing when a bank is completed
* gate it by a feature
* move cost const def into block_cost_limits.rs
* redefine the cost for signature and account access, removed signer part as it is not well defined for now
* check if per_program_timings of execute_timings before sending
2021-08-12 10:48:47 -05:00
Alexander Meißner
85befbc8cd
Removes bpf_loader_upgradeable_program feature gate. ( #19102 )
2021-08-11 00:08:57 +02:00
Dmitri Makarov
d6a2b70438
Bump bpf-tools to v1.15 ( #19117 )
...
- update to rust 1.54.0
2021-08-10 07:21:14 +00:00
Justin Starry
8817f59b6e
Version transaction message and add new message format ( #18725 )
...
* Version transaction message and add new message format
* Update abi digest due to message path change
* Update v0.rs
Fix comment
* Update original.rs
* Update message versions name and address map indexes field name
* s/original/legacy
* update comment
* cargo fmt
* Update abi digest due to legacy rename
2021-08-09 22:03:39 -07:00
Brian Anderson
b67ffab370
Add more API documentation for Rust RpcClient ( #19021 )
...
* Add doc links to Transaction API docs
* Add more RpcClient API docs
* Reflow some rpc_client docs
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update client/src/rpc_client.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update sdk/src/transaction.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Update RpcClient docs per review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-08-05 15:03:33 -06:00
Trent Nelson
d60ccf64e1
bump recommended maps/nofiles
2021-08-04 11:15:18 -06:00
dependabot[bot]
6d95d679c4
chore: bump curve25519-dalek from 3.1.0 to 3.2.0 ( #19051 )
...
* chore: bump curve25519-dalek from 3.1.0 to 3.2.0
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ) from 3.1.0 to 3.2.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.1.0...3.2.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-08-04 09:14:32 -06:00
Jon Cinque
2b33c0c165
stake: Allow stakes with unmatched credits observed to merge ( #18985 )
...
* stake: Allow stakes with unmatched credits observed to merge
* Address feedback
* Remove branch by doing a ceiling in one calc
2021-08-04 10:43:34 -04:00
Alexander Meißner
0a63f65c03
Bumps solana_rbpf to v0.2.14 ( #18869 )
...
* Bumps solana_rbpf to v0.2.14
* Feature gate for verify_mul64_imm_nonzero as discussed in #17520 .
2021-08-04 09:50:28 +02:00
Dmitri Makarov
cde1461555
Bump bpf-tools to v1.14 ( #19023 )
...
- improved memory operations performance
- minor fixes
2021-08-03 09:13:58 +00:00
dependabot[bot]
c16bf02448
chore: bump serde from 1.0.126 to 1.0.127 ( #19010 )
...
* chore: bump serde from 1.0.126 to 1.0.127
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.126 to 1.0.127.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.126...v1.0.127 )
---
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 <you@example.com>
2021-08-02 21:16:34 +00:00
Jack May
77861e2d40
Feature disable fees sysvar ( #18981 )
...
* Feature disable fees sysvar
* nudge
2021-08-02 00:31:11 +00:00
Trent Nelson
21bc43ed58
nonce: Unify `NonceError` with `SystemError`
2021-07-30 14:47:14 -06:00
dependabot[bot]
fe1ee49807
chore: bump serde_json from 1.0.65 to 1.0.66 ( #18990 )
...
* chore: bump serde_json from 1.0.65 to 1.0.66
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.65 to 1.0.66.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.65...v1.0.66 )
---
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>
2021-07-30 10:46:47 -06:00
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