Commit Graph

1111 Commits

Author SHA1 Message Date
Jack May 48dd9f7efd
Move secp256k1 instruction helper to the sdk (#13560) 2020-11-12 16:58:40 -08:00
Jack May 30ef53cb13
fix bpf lddw check (#13554) 2020-11-12 13:13:42 -08:00
Ryo Onodera 89b474e192
Fix slow/stuck unstaking due to toggling in epoch (#13501)
* Fix slow/stuck unstaking due to toggling in epoch

* nits

* nits

* Add stake_program_v2 feature status check to cli

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-11 14:11:57 -07:00
Jack May 461ae40eea
provide full Rust panic messages in BPF and add memory optimizations (#13455) 2020-11-09 13:40:26 -08:00
Ryo Onodera 5306eb93cc
Clean up Delegation::stake_activating_and_deactivating (#13471) 2020-11-09 17:39:56 +09:00
Ryo Onodera 737d3e376d
Clean up Delegation::stake_and_activating (#13460) 2020-11-08 17:19:27 +09:00
Ryo Onodera a81e7e7749
Output more inflation calc details in ledger-tool (#13345)
* Output more inflation calc details in ledger-tool

* Fix broken ci...

* Rename confusing variables

* Fix panic by wrapping PointValue with Opiton...

* Minor modifications

* Remove explict needless flush; Drop already does

* Yet another csv field adjustments

* Add data_size and rename epochs to earned_epochs

* Introduce null_tracer

* Unwrap Option in new_from_parent_with_tracer

* Don't shorten identifiers

* Allow irrefutable_let_patterns temporalily

* More null_tracer

* More field adjustments
2020-11-08 16:43:50 +09: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
Trent Nelson fe1e08b9ad stake: Consider withdraws we redelegating 2020-11-06 18:51:11 +00:00
Trent Nelson 491ad59d2e stake: Add redelegation failing test 2020-11-06 18:51:11 +00: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
Jack May 84b139cc94
Add builtin mem tests (#13429) 2020-11-05 22:20:54 -08:00
Michael Vines 78c2d9156b Remove unneeded .gitignore 2020-11-05 14:29:17 -08:00
Tyera Eulberg bc62313c66
Allow feature builtins to overwrite existing builtins (#13403)
* Allow feature builtins to overwrite existing builtins

* Add feature_builtin ActivationType

* Correctly retain idempotent for replacing case

* Fix test

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-05 15:37:07 +00:00
Justin Starry c24fbb6f8b
Fix duplicate records of inner instructions (#13380)
* Fix duplicate records of inner instructions

* fix tests

* fix clippy

* Remove bad_inner_instructions
2020-11-05 15:23:52 +08:00
Alexander Meißner 4999fe298b
Rbpf v0.2.0 (#13365)
* Updates rbpf to v0.2.0,
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-11-04 18:46:26 +01:00
Ryo Onodera 0e4509c497
Small code cleanup and typo fixes (#13325)
* Small code cleanup and typo fixes

* Clean up calculate_points_and_credits
2020-11-02 10:28:24 +09:00
Michael Vines 660214754e `cargo update -p futures-task` / `cargo update -p futures-util` 2020-10-31 18:56:20 +00:00
Michael Vines 9263ae1c60 Simplify CPI interface into MessageProcessor 2020-10-30 09:20:09 +00:00
Michael Vines da9548fd12 de-mut some InvokeContext methods 2020-10-30 09:20:09 +00:00
Michael Vines da361afbb9 Revert "Updates rbpf to v0.2.0, (#12951)"
This reverts commit 6606590b81.
2020-10-29 21:45:24 -07:00
Michael Vines 7d686b72a0 Add Bank::set_bpf_compute_budget() 2020-10-29 21:45:24 -07:00
Michael Vines 66e51a7363 Add sol_log_compute_units syscall 2020-10-29 21:45:24 -07:00
Michael Vines 33884d847a Remove programs clone() 2020-10-29 21:45:24 -07:00
Michael Vines 225bed11c7 Remove Entrypoint type 2020-10-29 21:45:24 -07:00
Michael Vines 2664a1f7ef Remove MessageProcessor::loaders 2020-10-29 21:45:24 -07:00
Michael Vines df8dab9d2b Native/builtin programs now receive an InvokeContext 2020-10-29 21:45:24 -07:00
Alexander Meißner 6606590b81
Updates rbpf to v0.2.0, (#12951)
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-10-29 11:34:52 -07:00
Alexander Meißner 65ee3a6bdd
Refactors the common code of test and bench targets into the solana_runtime::bpf_test_utils module. (#13203) 2020-10-29 10:04:47 +01:00
Jack May c458d4b213
move Account to solana-sdk (#13198) 2020-10-28 22:01:07 -07:00
Jack May bb6ab3a62d
ignore .so files (#13188) 2020-10-26 23:14:06 -07:00
Michael Vines 1b343665a1 Move KeyedAccount out of solana-program. Native programs are not supported by solana-program 2020-10-26 18:54:54 -07:00
Michael Vines a4956844bd Update frozen_abi hashes
The movement of files in sdk/ caused ABI hashes to change
2020-10-24 08:37:55 -07:00
Michael Vines dd711ab5fb Rename solana-program-sdk to solana-program 2020-10-24 08:37:55 -07:00
Michael Vines fe68f7f786 Port programs to solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines 63db324204 Initial population of solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines b169d9cfbe Add --bpf-out-dir argument to control where the final build products land 2020-10-23 04:57:03 +00:00
Michael Vines 959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines 7bc073defe Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand` 2020-10-21 19:08:13 -07:00
Michael Vines 61be155413 Remove do.sh 2020-10-21 18:56:40 -07:00
carllin e6b821c392
Finer grained AccountsIndex locking (#12787)
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-21 17:05:27 -07:00
Michael Vines 6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
Ryo Onodera c0675968b1
Support Debug Bank (#13017) 2020-10-21 01:05:45 +09:00
Michael Vines 6d5889bdb5 Remove program_stubs!() 2020-10-19 21:00:17 +00:00
Michael Vines 9c53e1dfb2 Add SyscallStubs to enable syscall interception when building programs for non-BPF 2020-10-19 21:00:17 +00:00
Jack May b510474dcb
Report compute budget usage (#12931) 2020-10-15 15:55:37 -07:00
Jack May 3f9e6a600b
program log pubkey as base58 (#12901) 2020-10-15 09:11:54 -07:00
Lu Guanqun cc9b52cf72 trivial typo fix 2020-10-15 08:27:39 -07:00
Jack May 969f7b015b
Respect RefCell when calling invoke (#12858)
* Respect RefCell when calling invoke

* nudge
2020-10-15 01:06:41 +00:00
carllin f8d338c9cb
Switch accounts storage lock to DashMap (#12126)
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-13 18:29:50 -07:00