Commit Graph

172 Commits

Author SHA1 Message Date
mergify[bot]
a6ded6a5ed removes turbine legacy code and already activated features (backport #24080) (#24117) 2022-04-06 01:12:18 +00:00
Jack May
1f052c6234 disable deprecated BPF loader deploys (#23757) 2022-03-18 14:29:49 -07:00
Jack May
c369f8b871 limit secp256k1 recover id (#23621) 2022-03-14 09:34:43 -07:00
Jack May
ead8cc4366 Check for physical region overlap (#23568) 2022-03-10 11:48:09 -08:00
Jack May
c2ec294401 featurize loader sat math (#23516) 2022-03-08 11:48:22 -08:00
Justin Starry
bcda74f42f Fix builtin handling on epoch boundaries (#23256) 2022-02-22 20:54:08 +08:00
Alexander Meißner
226a71f073 Refactor: Use instruction_trace instead of instruction_context_stack (#22988)
* Moves stack_height of the instruction_trace into InstructionContext.

* Uses nesting_level instead of stack_height internally in transaction_context.rs

* Uses the instruction_trace instead of the instruction_context_stack internally.

* Adds feature gate: record_instruction_in_transaction_context_push.
2022-02-09 20:04:49 +01:00
Alexander Meißner
96c88d1a5e Bumps solana_rbpf to version v0.2.22 (#22923)
* Bumps solana_rbpf to v0.2.22

* Adjusts vm::Config and feature gates.
2022-02-04 21:17:49 +01:00
carllin
bd1850df25 Return actual committed transactions from process_transactions() (#22802) 2022-02-03 03:56:36 -05:00
Jack May
ab02dba96f Add get_processed_sibling_instruction syscall (#22859) 2022-02-02 16:45:57 -08:00
Will Hickey
75563f6c7b Reject close of active vote accounts (#22651)
* 10461 Reject close of vote accounts unless it earned no credits in the previous epoch. This is checked by comparing current epoch (from clock sysvar) with the most recent epoch with credits in vote state.
2022-02-02 14:16:24 -06:00
Jon Cinque
fc21af4e6e spl-associated-token-account: Add feature for new program (#22648)
* spl-associated-token-account: Add feature for new program

* Address feedback
2022-01-24 22:54:41 +01:00
Brooks Prumo
a7f2fff219 Remove active features stake program v3 and v4 (#22612)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-01-21 19:27:53 -06:00
Michael Vines
65f1e0fcc2 vote account withdraw authority may change the authorized voter 2022-01-15 21:47:08 -08:00
Jack May
2aa113fd8c Update syscall base costs 2022-01-14 16:15:14 -08:00
carllin
4ab7d6c23e Filter out outdated slots (#22450)
* Filter out outdated slots

* Fixup error
2022-01-13 19:51:00 -05:00
Tyera Eulberg
637e366b18 Prevent rent-paying account creation (#22292)
* Fixup typo

* Add new feature

* Add new TransactionError

* Add framework for checking account state before and after transaction processing

* Fail transactions that leave new rent-paying accounts

* Only check rent-state of writable tx accounts

* Review comments: combine process_result success behavior; log and metrics before feature activation

* Fix tests that assume rent-exempt accounts are okay

* Remove test no longer relevant

* Remove native/sysvar special case

* Move metrics submission to report legacy->legacy rent paying transitions as well
2022-01-11 11:32:25 -07:00
Michael Vines
bb3a1b6b31 Add zk_token_sdk_enabled feature to gate Zk Token proof program and sol_zk_token_elgamal_op syscalls 2022-01-05 11:57:37 -08:00
Justin Starry
2b5e00d36d Limit number of accounts that a transaction can lock (#22201) 2022-01-04 14:25:23 +08:00
Brooks Prumo
800472ddf5 Add AccountsDataMeter to InvokeContext (#21813) 2021-12-28 05:14:48 -06:00
Jack May
509bcd2e74 Bump rbpf to v0.2.19 (#21880)
* Bump rbpf to v0.2.19

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2021-12-14 16:51:23 +01:00
Ashwin Sekar
4bc5bfb2df Addressing leftover comments from #21531 (#21782)
* Addressing leftover comments from #21531

* Add feature flag

* Feature gate new vote instruction

* add clock & slot hashes sysvar to test
2021-12-13 07:52:22 -08:00
Justin Starry
6fc329180b Add more reporting for invalid stake cache members and prune them (#21654)
* Add more reporting for invalid stake cache members

* feedback
2021-12-09 14:12:11 -05:00
Sean Young
45e56c599d Ensure we have keys to activate these features (#21669) 2021-12-07 18:58:59 +00:00
Justin Starry
e123883b26 Reject vote withdraws that create non-rent-exempt accounts (#21639)
* Reject vote withdraws that create non-rent-exempt accounts

* fix mocked instruction test
2021-12-06 17:01:20 -05:00
Brian Anderson
df2b448993 Fix incorrect nonoverlapping test in sol_memcpy (#21007)
Thanks!
2021-12-06 09:26:46 -08:00
Michael Vines
b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Alexander Meißner
1a4a039913 Adds feature reject_empty_instruction_without_program. (#21591) 2021-12-03 15:47:18 +01:00
Alexander Meißner
015250f96c Feature gates for rbpf v0.2.16 (#21590)
- Adds feature reject_section_virtual_address_file_offset_mismatch.
- Adds feature start_verify_shift32_imm.
- Enables enable_symbol_and_section_labels only in the rbpf-cli.
2021-12-03 15:45:25 +01:00
Jack May
976eb81d4f Cleanup the bank's use of nonces (#21246) 2021-12-02 09:57:05 -08:00
Jon Cinque
02bc4e3fc1 spl-token: New program feature flag (#21354)
* spl-token: Add feature flag for new release

* Remove all spl token version declarations
2021-11-21 14:27:03 +01:00
Jack May
cb0bb5bd1e Nonce accounts must be writeable (#21260)
* Nonce accounts must be writeable

* feedback

* feedback
2021-11-16 23:01:00 +00:00
Alexander Meißner
0661aa67ed Adds a feature gate to reject the deployment of programs with unresolved syscall symbols. (#21298) 2021-11-16 18:21:16 +01:00
Jack May
131c0d78c4 Fix compute budget bump (#21238) 2021-11-11 14:09:28 -08:00
Jack May
4aa12a52b6 Feature cleanup (#21038) 2021-10-28 09:04:03 -07:00
Jack May
1e2bef76e3 Add compute budget program as a noop (#20992) 2021-10-26 20:08:59 -07:00
Jack May
bfbbc53dac Divorce the runtime from FeeCalculator (#20737) 2021-10-22 14:32:40 -07:00
Jack May
58164517e4 Add program heap bump instruction (#20607) 2021-10-19 21:01:39 -07:00
behzad nouri
0c0384ec32 revises turbine peers shuffling order (#20480)
Turbine randomly shuffles cluster nodes on a broadcast tree for each
shred. This requires knowing the stakes and nodes' contact-infos (from
gossip).

However gossip is subject to partitioning and propogation delays.
Additionally unstaked nodes may join and leave the cluster at any
moment, changing the cluster view from one node to another.

This commit:
* Always arranges the unstaked nodes at the bottom of turbine broadcast
  tree.
* Staked nodes are always included regardless of if their contact-info
  is available in gossip or not.
* Uses the unbiased WeightedShuffle construct for shuffling nodes.
2021-10-14 15:09:36 +00:00
Tao Zhu
177a375479 Tpu vote 1.7 (#20187) (#20494)
* Add separate vote processing tpu port

* Add feature to send to tpu vote port

* Add vote rejecting sigverify mode

* use packet.meta.is_simple_vote_tx in place of deserialization

* consolidate code that identifies vote tx atcommon path for cpu and gpu

* new key for feature set

* banking forward tpu vote

* add tpu vote port to dockerfile and other review changes

* Simplify thread id compare

* fix a test; updated cluster_info ABI change

Co-authored-by: Tao Zhu <tao@solana.com>

Co-authored-by: sakridge <sakridge@gmail.com>
2021-10-07 09:38:23 +00:00
Jack May
785fcb63f5 Remove support for dynamically loaded native programs (#20444) 2021-10-06 14:53:23 -07:00
Justin Starry
129716f3f0 Optimize stakes cache and rewards at epoch boundaries (#20432)
* Optimize stakes cache and rewards at epoch boundaries

* Fetch from accounts db

* Add cli flag for disabling epoch boundary optimization
2021-10-06 00:53:26 -04:00
Jack May
8fee9a2e1a Dont call precompiled programs (#19930) 2021-09-29 06:25:08 +00:00
Tyera Eulberg
2cd9dc99b6 Restore ability for programs to upgrade themselves (#20265)
* Make helper associated fn

* Add feature definition

* Add handling to preserve program-id write lock when upgradeable loader is present; restore bpf upgrade-self test

* Use single feature
2021-09-28 09:59:08 -06:00
Jack May
4e27543415 Allow programs to realloc their accounts within limits (#19475) 2021-09-28 01:13:03 -07:00
Trent Nelson
7b365c564f runtime: remove inactive delegation from stakes cache 2021-09-22 20:50:58 -06:00
Sean Young
d714cf659c Proposal: log binary data for Solidity
The program_id is not needed on "Program return data: " because it
always preceeded by the program invoke message, so no need to repeat
the program id. Also rename this to "Program return: " since "data"
is redundant.
2021-09-22 07:59:06 +01:00
Justin Starry
ea34eb8a4b Update feature switch for reduced required deploy balance (#19999) 2021-09-19 14:50:41 -05:00
Jack May
7b0bf64404 cleanup old features (#19956) 2021-09-17 09:46:49 -07:00
Jack May
00d7981f64 Fix native invoke writable privileges (#19750)
* Fix native invoke writable privileges

* build downstream spl bpf programs for tests
2021-09-13 22:57:37 -07:00