143 Commits

Author SHA1 Message Date
Justin Starry
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
Justin Starry
fd33f523ab
Generate packet offsets for versioned messages (#19138)
* Add support for generating packet offsets for new versioned message

* Remove outdated test

* match over version
2021-08-16 17:55:15 -07:00
Kirill Fomichev
d10e37a829 add test for AsRef 2021-08-15 07:43:50 -07:00
Kirill Fomichev
930465e67c Add AsRef<AccountInfo> for AccountInfo 2021-08-15 07:43:50 -07:00
Jack May
0b50bb2b20
Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
Justin Starry
8817f59b6e
Version transaction message and add new message format (#18725)
* Version transaction message and add new message format

* Update abi digest due to message path change

* Update v0.rs

Fix comment

* Update original.rs

* Update message versions name and address map indexes field name

* s/original/legacy

* update comment

* cargo fmt

* Update abi digest due to legacy rename
2021-08-09 22:03:39 -07:00
Jack May
77861e2d40
Feature disable fees sysvar (#18981)
* Feature disable fees sysvar

* nudge
2021-08-02 00:31:11 +00:00
Trent Nelson
21bc43ed58
nonce: Unify NonceError with SystemError 2021-07-30 14:47:14 -06:00
Jack May
dfbb0c559b
deprecate fees sysvar (#18960) 2021-07-29 10:48:14 -07:00
Jack May
9529284194
Nonce gets blockhash from invoke_context (#18950) 2021-07-29 01:50:20 -07:00
Jack May
72e374d0f3
Deprecate SysvarRecentBlockhashes (#18875) 2021-07-27 16:34:21 -07:00
Jack May
eaeeffa5a3
Add macros for deprecacted ids (#18907) 2021-07-26 20:54:46 -07:00
Justin Starry
207c90bd8b
Shorten long SerializeWith type paths in abi digest (#18734) 2021-07-20 08:59:50 -05:00
steviez
b9dc85a934
Add comments on how to add a new feature switch (#18686) 2021-07-18 12:48:09 -05:00
Brian Anderson
37ee0b5599
Eliminate doc warnings and fix some markdown (#18566)
* Fix link target in doc comment

* Fix formatting of log examples in process_instruction

* Fix doc markdown in solana-gossip

* Fix doc markdown in solana-runtime

* Escape square braces in doc comments to avoid warnings

* Surround 'account references' doc items in code spans to avoid warnings

* Fix code block in loader_upgradeable_instruction

* Fix doctest for loader_upgradable_instruction
2021-07-16 00:40:07 +00:00
Trent Nelson
abe5a0a349 gate libsecp256k1 upgrade to v0.5.0 2021-07-15 18:43:55 +00:00
Trent Nelson
3a85b77bb5 hijack secp256k1 enablement feature plumbing for libsecp256k1 upgrade 2021-07-15 18:43:55 +00:00
Trent Nelson
568660b402 Revert "Remove feature switch for secp256k1 program (#18467)"
This reverts commit fd574dcb3b30ece67f17ba3adaf779a3e3735006.
2021-07-15 18:43:55 +00:00
Kirill Fomichev
5cea25ac3e
Add method id to SysbarId trait (#18604) 2021-07-13 16:01:32 +00:00
Justin Starry
e806d31224
Optimize Message::is_non_loader_key method (#18579) 2021-07-12 10:42:22 -05:00
Justin Starry
fd574dcb3b
Remove feature switch for secp256k1 program (#18467)
* Remove feature switch for secp256k1 program

* fix tests
2021-07-09 10:08:03 -05:00
Michael Vines
f6371cce17 Comment cleanup 2021-07-08 21:35:58 -07:00
s-medvedev
1f288ce527
Add ecrecover syscall (#17720)
Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
2021-07-07 13:15:14 -07:00
Michael Vines
ee219ffa47 Add vote/stake checked instructions 2021-07-06 21:53:18 +00:00
Justin Starry
100fabf469
Remove feature switch for demoting sysvar write locks (#18373) 2021-07-06 21:22:22 +00:00
Michael Vines
e7b36c8484 borsh: add bool type 2021-07-05 13:14:18 -07:00
Trent Nelson
216983c50e SDK: Add test for illegal Pubkey::create_with_seed owners 2021-07-02 23:37:15 +00:00
Ruud van Asseldonk
94ab0eb49f Document order of recent blockhashes sysvar
I wanted to use this sysvar to get a recent block hash, but I didn't
know whether the first or the last entry contains the most recent block
hash.

By calling it for mainnet, printing the results, and comparing that to
the recent blocks on solanabeach.io/blocks, I discovered that the
entries are ordered from most recent to least recent. Document this to
save future readers the trouble.
2021-07-01 22:22:52 -07:00
Trent Nelson
d3a7e22112 sdk: refactor pda generation 2021-06-30 19:01:51 -06:00
Trent Nelson
02b14caa5f test-validator: hold rent constant with --slots-per-epoch 2021-06-30 00:46:12 -06:00
hrls
755b7c7aee chore(pubkey): remove dead code 2021-06-22 19:43:15 -06:00
Jack May
d18e02ef44
fix loader instruction checker (#18047) 2021-06-18 11:37:39 -07:00
Alexander Meißner
789f33e8db chore: cargo fmt 2021-06-18 10:42:46 -07:00
Alexander Meißner
6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Jon Cinque
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
carllin
ccc013e134
Handle removing slots during account scans (#17471) 2021-06-14 21:04:01 -07:00
Dmitri Makarov
361c1bdd57
Fix file permissions (#17910) 2021-06-12 02:03:32 +00:00
Jack May
fa6bdd2d12
Warn about InstructionError meta (#17864) 2021-06-10 15:13:56 -07:00
Arthur Greef
28fdfed1ba
Blake3 syscall (#17358) 2021-06-08 11:04:10 -07:00
Jack May
83b9a046d1
Add missing ProgramError to InstructionError mappings (#16231)
* Add missing ProgramError to InstructionError mappings

* add note

* Clarify process of adding new program error
2021-06-03 21:59:04 +00:00
Jack May
2b50529265
Add memory operation syscalls (#16447) 2021-06-01 15:33:17 -07:00
Jeff Washington (jwash)
44831c18d2
reuse work in is_non_loader_key (#16521) 2021-05-21 10:07:04 -05:00
Dmitri Makarov
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
Tao Zhu
0781fe1b4f
Upgrade Rust to 1.52.0 (#17096)
* Upgrade Rust to 1.52.0
update nightly_version to newly pushed docker image
fix clippy lint errors
1.52 comes with grcov 0.8.0, include this version to script

* upgrade to Rust 1.52.1

* disabling Serum from downstream projects until it is upgraded to Rust 1.52.1
2021-05-19 09:31:47 -05:00
Jack May
8eb05d6ed4
Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Jon Cinque
4b60b2863e
sdk: Add get_instance_packed_len for variable-size types (#17092)
* sdk: Add get_instance_packed_len for variable-size types

* Add comment for get_packed_len

* Add more tests
2021-05-10 23:31:02 +02:00
Trent Nelson
cfc1cb1aee SDK: Factor out pubkey on-curve test to a helper 2021-04-28 20:10:19 -06:00
Trent Nelson
9b7120bf73 SDK: More conversions for Pubkey 2021-04-27 17:54:02 -06:00
Justin Starry
8ce4a8d6ab
Annotate clock constants with computed values for quick refeerence (#16812) 2021-04-25 22:05:00 +08:00
Michael Vines
1500011fc6 get_packed_len() now correctly handles u32/i32 types 2021-04-23 13:39:42 -07:00