Commit Graph

2043 Commits

Author SHA1 Message Date
behzad nouri 5c9beef498
fixes errors from clippy::useless_conversion (#29534)
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
Yihau Chen d078c041d1
chore: add missing members back to workspace.members (#29450)
* frozen-abi/macro

* program-runtime

* sdk/macro

* sdk/program

* storage-bigtable/build-proto

* fix sorting
2023-01-04 13:22:00 +08:00
Jeff Washington (jwash) cf1aa4beea
feature: set rent_epoch to Epoch::MAX (#28690)
* check android builds

* feature: set rent_epoch to Epoch::MAX

* tweaks

* Update runtime/src/rent_collector.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* simplify changes to tests

* back out some test changes

* calculate_rent_result passes through Exempt

* move calc outside loop

* if rent epoch is already max, use 'NoRentCollectionNow'

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2023-01-02 07:51:08 -08:00
behzad nouri 456d06785d
experiments different turbine fanouts for propagating shreds (#29393)
The commit allocates 2% of slots to running experiments with different
turbine fanouts based on the slot number.
The experiment is feature gated with an additional feature to disable
the experiment.
2022-12-26 14:18:56 +00:00
Dmitri Makarov 2681720557
Re-enable cargo-build-sbf tests (#29415) 2022-12-25 07:25:22 -05:00
Dmitri Makarov 3a14e52eb7
Bump sbf-tools to v1.32 (#29325)
* Bump sbf-tools to v1.32

This version of sbf-tools is based on Rust 1.65.0 and LLVM 15.0.

* Temporary ignore build-sbf tests until issue with buildkite cache resolved
2022-12-24 11:34:12 -08:00
Dmitri Makarov b0c8e0ff03
Enable full output of cargo-build-sbf tests (#29411) 2022-12-24 09:28:44 -08:00
Dmitri Makarov 33946f5007
Add an option to reinstall sbf-tool binaries by cargo-build-sbf (#29410) 2022-12-24 08:54:55 -08:00
Jon Cinque 968b158494
vote: Prevent commission update in the second half of epochs (#29362)
* vote: Prevent commission update in the second half of epochs

* Address feedback

* Fix tests

* Make the feature enabled by single-contributor

* Use a cooler pubkey
2022-12-23 12:24:39 +01:00
Brian Anderson edd5f6f3be
Expand solana-sdk API docs. (#29063)
* Expand solana-sdk API docs.

* Update sdk/src/genesis_config.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/hard_forks.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/builtins.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/builtins.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/rpc_port.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/lib.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Clarify derivation_path docs

* 'entry point' -> 'entrypoint'

Co-authored-by: Tyera <teulberg@gmail.com>
2022-12-22 08:58:06 +00:00
Tyera 1e0d3931fd
Fix "tranaction" typo in code base (#29347)
Fix typos
2022-12-21 18:02:36 -07:00
Brennan Watt 86b2e545e1
Prune redundant const SLOT_MS (#29278)
* Alias redundant const SLOT_MS to DEFAULT_MS_PER_SLOT

* Slate SLOT_MS for deprecation

* Add doc comments

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-12-16 08:05:09 -08:00
Alexander Meißner 721496b900
Feature - Program redeployment cooldown (#29136)
* Registers the feature enable_program_redeployment_cooldown.

* Adds redeployment slot constraint.

* Adds test to assert that closed programs can not be reopened.

* Ensure that program close truncates the account data.

* Adds set_sysvar_for_tests() to SBF program tests.
2022-12-13 22:54:24 +01:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Jon Cinque b1340d77a2
sdk: Make Packet::meta private, use accessor functions (#29092)
sdk: Make packet meta private
2022-12-06 12:54:49 +01:00
ananas-block a901fccb00
remove unwraps in alt_bn128 syscall (#28955)
removed unwraps in alt_bn128 syscall
2022-12-02 10:30:10 +01:00
Alexander Meißner f766895f78
Adds a feature ID for `enable_alt_bn128_syscall` (#28908)
Adds a feature ID for enable_alt_bn128_syscall.
2022-12-01 09:58:23 +01:00
Jeff Washington (jwash) 7999f4278e
add feature #28934 (no-op in master) (#28936) 2022-11-28 14:58:59 -08:00
apfitzge bdd162492c
Feature/multi-iterator-scanner-read-locks (#28862) 2022-11-28 11:23:04 -06:00
Maximilian Schneider c8b0c3ede9
Update cost model to use requested_cu instead of estimated cu #27608 (#28281)
* Update cost model to use requested_cu instead of estimated cu #27608

* remove CostUpdate and CostModel from replay/tvu

* revive cost update service to send cost tracker stats

* CostModel is now static

* remove unused package

Co-authored-by: Tao Zhu <tao@solana.com>
2022-11-22 11:55:56 -06:00
apfitzge 76df864469
typo: failre to failure (#28822) 2022-11-21 12:54:28 -06:00
ananas-block afc3fee937
added alt_bn syscalls (#27961)
* added alt_bn128_syscalls

* increased regression build redundancy to > 10
2022-11-21 17:43:06 +01:00
bji 6dc7cd0845
Fixed warnings caused by redefined macros. Also fixed sol_memcpy to … (#28378)
Fixed warnings caused by redefined macros.  Also fixed sol_memcpy to have
the same signature as memcpy.
2022-11-20 03:42:17 +00:00
Lijun Wang ad24e37cc0
Limit the maximum staked streams to avoid excessive streams from staked nodes (#27973)
* Limit the maximum staked streams to avoid excessive streams from staked nodes.

* Fixed a clippy issue
2022-11-15 12:58:10 -08:00
Tao Zhu 81dc2e56ac
Cap accounts data a transaction can load by its requested limit (#27840)
- Add new compute-budget instruction to set transaction-wide accounts data size limit
- Set default accounts data limit to 10MB, and max to 100MB, per transaction;
- Add getters to make changing default and/or max values easier in the future with feature gates;
- added error counter for transactions exceed data size limit
2022-11-14 10:29:35 -06:00
Alexander Meißner 66d06b3f99
Revert #27444 (#28784)
* Removes SyscallSetAccountProperties.

* Removes TransactionContextAttribute.
2022-11-11 10:26:55 +01:00
Brian Anderson 7f8d37c011
Add missing solana-program docs (#28770) 2022-11-09 13:33:19 -07:00
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Alexander Meißner 93fc4edef8
Refactor - derive `CloneZeroed` (#28771)
* Adds proc_macro_derive(CloneZeroed).

* Switches over all use sites of clone_zeroed() and copy_field().

* Removes clone_zeroed() and copy_field().

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-11-09 18:15:42 +01:00
Denis K d0f736a0d9
Fix 2 clippy warnings with temporary references (#28744) 2022-11-08 14:59:56 +00:00
Sergey Melnychuk 0347d9cf78
Remove unnecessary clone of a String (#28758) 2022-11-07 20:42:19 +00:00
Dmitri Makarov 0564d2a785 Add to cargo-test-sbf an option to test specific packages 2022-11-04 16:35:46 +00:00
ryleung-solana 842fa993c8
Quic fix calculation of staked number of concurrent streams (#28705)
* Fix calculation of staked number of concurrent streams
2022-11-03 20:45:44 +08:00
Brian Anderson 6972afe2c4
Add docs for system_instruction and some of its functions (#28052)
* Add docs for system_instruction and some of its functions

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Apply review feedback

* Use PDAs in system_instruction examples

* Fix 'bump seed' terminology in system_instruction docs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-11-01 14:33:46 -06:00
0xripleys 5de4dd8f9b
Add SetAuthorityChecked instruction to bpf loader (#28424)
* SetAuthorityChecked

* restore old logic for loader

* add more upgrade authority checked test cases

* setBufferAuthority checked tests

* format

* add set_buffer_authority_checked instruction to sdk

* Update transaction-status/src/parse_bpf_loader.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* add is_set_authority_checked function

* fix set_buffer_authority_checked sdk instruction

* feature gate setAuthorityChecked

* add bpf loader tests for setAuthorityChecked ixs

* test that you can set to same authority

* allow set_authority_checked to be called via cpi (if feature is enabled)

* fix ci

* fmt

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Co-authored-by: Justin Starry <justin@solana.com>
2022-11-01 08:34:04 +00:00
Dmitri Makarov 34865d032c chore: update Solana docs and code comments that specify "BPF" to "SBF" 2022-10-31 14:14:25 -04:00
apfitzge 37fb603fc0
precompile verify: &Arc<FeatureSet> to &FeatureSet (#27647) 2022-10-27 19:25:33 -05:00
Alexander Meißner a43098a428
Feature - Check syscall outputs do not overlap (#28599)
* Extends is_nonoverlapping() to be able to deal with two different lengths.

* Uses is_nonoverlapping() for syscall output parameters.

* Feature gates the new throws of SyscallError::CopyOverlapping.

* Adds tests which trigger SyscallError::CopyOverlapping.
2022-10-27 19:11:18 +02:00
Dmitri Makarov d6b3d338d0 Bump sbf-tools to v1.31 2022-10-27 07:18:35 -04:00
Jeff Washington (jwash) 1ff2740905
feature 28541 no-op (#28542) 2022-10-24 07:52:11 -07:00
Ashwin Sekar 9eafad467c
Add convenience methods to VoteInstruction to distinguish vote types (#28526)
* Add convenience methods to VoteInstruction to distinguish vote types

* use matches! macro instead
2022-10-21 14:17:40 -06:00
Dmitri Makarov 786c558a1f Bump sbf-tools to v1.30 2022-10-21 09:36:18 -04:00
kirill lykov 1c4ac56e56
Remove immutable deploy (#28399)
* remove Deploy option from cli

* remove solana deploy from comments

* introduce dummy deploy command to improve user experience
2022-10-21 09:29:37 +02:00
Justin Starry 199398d5c4
Rename transaction v2 proposal (#28508)
Rename transactions v2 proposal to clear up versioning
2022-10-21 09:29:22 +08:00
Ashwin Sekar f207af765e
Split out voting and banking threads in banking stage (#27931)
* Split out voting and banking threads in banking stage

Additionally this allows us to aggressively prune the buffer for voting threads
as with the new vote state only the latest vote from each validator is
necessary.

* Update local cluster test to use new Vote ix

* Encapsulate transaction storage filtering better

* Address pr comments

* Commit cargo lock change

* clippy

* Remove unsafe impls

* pr comments

* compute_sanitized_transaction -> build_sanitized_transaction

* &Arc -> Arc

* Move test

* Refactor metrics enums

* clippy
2022-10-20 21:10:48 +00:00
Jeff Washington (jwash) fd2e671861
remove slot# from account hash (#28405)
* remove slot# from account hash

* add feature

* fix tests

* constants to help clarify 'irrelevant' changes

* move to enum for enforcing irrelevancy

* ignore unsupported tests
2022-10-18 08:03:37 -07:00
Alexey Skibin 108a02cfd4
Add off-chain messages support (#27456) 2022-10-17 11:19:12 -04:00
Dmitri Makarov d6813b98d2 chore: move programs/bpf to programs/sbf 2022-10-13 11:40:40 -04:00
samkim-crypto 3f63283eda
add curve25519 multiscalar multiplication syscall (#28216)
* add curve25519 multiscalar multiplication syscall

* update compute unit costs

* update tests

* add update to compute budget

* add syscall call function

* update compute costs in tests

* update syscall syntax
2022-10-12 14:43:02 +09:00
Kevin Heavey 061bed0a8c
More missing derives (#27418)
* add Eq, PartialEq to EpochInfo

* add Eq, PartialEq related to transactions and messages

* add Eq, PartialEq to Ed25519SignatureOffsets

* add Eq, PartialEq to FeatureSet

* add Eq, PartialEq to fee.rs

* add Eq, PartialEq to GenesisConfig

* don't add Eq to GenesisConfig because floats

* add Eq, PartialEq to PohConfig

* add Eq, PartialEq to SecpSignatureOffsets

* add some missing derives to transaction_context.rs

* add Eq, PartialEq to ProcessedSiblingInstruction
2022-10-11 12:59:58 -07:00