Commit Graph

96 Commits

Author SHA1 Message Date
b169d9cfbe Add --bpf-out-dir argument to control where the final build products land 2020-10-23 04:57:03 +00:00
7bc073defe Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand 2020-10-21 19:08:13 -07:00
969f7b015b Respect RefCell when calling invoke (#12858)
* Respect RefCell when calling invoke

* nudge
2020-10-15 01:06:41 +00:00
56211378d3 terminology update, nonce to bump seed (#12840) 2020-10-13 10:11:08 -07:00
c3907be623 Add adjustable stack size and call depth (#12728) 2020-10-09 13:07:09 -07:00
2cd7cd3149 Bump max invoke depth to 4 (#12742) 2020-10-09 10:33:12 -07:00
8f5431551e Store program logs in blockstore / bigtable (TransactionWithStatusMeta) (#12678)
* introduce store program logs in blockstore / bigtable

* fix test, transaction logs created for successful transactions

* fix test for legacy bincode implementation around log_messages

* only api nodes should record logs

* truncate transaction logs to 100KB

* refactor log truncate for improved coverage
2020-10-08 12:06:15 -07:00
973f0965e1 Add ristretto multiply syscall (#12699) 2020-10-06 23:52:13 -07:00
630eb3b907 Local program allocator (#12679) 2020-10-06 11:03:51 -07:00
d0aa8a6446 Fix zero-len slice translations (#12642) 2020-10-02 17:45:39 -07:00
adeb06e550 Check CPI program is executable (#12644) 2020-10-02 13:55:22 -07:00
058bca6632 add sha256 syscall (#12569) 2020-09-29 23:29:20 -07:00
777342a1ef Add rand dependency test (#12566)
* Add rand dependency test

* nudge
2020-09-30 00:25:51 +00:00
74fcb184b2 Pipe FeatureSet though InvokeContext (#12536)
* Pipe FeatureSet though InvokeContext

* gate program size cap

* nit
2020-09-29 21:36:30 +00:00
2ff983647f Move process_instruction defs to runtime (#12507) 2020-09-29 01:36:46 -07:00
aa5c008fa8 Add pico-inflation feature 2020-09-28 08:25:00 -07:00
7c4822efb1 Nit: bpf test cleanup (#12401) 2020-09-25 17:02:48 -07:00
d326512121 Add ComputeBudget tuner (#12476) 2020-09-25 09:01:22 -07:00
6601ec8f26 Record and store invoked instructions in transaction meta (#12311)
* Record invoked instructions and store in transaction meta

* Enable cpi recording if transaction sender is some

* Rename invoked to innerInstructions
2020-09-24 22:36:22 +08:00
f561eb917f Add way to look at tx instructions (#11943) 2020-09-19 12:17:46 -07:00
3930cb865a Add keccak-secp256k1 instruction (#11839)
* Implement keccak-secp256k1 instruction

Verifies eth addreses with ecrecover function

* Move secp256k1 test
2020-09-15 18:23:21 -07:00
5ab4109b7e Add memory allocation support for C programs (#12254) 2020-09-15 16:42:20 -07:00
3278d78f08 Cache re-usable work performed by the loader (#12135) 2020-09-14 17:42:37 -07:00
ae7b15f062 Gate pointer alignment enforcement (#12176) 2020-09-11 11:07:03 -07:00
fab2d44abd Add BPF test program instruction monitoring (#11984) 2020-09-01 17:25:55 -07:00
ae0fd3043a Add support for deprecated loader (#11946) 2020-08-31 14:06:58 -07:00
8d362f682b The constraints on compute power a program can consume is limited only to its instruction count (#11717) 2020-08-21 15:31:19 -07:00
e9b610b8df Add SystemInstruction::CreateAccount support to CPI (#11649) 2020-08-17 13:38:42 -07:00
7c736f71fe Make BPF Loader static (#11516) 2020-08-14 12:32:45 -07:00
03263c850a Force program address off the curve (#11323) 2020-08-05 16:35:54 -07:00
7ade330b23 Rename Client methods to match proposed BanksClient (#10793) 2020-06-25 03:35:38 +00:00
1c498369b5 Remove fee-payer guesswork from Message and Transaction (#10776)
* Make Message::new_with_payer the default constructor

* Remove Transaction::new_[un]signed_instructions

These guess the fee-payer instead of stating it explicitly
2020-06-24 14:52:38 -06:00
db4a18ada4 Add PubkeyError for ProgramError (#10748) 2020-06-23 11:19:27 -07:00
73586c1aad Use &[u8] for program address seeds rather then &str (#10744) 2020-06-22 16:51:43 -07:00
03abd3ddd7 Prevent privilege escalation (#10232)
automerge
2020-05-26 01:02:31 -07:00
b7a32f01c0 Multi-version snapshot support (#9980)
* Multi-version snapshot support

* rustfmt

* Remove CLI options and runtime support for selection output snapshot version.
Address some clippy complaints.

* Muzzle clippy type complexity warning.

Despite clippy's suggestion, it is not currently possible to create type aliases
for traits and so everything within the 'Box<...>' cannot be type aliased.

This then leaves creating full blown traits, and either implementing
said traits by closure (somehow) or moving the closures into new structs
implementing said traits which seems a bit of a palaver.

Alternatively it is possible to define and use the type alias 'type ResultBox<T> = Result<Box<T>>'
which does seems rather pointless and not a great reduction in complexity but is enough to keep clippy happy.

In the end I simply went with squelching the clippy warning.

* Remove now unused Serialize/Deserialize trait implementations for AccountStorageEntry and AppendVec

* refactor versioned de/serialisers

* rename serde_utils to serde_snapshot

* move call to accounts_db.generate_index() back down to context_accountsdb_from_stream()

* update version 1.1.1 to 1.2.0
remove nested use of serialize_bytes

* cleanups

* Add back measurement of account storage entry serialization.
Remove construction of Vec and HashMap temporaries during serialization.

* consolidate serialisation test cases into serde_snapshot.
clean up leakage of implementation details in serde_snapshot.

* move short term / legacy snapshot code into child module

* add serialize_iter_as_tuple

* preliminary integration of following commit

commit 6d58b73c47294bfb93465d5a83cd2175660b6e6d
Author: Ryo Onodera <ryoqun@gmail.com>
Date:   Wed May 20 14:02:02 2020 +0900

    Confine snapshot 1.1 relic to versioned codepath

* refactored serde_snapshot, rustfmt
legacy accounts_db format now "owns" both leading u64s, legacy bank_rc format has none

* reduce type complexity (clippy)
2020-05-23 02:54:24 +09:00
4a72c2b054 Support cross-program invocation to native programs (#10136) 2020-05-20 09:24:57 -07:00
97e17f9b32 Programs can only sign their accounts 2020-05-11 09:06:05 -07:00
84885d79d5 Pull in hardened BPF virtual machine (#9931) 2020-05-08 12:37:04 -07:00
068f12fd6f Add Cross-program invocations (#9582) 2020-04-28 14:33:56 -07:00
d08517db8c Nit picks (#9580) 2020-04-18 22:39:08 -07:00
241a05fc52 Add native loader entry points (#9486) 2020-04-15 09:41:29 -07:00
ad0482be73 Revert "Add native loader entry points (#9275)" Breaks genesis_config abi (#9377)
This reverts commit ed86d8d1fc.
2020-04-08 14:36:18 -07:00
ed86d8d1fc Add native loader entry points (#9275) 2020-04-03 17:40:59 -07:00
268e04cb4a Rename CustomError to Custom (#9207) 2020-04-01 09:01:11 -07:00
f192e4f08f Nit: Align Rust and C names (#8918) 2020-03-17 19:37:16 -07:00
d087ed5bf6 Remove copypasta (#8912) 2020-03-17 15:59:09 -07:00
a5f2444ad2 Remove copypasta (#8700)
automerge
2020-03-06 18:18:01 -08:00
ab361a8073 Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
0fd795a676 Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00