Commit Graph

60 Commits

Author SHA1 Message Date
Justin Starry 09241ae9c3
Use reserved account keys list to restrict tx write locks (#541)
* Plumb through reserved account keys set

* Plumb through tests
2024-04-13 09:37:58 +08:00
Alexander Meißner 81519fab2a
Fix - `test_add_builtin()` should use `LoadedProgram::new_builtin()` and `ProgramCache::extract()` (#772)
Refactors test_add_builtin() to use LoadedProgram::new_builtin() and ProgramCache::extract().
2024-04-12 14:58:23 +02:00
dmakarov ad94732d4f
SVM: rename TransactionCheckResult variable for consistency (#759) 2024-04-11 12:46:23 -07:00
Lucas Steuernagel 4e2fc2772b
Add unit test for `add_builtin` (#720) 2024-04-11 11:13:23 -03:00
dmakarov d4fe07c68c
SVM: explain fields of TransactionBatchProcessor struct in spec (#727) 2024-04-10 15:23:27 -07:00
Kevin Heavey ff8a25b97f
svm: move bpf-loader-program to dev-dependencies (#711) 2024-04-10 10:22:51 -05:00
Tyera dd8e1f4c73
Remove overly restrictive check_account_access for partitioned epoch rewards (#631)
* Remove rewards-interval-related check_account_access implementation

* Move RewardsInterval to tests module

* Update test to new StakeProgram functionality
2024-04-09 21:55:45 -06:00
Lucas Steuernagel 4753a8aefa
Move `add_builtin` to SVM (#547) 2024-04-09 16:55:09 -03:00
Dmitri Makarov 9552b1ad3c
SVM: Add specification document (#643)
* SVM: Add specification document

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

---------

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>
2024-04-09 07:25:18 -07:00
steviez 191a997c5f
Make thread id a tag instead of field in BankingStage metrics (#644)
Making the id a tag instead of a field will allow group-by operations on
id in chronograph
2024-04-08 13:15:52 -05:00
Joe C 03ef611f0c
program-runtime: hoist `RuntimeConfig` up to SVM (#630)
program-runtime: hoist `RuntimeConfig` out into SVM
2024-04-07 10:45:57 -05:00
Alexander Meißner 55c05c5ea5
Fix - `FailedVerification` and `Closed` tombstones (#419)
* Only the verifier can cause FailedVerification, everything else is Closed

* Removes the environments parameter from load_program_accounts().

* cargo fmt

* Simplify invocation of deployed program

* Attempt to invoke a program before it is deployed

* Attempt to invoke a buffer before it is used in a deployment

* Escalates Option return value of load_program_accounts() to load_program_with_pubkey().

* Review feedback
2024-04-05 13:03:18 +02:00
Joe C 526979d589
program-runtime: hoist `MessageProcessor` up to SVM (#586) 2024-04-04 18:20:01 -05:00
Jeff Washington (jwash) ccb09866b5
stop requiring data allocation to check for rent (#543) 2024-04-02 13:25:43 -05:00
Andrew Fitzgerald 65f54bec88
Add ProgramCacheUs to execute timings (#473) 2024-04-02 10:03:55 -05:00
Joe C 005c1375f8
Program Runtime: Refactor `InvokeContext` out of `MessageProcessor::process_message` (#509) 2024-04-02 05:06:13 -05:00
Lucas Steuernagel e70ff38f35
Use loader v3 instead of v2 in the SVM (#454) 2024-03-27 15:47:34 -03:00
Lucas Steuernagel 02918a5af1
Update sysvar API in SVM integration test (#451) 2024-03-27 13:49:43 -03:00
Lucas Steuernagel 9cd90751f0
Add `SanitizedTransaction` builder to SVM (#442)
Add SanitizedTransaction builder
2024-03-27 10:00:04 -03:00
Kevin Heavey 24c55f39ee
Replace Vec::new() with Vec::with_capacity(2) (#413) 2024-03-26 17:08:56 -03:00
Lucas Steuernagel b884ea8011
Add examples of failing transactions to SVM integration tests (#417)
Add examples of failing transactions
2024-03-25 16:02:58 -03:00
Pankaj Garg 5cfb6e860d
SVM: Move sysvar_cache related functions and tests to SVM (#402) 2024-03-22 19:45:34 -07:00
Lucas Steuernagel bcaf7a8f6c
Sysvar example (#399) 2024-03-22 20:26:46 -03:00
Lucas Steuernagel fe16e84806
Include simple transfer example in SVM (#388) 2024-03-22 15:45:59 -03:00
Pankaj Garg 91b1ee3df6
Fix: deploy program on last slot of epoch during environment change (#101)
* Fix: deploy program on last slot of epoch during environment change

* solana-runtime: deploy at last epoch slot test

* disable deployment of sol_alloc_free

* Move tx-batch-constructor to its own function

* use new_from_cache

---------

Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
2024-03-22 07:43:28 -07:00
Lucas Steuernagel 4d838d5af9
Add `hello-solana` example source files to SVM folder (#361) 2024-03-21 15:12:32 -03:00
Dmitri Makarov 54575feb42
SVM: add a missing doc comment (#347) 2024-03-20 20:03:20 -04:00
Dmitri Makarov 09ae5872b3
Rename LoadedPrograms to ProgramCache for readability (#339) 2024-03-20 15:26:45 -04:00
HaoranYi 0f8f8cd970
Revert deprecate executable feature (#309)
* revert deprecate executable feature

* add native loader account transfer test

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-03-20 10:54:15 -05:00
Pankaj Garg aba8ce5f3e
Move code to check_program_modification_slot out of SVM (#329)
* Move code to check_program_modification_slot out of SVM

* add documentation for the public function
2024-03-20 05:39:07 -07:00
Dmitri Makarov f1d56e95f5
SVM: minor refactoring to improve code readability (#317) 2024-03-19 15:32:07 -04:00
Lucas Steuernagel e8526f60aa
SVM integration test (#307) 2024-03-19 13:44:34 -03:00
Dmitri Makarov 33f941d473
SVM: Eliminate filter_executable_program_accounts from pub interface (#214) 2024-03-13 09:15:24 -07:00
Andrew Fitzgerald 0705a07b52
Remove unused account_deps (#188) 2024-03-12 09:48:05 -07:00
Lucas Steuernagel ada06ca6ce
Add tests for `svm/transaction_processor.rs` (#186) 2024-03-11 17:30:04 -03:00
Dmitri Makarov d88050cda3
SVM: Add doc comments, restrict visibility of some xfaces to crate (#136) 2024-03-08 14:04:07 -05:00
Lucas Steuernagel e027a8bd63
Gather recording booleans in a data structure (#134) 2024-03-08 09:28:04 -03:00
Dmitri Makarov ba43f74dcf
[SVM] Move RuntimeConfig to program-runtime (#96)
RuntimeConfig doesn't use anything SVM specific and logically belongs
in program runtime rather than SVM.  This change moves the definition
of RuntimeConfig struct from the SVM crate to program-runtime and
adjusts `use` statements accordingly.
2024-03-07 10:16:16 -08:00
Lucas Steuernagel 85cfe23b46
Add tests for `svm/transaction_processor.rs` (#112) 2024-03-07 12:26:31 -03:00
Lucas Steuernagel bd93285025
Proposal: Use SanitizedMessage when possible in `svm/account_loader.rs` (#35390) 2024-03-02 06:12:24 -03:00
Lucas Steuernagel 532b806bef
Add more unit tests to SVM (#35383) 2024-03-01 16:04:08 -03:00
Pankaj Garg 7399178c78
Set slot and env in tx batch specific cache (#35377) 2024-03-01 08:20:17 -08:00
Pankaj Garg 990ca1d0b8
Add limit to looping in banking-stage (#35342) 2024-02-28 17:36:45 -08:00
Justin Starry 312f786abf
Rename `SanitizedMessage::try_from` to `try_from_legacy_message` (#35338)
* Simplify and refactor tx message creation in tests

* Rename SanitizedMessage::try_from to try_from_legacy_message
2024-02-29 08:25:22 +08:00
Lucas Steuernagel 8f3e960640
Add tests for private functions in SVM `account_loader.rs` (#35334) 2024-02-28 14:17:45 -03:00
Lucas Steuernagel ec63b813f5
Move account filter test to SVM (#35304) 2024-02-23 17:44:26 -03:00
Alexander Meißner 74758d9fbf
Refactor - Move recompilation out of program loading (#35297)
Moves recompilation specifics out of load_program().
2024-02-23 17:25:32 +01:00
Tao Zhu 139b9c8c25
Add fee_details to fee calculation (#35021)
* add fee_details to fee calculation

* fix - no need to round after summing u64

* feature gate on removing unwanted rounding
2024-02-23 08:58:48 -06:00
Alexander Meißner 2891ce886b
Fix - program loading with effective slot at epoch boundary (#35283)
* Always limit effective slot to the begin of the current epoch.

* Adds comments.

* Optimizes to avoid having two entries if there is no relevant feature activation.

* Adds test_feature_activation_loaded_programs_epoch_transition().
2024-02-23 15:15:28 +01:00
Lucas Steuernagel 31a73ab731
Move `test_rent_state_list_len` to SVM (#35287) 2024-02-22 18:37:09 -03:00