Commit Graph

2395 Commits

Author SHA1 Message Date
Justin Starry 25be2be4fc
Deprecate static lists of reserved keys (#833) 2024-04-17 01:15:53 +08:00
Tao Zhu f0375596dd
calculated fee details can be cleared out by lamports_per_signature (#704)
* fee_details supports backward compatibility of using lamports_per_signature to zero out transaction fee

* need to fully furnish nonce account for test

* Apply suggestions from code review

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>

* Apply suggestions from code review

* revert hash_queue locking to original behavior

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-04-16 11:36:40 -05:00
Justin Starry 2e911559d0
Deprecate `is_builtin_key_or_sysvar` function (#788) 2024-04-16 10:03:13 +08:00
Justin Starry 056bfcede7
Deprecate `is_sysvar_id` function (#789)
Deprecate is_sysvar_id
2024-04-16 06:22:52 +08:00
Justin Starry f27f91bed7
Deprecate `solana_program::sdk_ids` module (#790)
Deprecate solana_program::sdk_ids module
2024-04-16 06:21:20 +08:00
Kevin Heavey ae316f0341
sdk: move assert_matches and solana-logger to dev deps (#801)
move assert_matches and solana-logger to sdk dev deps
2024-04-15 20:24:42 +02:00
Kevin Heavey 76502b40d0
program: remove unused serde_json dep (#800)
remove unused serde_json dep from solana-program
2024-04-14 16:08:22 -06:00
Justin Starry 09241ae9c3
Use reserved account keys list to restrict tx write locks (#541)
* Plumb through reserved account keys set

* Plumb through tests
2024-04-13 09:37:58 +08:00
Justin Starry cb13b39118
Track reserved account keys in bank (#769) 2024-04-13 09:12:00 +08:00
Ashwin Sekar 411fdc9312
blockstore: scaffolding for chained merkle root conflict detection (#719)
* blockstore: scaffolding for chained merkle root conflict detection

* pr feedback: use dummy feature key until final plumbing
2024-04-10 22:46:33 +00:00
ripatel-fd 4b6d274887
Fix crash if vote state is malformed (#715)
* Fix crash if vote state is malformed

* Fix vote program crash if clock rewinds

Return an instruction error instead of panicking if the vote
program detects the vote program's vote authority history is
newer than the current clock.

---------

Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2024-04-10 17:12:56 -04:00
Justin Starry 72ee270943
Update cargo metadata to Anza (#635) 2024-04-10 14:29:48 +08:00
Tyera 2470b45468
Check EpochRewards::active within the Stake Program (#617)
* Add new StakeError variant

* Add closure to return error if EpochRewards::active

* Use error_during_epoch_rewards for Instructions that mutate stake accounts

* Use try instead of manually matching Ok/Err

* Consolidate error_during_epoch_rewards check

* Add new test helper

* Add test demonstrating which ix return StakeError::EpochRewardsActive

* Remove single-use fn
2024-04-09 17:29:50 -06:00
Andrew Fitzgerald 1744e9efd7
BankingStage Forwarding Filter (#685)
* add PacketFlags::FROM_STAKED_NODE

* Only forward packets from staked node

* fix local-cluster test forwarding

* review comment

* tpu_votes get marked as from_staked_node
2024-04-09 23:12:26 +00:00
Lijun Wang 2b0391049d
transaction performance tracking -- streamer stage (#257)
* transaction performance tracking -- streamer stage
2024-04-04 13:19:13 -07:00
Ashwin Sekar f975e92eba
ff cleanup: reduce_stake_warmup_cooldown (#470)
* ff cleanup: reduce_stake_warmup_cooldown

* update instruction comments to indicate stake config is unused
2024-04-04 18:03:35 +00:00
Emanuele Cesena 64260fc831
Simd 129: alt_bn128 syscalls - simplified error code (#294)
* alt_bn128: simplify errors in sycalls (alt_bn128, compress, poseidon)

* add TODO for feature gate. remove validate from compress

* add feature gate

* fix one more error case

* all changes under feature gate

* revert removing from()

* return unexpected errors in lib

* add comment to remove error types, once the feature gate is activated

* remove unnecessary/impossible error

* fix mispelled comments
2024-04-03 09:09:54 +09:00
Jeff Washington (jwash) ccb09866b5
stop requiring data allocation to check for rent (#543) 2024-04-02 13:25:43 -05:00
Ashwin Sekar a468ff2999
vote: add TowerSync ix (#365)
* vote: add TowerSync ix

* fork_id -> block_id
2024-04-02 10:02:10 -07:00
Tyera ecb4f62887
Simd 118: extend EpochRewards sysvar (#428)
* Update EpochRewards sysvar

* Update Clone trait

* Update doctests

* Update bank to new sysvar fields

* Update runtime tests

* Update syscall test

* Update tests

* Clean up doctest EpochRewards construction
2024-03-27 19:24:06 -06:00
Tyera bcf3d809c9
Simd 118: rekey partitioned epoch rewards feature (#427)
Rekey partitioned epoch rewards feature
2024-03-26 10:13:25 -06:00
Brooks 24fe473b46
clippy: Automated fixes for Rust 1.77.0 (#390) 2024-03-22 13:48:46 -04:00
Alexander Meißner 8f830c418c
Rekey - alt_bn128 and poseidon_syscall (#319)
Adds simplify_alt_bn128_syscall_error_codes.
2024-03-22 07:58:47 +01:00
Tao Zhu 1e08e90498
Add functions to collect executed transactions fee in details; (#178)
* Add functions to collect executed transactions fee in details;

* remove unnecessary derive attributes

* change function name from add to accumulate; remove collector_fee_details from PartialEq

* add AbiExample

* add test

* share function to withdraw errored transaction

* more tests
2024-03-21 04:33:35 +00:00
HaoranYi 0f8f8cd970
Revert deprecate executable feature (#309)
* revert deprecate executable feature

* add native loader account transfer test

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-03-20 10:54:15 -05:00
Ashwin Sekar 228413ca8a
vote: reuse ff to gate tvc constant update from 8 -> 16 (#322) 2024-03-19 22:26:13 +00:00
Ashwin Sekar b27c80a920
vote: deprecate unused legacy vote tx plumbing (#274) 2024-03-15 22:21:52 -07:00
ripatel-fd fb01ab28ec
Use static memory layout for all sysvars (#249)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2024-03-15 14:59:41 -06:00
Andrew Fitzgerald 4425dbea91
congestion_multiplier as u64 (#267) 2024-03-15 12:37:15 -07:00
Justin Starry 72d6d78d05
Add `reserved_account_keys` module to sdk (#84) 2024-03-14 15:03:44 +08:00
ripatel-fd 9b16df25d3
sdk: support Pubkey::to_bytes as constexpr (#220) 2024-03-13 13:24:39 +01:00
Brooks aaf3a91a95
Removes redundant imports (#193) 2024-03-12 14:25:59 +08:00
Tyera 53e7b9ac47
Version bump v2.0.0 (#121)
* Put solana-svm in alphabetical order

* Update version to 2.0.0.

---------

Co-authored-by: Will Hickey <will.hickey@solana.com>
2024-03-11 12:11:22 -06:00
Jon C 377e1f9112
runtime: Move `From<AddressLookupError>` from sdk (#141)
sdk: Move `From<AddressLookupError>` into runtime
2024-03-08 11:02:33 +01:00
Tao Zhu 9770cd9083
add precompile signature metrics to cost tracker (#133) 2024-03-08 00:48:35 +00:00
bji 940bd30ac9
Update maximum credits awarded per vote from 8 to 16 (#127)
This reduces the maximum penalty for voting after the grace period by
roughly 50%.  This new value was derived from looking at the effects
that TVC at max credits 8 would have for recent epochs (500+) and
noting that the effect was a bit extreme, up to and exceeding 10%
"bonus" for faster voters.  This change reduces that maximum bonus by
roughly half.

In addition, the TVC feature key has been changed.
2024-03-07 19:52:22 +00:00
Jon C b6f6fdbc9a
frozen-abi: Remove proc_macro_hygiene featurization (#109) 2024-03-06 15:32:05 +01:00
Yihau Chen 58e9a19f11 [anza migration] ci: fix path (#8)
* ci: fix windows build

* ci: publish sdk docker image with the new name

* update automerge status
2024-03-03 12:31:24 +08:00
Brooks 3ec020f742
Removes cap_accounts_data_size_per_block feature (#35381) 2024-03-01 14:22:25 -05:00
Brooks 672943224e
Removes cap_accounts_data_len feature (#35378) 2024-03-01 14:22:19 -05:00
Han Yang e3b9d7fbb3
SDK: refactor `Signer` and `Signers` traits (#34984)
* read_keypair_file\((.+?)\)[\n\r\s]+.unwrap\(\)[\n\r\s]+.into\(\) -> Box::new(read_keypair_file().unwrap()), Presigner::new\((.*?)\).into\(\) -> Box::new(Presigner::new())

* compiles

* moar general

* doc

* Result impls FromIterator

* doc
2024-03-01 12:34:32 +01:00
Justin Starry c9c2fbbdd6
Add `Message::is_maybe_writable` (#35340) 2024-02-29 10:27:33 +08:00
Justin Starry 312f786abf
Rename `SanitizedMessage::try_from` to `try_from_legacy_message` (#35338)
* Simplify and refactor tx message creation in tests

* Rename SanitizedMessage::try_from to try_from_legacy_message
2024-02-29 08:25:22 +08:00
Lucas Steuernagel 8f3e960640
Add tests for private functions in SVM `account_loader.rs` (#35334) 2024-02-28 14:17:45 -03:00
Tao Zhu 089cead024
add bench for precompiled programs (#35310)
* add bench for ed25519 instruction

* add bench for secp256k1 instruction

* Apply suggestions from code review

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>

* prepare unique txs for benching

* use iter::Cycle for endless loop

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-02-28 09:06:55 -06:00
Lucas Steuernagel 8be9930c98
Bump platform tools version (#35330)
Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
2024-02-27 17:58:26 -03:00
Michal Rostecki e74d5ccca3
hash: Use `finalize().into()` instead of `try_into()` for hash results (#35300)
`sha2` and `sha3` crates already moved to `generic-array` 0.14.7,
which means that we can safely convert the hash result to a sized
array just by calling `finalize().into()`, which doesn't return
any errors.
2024-02-23 19:31:32 -07:00
Tao Zhu 139b9c8c25
Add fee_details to fee calculation (#35021)
* add fee_details to fee calculation

* fix - no need to round after summing u64

* feature gate on removing unwanted rounding
2024-02-23 08:58:48 -06:00
HaoranYi 141048ee74
update comments for is_builtin (#35258)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-02-20 16:45:38 -06:00
Ashwin Sekar befe8b9d98
replay: reload tower if set-identity during startup (#35173)
* replay: reload tower if set-identity during startup

* pr feedback: add unit tests

* pr feedback: use tower.node_pubkey, more descriptive names
2024-02-20 09:30:46 -08:00