262 Commits

Author SHA1 Message Date
ac9a2522bd nit cleanups (#19534) 2021-08-31 17:23:32 -07:00
c50b01cb60 Store versioned transactions in the ledger, disabled by default (#19139)
* Add support for versioned transactions, but disable by default

* merge conflicts

* trent's feedback

* bump Cargo.lock

* Fix transaction error encoding

* Rename legacy_transaction method

* cargo clippy

* Clean up casts, int arithmetic, and unused methods

* Check for duplicates in sanitized message conversion

* fix clippy

* fix new test

* Fix bpf conditional compilation for message module
2021-08-17 15:17:56 -07:00
0b50bb2b20 Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
9dfeee2993 Add BPF Sanity program-test based test (#19159) 2021-08-11 12:07:15 -07:00
14361906ca for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
cde1461555 Bump bpf-tools to v1.14 (#19023)
- improved memory operations performance
- minor fixes
2021-08-03 09:13:58 +00:00
dfbb0c559b deprecate fees sysvar (#18960) 2021-07-29 10:48:14 -07:00
7fc4cfebc8 Rename BpfComputeBudget (#18768) 2021-07-22 10:18:51 -07:00
6cf3c1ab8f tx wide compute budget (#18631) 2021-07-16 00:31:22 -07:00
d166b9856a Move transaction sanitization earlier in the pipeline (#18655)
* Move transaction sanitization earlier in the pipeline

* Renamed HashedTransaction to SanitizedTransaction

* Implement deref for sanitized transaction

* bring back process_transactions test method

* Use sanitized transactions for cost model calculation
2021-07-15 22:51:27 -05:00
79c811ef17 Make another insn count adjustment for failing test 2021-07-08 09:35:07 -07:00
8fcda6a2da Adjust insn count in assert_instruction_count (#18519) 2021-07-08 07:57:32 -07:00
1f288ce527 Add ecrecover syscall (#17720)
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00
e752299ac5 Bump bpf-tools version
Update Rust BPF to version 1.53
2021-07-07 05:08:40 -07:00
8d5c04e257 Bump solana_rbpf to version 0.2.13 (#18068)
* Moves syscall_registry into the rbpf Executable constructor.

* Adds the reject_unresolved_syscalls flag which is only set when deploying programs via the CLI.
2021-07-07 09:50:11 +02:00
5dd399dafa Fix transaction logs and inner ixs for leader nodes (#18395)
* Fix transaction logs and inner ixs for leader nodes

* Fix cpi log storage flag
2021-07-06 19:35:24 +00:00
ad53d2ef77 ci: bump bpf instruction counts 2021-06-30 19:01:51 -06:00
52fd10ce03 chore: bump byteorder from 1.3.4 to 1.4.3 (#18300)
* chore: bump byteorder from 1.3.4 to 1.4.3

Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.3.4 to 1.4.3.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.4...1.4.3)

---
updated-dependencies:
- dependency-name: byteorder
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Bump expected instruction count

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-29 15:08:04 -06:00
2fbedd834f Don't update if already an executable 2021-06-26 19:19:26 -06:00
c1e03f3410 Updates BPF program assert_instruction_count tests. 2021-06-18 10:42:46 -07:00
1b1d34da59 Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program

* Update account-decoder

* Update cli and runtime

* Update all other parts

* Commit Cargo.lock changes in programs/bpf

* Update cli stake instruction import

* Allow integer arithmetic

* Update ABI digest

* Bump rust mem instruction count

* Remove useless structs

* Move stake::id() -> stake::program::id()

* Re-export from solana_sdk and mark deprecated

* Address feedback

* Run cargo fmt
2021-06-15 18:04:00 +02:00
d272468a14 Adjust assert_instruction_count expected insn count value (#17874) 2021-06-10 20:50:55 +00:00
2fe211c5e0 Remove O2 option for compiling BPF programs (#17865)
rustc default compiler optimization level is O3. This change removes
the option that overrides the default optimization level, because it
is safe to do so.  The code generation is incorrect in some cases
because of link-time optimizations, which remain disabled for
compiling BPF programs.  In addition, this commit updates the expected
instruction counts for assert_instruction_count test.
2021-06-10 05:04:17 +00:00
28fdfed1ba Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
47861fc373 Bump BPF tools to v1.9 2021-06-03 17:06:49 -07:00
80e5b24b38 Fix CPI recursion depth (#17659)
* Fix CPI recursion depth
2021-06-02 11:15:19 +02:00
4e0db50e4e Fix test instruction count (#17655) 2021-06-01 22:59:35 -07:00
2b50529265 Add memory operation syscalls (#16447) 2021-06-01 15:33:17 -07:00
831e87c65d Add BPF rustc option to reduce the optimizations to safer level (#17590) 2021-05-28 23:14:53 +00:00
a3240aebde Always bail if program modifies a ro account (#17569) 2021-05-28 09:50:25 -07:00
2316ddb90a Revert bpf-tools to version 1.8 because of a codegen bug suspicion (#17568) 2021-05-28 09:36:46 +00:00
9541411c15 Plumb transaction-level rewards (aka "rent debits") into the getTransaction RPC method 2021-05-27 03:05:05 +00:00
3ae4806dae Fix missing builtins in C programs linking with compiler_builtins (#17475) 2021-05-25 17:11:02 +00:00
85b647d80f Bump solana_rbpf to version 0.2.11 (#17404) 2021-05-25 08:05:35 +00:00
855ae79598 Fix InvokeContext::push() account_deps (#17350)
* Reverts aliasing of account_deps with the previous invocation stack frame in InvokeContext::push().
* Adds explicit assert of programdata account content in test_program_bpf_upgrade_via_cpi.
2021-05-21 22:34:07 +02:00
2ae57c172a Bump bpf-tools version to 1.9
- upgrade rustc to 1.52.1 and clang to 12.0
2021-05-20 11:35:37 +02:00
ab871ed4b7 Bump bpf-tools version to 1.8 2021-05-18 08:10:57 +02:00
f15dd1b4ef Add C Serialization Tests for #17217 (#17294) 2021-05-17 16:33:58 -07:00
3f0480d060 Fix deprecated trait object without an explicit dyn warning (#17231) 2021-05-14 17:33:07 +00:00
4ed828e4ee Enable RBPF trace output for BPF tests that are not using bpf_loader 2021-05-11 23:50:42 +02:00
8eb05d6ed4 Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
9b3a59f030 Retain alloc'd and updated data in cpi (#16850) 2021-04-27 13:36:42 -07:00
603872685d private AccountSharedData.owner (#16760)
* private AccountSharedData.owner

* fix perf test
2021-04-26 14:59:17 -05:00
be4df39a4c Remove unactivated ristretto syscall (#16727) 2021-04-22 09:29:42 -07:00
1a658c7f31 Allow SetUpgradeAuthority instruction in CPI calls (#16676)
* feat: allow SetAuthority in CLI calls

* chore: clippy match_like_matches_macro

* chore: clippy match_like_matches_macro

* chore: rename CLI to CPI

* chore: move check for cpi authorised instruction to syscalls

* chore: add set_upgrade_authority cpi test

* chore: assert upgrade authority was changed

* feat: gate set_upgrade_authority via cpi with a feature

* chore: move feature to the end of the list

* chore: remove white spaces

* chore: remove white spaces

* chore: update comment to rerun build
2021-04-22 00:06:59 +01:00
08d5253651 Enforce host aligned memory for program regions (#16590) 2021-04-20 11:07:30 -07:00
9dfcb921cf Refactoring: Move KeyedAccounts to InvokeContext (#15410)
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
74f58376f8 Expand and update instruction count tests (#16522) 2021-04-13 16:23:42 -07:00
db3bca7edd Add llvm feature option to compile for Solana BPF target (#16495) 2021-04-13 07:20:18 +00:00
85eb37fab0 Merge pull request from GHSA-8v47-8c53-wwrc
* Track transaction check time separately from account loads

* banking packet process metrics

* Remove signature clone in status cache lookup

* Reduce allocations when converting packets to transactions

* Add blake3 hash of transaction messages in status cache

* Bug fixes

* fix tests and run fmt

* Address feedback

* fix simd tx entry verification

* Fix rebase

* Feedback

* clean up

* Add tests

* Remove feature switch and fall back to signature check

* Bump programs/bpf Cargo.lock

* clippy

* nudge benches

* Bump `BankSlotDelta` frozen ABI hash`

* Add blake3 to sdk/programs/Cargo.lock

* nudge bpf tests

* short circuit status cache checks

Co-authored-by: Trent Nelson <trent@solana.com>
2021-04-13 00:28:08 -06:00