Commit Graph

2369 Commits

Author SHA1 Message Date
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
behzad nouri d7ae65fc46
removes feature-gated code revising turbine epoch stakes for shreds propagation (#35226) 2024-02-20 16:04:32 +00:00
Brooks 012f588482
Removes copying owner when serializing Account (#35118)
* Removes copying owner when serializing Account

* Provide generic AbiExample impls for &T and &[T]

---------

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2024-02-20 10:16:46 -05:00
Will Hickey 30adda4a71
Update version to 1.19.0 (#35168) 2024-02-19 15:43:58 -05:00
Joe C 78e187f220
bpf-loader-upgradeable: export `get_program_data_address` helper (#35131) 2024-02-16 21:00:50 +01:00
Sergey Timoshin d268139a0e
fix: correct typo in alt_bn128 function names. (#35210)
The typo in the function names convert_edianness_64 and convert_edianness_128 has been corrected to convert_endianness_64 and convert_endianness_128 respectively.
2024-02-16 19:59:15 +01:00
Dmitri Makarov eeb0cf1ea8
SVM: Move nonce_info from accounts-db to Solana SDK (#35138) 2024-02-08 15:01:15 -05:00
Pankaj Garg 28a320d815
SVM: Move `RentCollector` to sdk (#35122) 2024-02-07 16:38:42 -08:00
Dmitri Makarov b9ee3b475b
SVM: Move RentDebits from accounts-db to Solana SDK (#35135) 2024-02-07 15:10:17 -08:00
Joe C 3ddd2352a1
sdk: add `Immutable` and `IncorrectAuthority` to `ProgramError` (#35113) 2024-02-07 15:35:29 -06:00
Dmitri Makarov 2c0001b530
SVM: Move RewardInfo from accounts-db to Solana SDK (#35120) 2024-02-07 10:55:39 -08:00
Yihau Chen 8363ebfd64
ci: merge docker images (#35078)
* ci: add new ci docker image

* ci: use the new docker image

* fix shellcheck

* add readme for the new docker image

* remove old docker images

* remove unused check in docs/build.sh

* use the new image in net.sh
2024-02-07 15:17:33 +08:00
Tyera Eulberg 57bbd3363c Revert "Populate partitioned-rewards PDA during calculation (#34624)"
This reverts commit 4385ed11b1.
2024-02-05 19:54:19 -07:00
Tyera Eulberg d7179e4fa0 Revert "Define epoch-rewards partition data program id (#34862)"
This reverts commit 8aa726bfdf.
2024-02-05 19:54:19 -07:00
Jon C 3646291dc6
sdk: Do not derive AbiEnum on InstructionError for Solana builds (#35038) 2024-02-02 00:00:31 +01:00
Tao Zhu 0dcac3fe7c Revert "Remove congestion multiplier from calculate fee (#34865)"
This reverts commit 73d3973c7c.
2024-01-30 17:30:01 -06:00
Tao Zhu df2ee120e9 Revert "separate priority fee and transaction fee from fee calculation (#34757)"
This reverts commit 5ecc47ec5a.
2024-01-30 17:30:01 -06:00
Tao Zhu 15423928c1 Revert "refactor unused parameter (#34970)"
This reverts commit 083890928f.
2024-01-30 17:30:01 -06:00
hana c99427eb9e
solana-program: only decode prior_voters if needed (#34972) 2024-01-27 11:10:45 -08:00
behzad nouri d4fdcd940a
adds feature to enable chained Merkle shreds (#34916)
During a cluster upgrade when only half of the cluster can ingest the new shred
variant, sending shreds of the new variant can cause nodes to diverge.
The commit adds a feature to enable chained Merkle shreds explicitly.
2024-01-27 15:03:16 +00:00
Tao Zhu 083890928f
refactor unused parameter (#34970) 2024-01-26 12:28:44 -06:00
Ashwin Sekar 93271d91b0
gossip: notify state machine of duplicate proofs (#32963)
* gossip: notify state machine of duplicate proofs

* Add feature flag for ingesting duplicate proofs from Gossip.

* Use the Epoch the shred is in instead of the root bank epoch.

* Fix unittest by activating the feature.

* Add a test for feature disabled case.

* EpochSchedule is now not copyable, clone it explicitly.

* pr feedback: read epoch schedule on startup, add guard for ff recache

* pr feedback: bank_forks lock, -cached_slots_in_epoch, init ff

* pr feedback: bank.forks_try_read() -> read()

* pr feedback: fix local-cluster setup

* local-cluster: do not expose gossip internals, use retry mechanism instead

* local-cluster: split out case 4b into separate test and ignore

* pr feedback: avoid taking lock if ff is already found

* pr feedback: do not cache ff epoch

* pr feedback: bank_forks lock, revert to cached_slots_in_epoch

* pr feedback: move local variable into helper function

* pr feedback: use let else, remove epoch 0 hack

---------

Co-authored-by: Wen <crocoxu@gmail.com>
2024-01-26 07:58:37 -08:00
Tao Zhu 5ecc47ec5a
separate priority fee and transaction fee from fee calculation (#34757)
add function calculate_fee_details() that returns FeeDetails with base and priority fee separated
2024-01-26 08:24:45 -06:00
hana 0c2d9d25fd
solana-program: VoteState::deserialize() (#34829)
* implement a custom parser for `VoteState` which is usuable in a bpf context
* derive or impl `Arbitrary` for `VoteStateVersions` and its component types, for test builds only
2024-01-25 08:51:41 -08:00
Tyera bbd1fd41ac
Move EpochRewardsHasher to solana-sdk (#34934)
* Move EpochRewardsHasher to solana-sdk

* Cargo.lock

* Apparently we're allowing arithmetic_side_effects in all of runtime

* Move allow stmt to block instead of module

* Also allow in test mod
2024-01-24 16:25:01 -07:00
Tao Zhu 73d3973c7c
Remove congestion multiplier from calculate fee (#34865)
* remove println from a test

* sync fee_structure with fee_rate_governor;
remove congestion_multiplier from calculacte_fee(), leave parameters unused for now.
2024-01-23 12:59:50 -06:00
Tyera 8aa726bfdf
Define epoch-rewards partition data program id (#34862)
* Create new program id for epoch-rewards partition data PDAs

* Remove misleading repr attribute

* Remove storage of HasherKind

* Split up seeds
2024-01-22 19:14:29 -07:00