954 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
Jack May
9be988db41
Fix memoverlap check (#19232) 2021-08-16 16:16:52 -07:00
Jack May
0b50bb2b20
Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
Tao Zhu
414d904959
Reject blocks for costs above the max block cost (#18994)
* added realtime cost checking logic to reject block that would exceed max limit:
- defines max limits at block_cost_limits.rs
- right after each bath's execution, accumulate its cost and check again
  limit, return error if limit is exceeded

* update abi that changed due to adding additional TransactionError

* To avoid counting stats mltiple times, only accumulate execute-timing when a bank is completed

* gate it by a feature

* move cost const def into block_cost_limits.rs

* redefine the cost for signature and account access, removed signer part as it is not well defined for now

* check if per_program_timings of execute_timings before sending
2021-08-12 10:48:47 -05:00
Alexander Meißner
85befbc8cd
Removes bpf_loader_upgradeable_program feature gate. (#19102) 2021-08-11 00:08:57 +02: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
Brian Anderson
b67ffab370
Add more API documentation for Rust RpcClient (#19021)
* Add doc links to Transaction API docs

* Add more RpcClient API docs

* Reflow some rpc_client docs

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update sdk/src/transaction.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update RpcClient docs per review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-08-05 15:03:33 -06:00
Jon Cinque
2b33c0c165
stake: Allow stakes with unmatched credits observed to merge (#18985)
* stake: Allow stakes with unmatched credits observed to merge

* Address feedback

* Remove branch by doing a ceiling in one calc
2021-08-04 10:43:34 -04:00
Alexander Meißner
0a63f65c03
Bumps solana_rbpf to v0.2.14 (#18869)
* Bumps solana_rbpf to v0.2.14

* Feature gate for verify_mul64_imm_nonzero as discussed in #17520.
2021-08-04 09:50:28 +02: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
ef17cf3bdb
Cleanup loader features (#18977) 2021-07-29 15:03:00 -07:00
Jack May
9529284194
Nonce gets blockhash from invoke_context (#18950) 2021-07-29 01:50:20 -07:00
sakridge
84e78316b1
Write helper for multithread update (#18808) 2021-07-29 03:16:36 +02:00
Jack May
0167daa116
cleanup feature consistent_recent_blockhashes_sysvar (#18932) 2021-07-28 10:25:33 -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
Brian Anderson
846787e7f4
Autolink URL in docs for sdk::feature_set (#18874) 2021-07-23 18:48:37 +00:00
Jack May
7fc4cfebc8
Rename BpfComputeBudget (#18768) 2021-07-22 10:18:51 -07:00
Jon Cinque
51f3b9aa7c
feature: add new token program feature (#18780)
* feature: add new token program feature

* Fixup test

* Update to spl-token v3.2.0

* Update Cargo.lock + fmt

* Update token program version in fetch-spl.sh

* Bump associated token program to 1.0.3

* Add aToken so
2021-07-21 14:34:25 +02: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
Jack May
5f9f3724d0
Remove unused compute budget item (#18706) 2021-07-16 09:12:17 +00:00
Jack May
6cf3c1ab8f
tx wide compute budget (#18631) 2021-07-16 00:31:22 -07:00
Justin Starry
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
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
sakridge
7f2254225e
Move entry/poh to own crate to speed up poh bench build (#18225) 2021-07-14 14:16:29 +02:00
Kirill Fomichev
5cea25ac3e
Add method id to SysbarId trait (#18604) 2021-07-13 16:01:32 +00:00
Ryo Onodera
f96de208e2 Implement MockInvokeContext::is_feature_active properly 2021-07-09 09:08:38 -07:00
Ryo Onodera
f029af0fca Remove sysvar special cases for rent and assign 2021-07-09 09:08:38 -07: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
Jack May
2867584985
Bump compute budget for neon evm (#17700) 2021-07-08 10:43:34 -07:00
Jack May
ccdf93e2b8
featurize_policy_update (#18492) 2021-07-07 13:19:17 -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
jbiseda
a86ced0bac
generate deterministic seeds for shreds (#17950)
* generate shred seed from leader pubkey

* clippy

* clippy

* review

* review 2

* fmt

* review

* check

* review

* cleanup

* fmt
2021-07-07 08:21:12 -07:00
Justin Starry
72da25e9d2
Refactor verify_and_update write privileges check (#18468) 2021-07-07 09:14:00 -05: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
Alexander Meißner
7462c27d07
Refactoring: Unify account_deps and accounts (#17898)
* Changes ThisInvokeContext::get_account() to use accounts instead of pre_accounts.

* Adds explicit keys to accounts to make them symmetric to account_deps.

* Appends account_deps to accounts in transaction loading and removes account_deps everywhere else.
2021-07-05 13:49:37 +02:00
Trent Nelson
2af5ec4f57 sdk: add is_interactive() method Signer trait 2021-07-03 07:33:59 +00:00
Justin Starry
d5961e9d9f
Reject transactions with extra signatures (#18306)
* Reject transactions with extra signatures

* fix tests

* fix check

* fix check

* tx method

* fix checks
2021-07-01 18:06:59 +00:00
Justin Starry
5ca975383c
Remove feature switch for using message hash for already processed check (#18340) 2021-07-01 09:33:55 -05:00
Jon Cinque
bb18ec8893
sdk: Add test to trigger KeypairPubkeyMismatch (#18326) 2021-06-30 20:27:13 +02:00
Sebastian Bor
3a4176aa3e
feat: remove set_upgrade_authority_via_cpi_enabled feature (#17933) 2021-06-22 10:05:33 +01:00
Tyera Eulberg
0ab361b828
Use newly stabilized Duration methods/consts (#18101) 2021-06-22 00:11:16 +00:00
Tyera Eulberg
19fe1dd463
Move stake_weighted_timestamp module (#18114)
* Move timestamp module into runtime

* Less public

* Remove unused enum
2021-06-21 16:14:54 -06:00
Alexander Meißner
6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00