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
Michael Vines
da9548fd12
de-mut some InvokeContext methods
2020-10-30 09:20:09 +00:00
Jack May
72d41e5801
Update AccountInfo comments ( #13302 )
2020-10-30 08:16:44 +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
225bed11c7
Remove Entrypoint type
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
Jack May
b5c8b86e7c
clarify comment ( #13289 )
2020-10-29 21:16:01 +00:00
Jack May
c458d4b213
move Account to solana-sdk ( #13198 )
2020-10-28 22:01:07 -07:00
Michael Vines
92d6521a7f
Add try_find_program_address()
2020-10-28 19:34:51 -07:00
Ryo Onodera
7d2962135d
Use pico inflation for ledger-tool capitalization --enable-inflation ( #13215 )
...
* Use pico inflation for ledger-tool capitalization --enable-inflation
* rust fmt
2020-10-28 15:30:39 +09:00
Jack May
4e0d1b1d4a
more portable install.sh ( #13114 )
2020-10-27 22:43:34 -07:00
Jack May
26eba5ac7d
Fix pr crossing for sysvar keyed-accounts ( #13189 )
2020-10-26 21:59:32 -07:00
Jack May
322c667655
check sysvar id for AccountInfo ( #13175 )
2020-10-26 20:38:45 -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
Jack May
e3c0cc980b
fix .gitignore ( #13177 )
2020-10-27 00:42:26 +00:00
Jack May
fc83a666fc
macos portable rust-bpf ( #13176 )
2020-10-27 00:11:33 +00:00
Michael Vines
c4fb77f057
Delete .lib.rs.swo
2020-10-26 16:01:25 -07:00
Michael Vines
0cc9c94c43
Rename "everything" feature to "full"
2020-10-24 17:26:11 +00: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
85c51f5787
Only activate legacy program feature for the solana-sdk crate
2020-10-24 08:37:55 -07:00