Commit Graph

2374 Commits

Author SHA1 Message Date
HaoranYi 304333405c 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 16:28:38 -05:00
Ashwin Sekar 7ad99f3b11 vote: reuse ff to gate tvc constant update from 8 -> 16 (#322) 2024-03-20 16:28:38 -05:00
Ashwin Sekar d3a7d99ef0 vote: deprecate unused legacy vote tx plumbing (#274) 2024-03-20 16:24:48 -05:00
ripatel-fd 133bd7f652 Use static memory layout for all sysvars (#249)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2024-03-15 22:25:14 -05:00
Andrew Fitzgerald 4550245379 congestion_multiplier as u64 (#267) 2024-03-15 22:25:14 -05:00
Justin Starry 0d1cb92ed9 Add `reserved_account_keys` module to sdk (#84) 2024-03-15 22:25:14 -05:00
ripatel-fd f2d77f0209 sdk: support Pubkey::to_bytes as constexpr (#220) 2024-03-15 22:25:14 -05:00
Brooks 87a5893d84 Removes redundant imports (#193) 2024-03-15 22:22:45 -05:00
Tyera 4e63141e38 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-15 22:22:43 -05:00
bji f219fbc8f0 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-15 21:32:41 -05:00
Jon C ce10dc1043 runtime: Move `From<AddressLookupError>` from sdk (#141)
sdk: Move `From<AddressLookupError>` into runtime
2024-03-09 13:28:08 -06:00
Tao Zhu ca41b16e47 add precompile signature metrics to cost tracker (#133) 2024-03-09 13:28:07 -06:00
Jon C 1f7e6f269b frozen-abi: Remove proc_macro_hygiene featurization (#109) 2024-03-09 13:23:06 -06:00
steviez e81ecfbe9f
Revert "remove repetitive words (#35434)" (#35436)
This reverts commit 556a749948.
2024-03-08 23:36:52 -06:00
gcmutator 556a749948
remove repetitive words (#35434)
Signed-off-by: gcmutator <329964069@qq.com>
2024-03-08 23:01:33 -06:00
Will Hickey 4cb7c315b8 Revert "[anza migration] ci: fix path (#8)"
This reverts commit 58e9a19f11.
2024-03-05 10:19:20 -06:00
Yihau Chen d2a4f0f5e6 [anza migration] ci: fix path (#8)
* ci: fix windows build

* ci: publish sdk docker image with the new name

* update automerge status
2024-03-05 09:43:25 -06: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