Commit Graph

3470 Commits

Author SHA1 Message Date
github-actions[bot] 135742fe3c
Bump version to v2.0.15 (#3210)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-18 21:19:04 +08:00
github-actions[bot] 0b643611ac
Bump version to v2.0.14 (#3056)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-03 10:58:03 -05:00
github-actions[bot] 1715788830
Bump version to v2.0.13 (#3048)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-02 22:49:41 +08:00
github-actions[bot] 3ade64bd13
Bump version to v2.0.12 (#3012)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-27 16:53:32 -05:00
github-actions[bot] 4255f52d4a
Bump version to v2.0.11 (#2942)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-25 14:08:51 -05:00
github-actions[bot] b55220fd88
Bump version to v2.0.10 (#2864)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-08 14:52:38 +08:00
mergify[bot] a829deae22
v2.0: SIMD-0118: fix `total_rewards` for recalculation (backport of #2780) (#2794)
* SIMD-0118: fix `total_rewards` for recalculation (#2780)

* Add new feature key

* Wrap existing code with new feature

* Extend test harness

* Make test fail

* Populate EpochRewards::total_rewards from PointValue

* Remove superfluous struct field

* Fixup tests

(cherry picked from commit 4470f6d96e)

# Conflicts:
#	programs/bpf_loader/src/syscalls/mod.rs
#	sdk/src/feature_set.rs

* Fix conflicts

---------

Co-authored-by: Tyera <tyera@anza.xyz>
2024-09-03 10:31:12 -06:00
github-actions[bot] ea2634f950
Bump version to v2.0.9 (#2804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-31 11:46:28 +08:00
github-actions[bot] 5525ac06ff
Bump version to v2.0.8 (#2727)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 15:00:20 +08:00
github-actions[bot] a4f9b13ee2
Bump version to v2.0.7 (#2651)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-19 15:03:32 -06:00
github-actions[bot] 35389e67a9
Bump version to v2.0.6 (#2518)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-10 01:09:10 +08:00
Will Hickey 57a09f19f9
Bump rbpf version to 0.8.4 (backport of #2515) (#2514)
Bump rbpf version to 0.8.4
2024-08-08 23:14:11 +00:00
github-actions[bot] 505299413d
Bump version to v2.0.5 (#2419)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-03 15:04:53 +08:00
mergify[bot] 0b1143e149
v2.0: verifies retransmitter signature on chained Merkle shreds (backport of #1735) (#2201)
verifies retransmitter signature on chained Merkle shreds (#1735)

(cherry picked from commit 6f94686181)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2024-08-02 18:01:46 +00:00
mergify[bot] 4234b1ba45
v2.0: chore: bump openssl to 0.10.66 (backport of #2228) (#2235)
chore: bump openssl to 0.10.66 (#2228)

(cherry picked from commit 02918b89f6)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
2024-07-25 23:39:54 +08:00
github-actions[bot] 9b4fcdcfa9
Bump version to v2.0.4 (#2223)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-23 13:52:06 +08:00
mergify[bot] 792c5d6fff
v2.0: stake-program: `MoveStake` and `MoveLamports` (backport of #1415) (#1928)
stake-program: `MoveStake` and `MoveLamports` (#1415)

implement two new instructions for moving delegated stake and undelegated lamports, respectively, between accounts with the same Authorized and Lockup using the Staker authority

(cherry picked from commit 361ade4439)

Co-authored-by: hana <81144685+2501babe@users.noreply.github.com>
2024-07-17 16:39:44 -07:00
mergify[bot] b57b883355
v2.0: Fix BankForks::new_rw_arc memory leak (backport of #1893) (#2066)
* Fix BankForks::new_rw_arc memory leak (#1893)

(cherry picked from commit d441c0f577)

* Fix flaky test test_banking_stage_entries_only_central_scheduler (#2082)

---------

Co-authored-by: Andrei Silviu Dragnea <andreisilviudragnea@gmail.com>
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-07-17 16:11:40 -07:00
mergify[bot] 5d680fd1a2
v2.0: blockstore: only consume duplicate proofs from root_slot + 1 on startup (backport of #1971) (#2114)
blockstore: only consume duplicate proofs from root_slot + 1 on startup (#1971)

* blockstore: only consume duplicate proofs from root_slot + 1 on startup

* pr feedback: update test comments

* pr feedback: add pub behind dcou for test fns

(cherry picked from commit 2a48564b59)

Co-authored-by: Ashwin Sekar <ashwin@anza.xyz>
2024-07-16 21:02:23 -04:00
github-actions[bot] 3e2d22e26a
Bump version to v2.0.3 (#2080)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-15 18:36:49 +08:00
mergify[bot] e24b410429
v2.0: Clean up disable_fees_sysvar feature (backport of #2003) (#2043)
Clean up disable_fees_sysvar feature (#2003)

* Clean up disable_fees_sysvar

* Remove bank fees test

* Remove unused rpc response types

* Fixup sysvar_cache tests

* Remove fees-sysvar from bootstrap_validator_stake_lamports; no longer included

* Update account counts, since fees no longer touched

* Update bank hashes in test, since fees sysvar is not populated

* Remove test case passing fees sysvar as account

(cherry picked from commit 1c34908d03)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 18:14:05 -06:00
mergify[bot] 9a9cb755cd
v2.0: Remove deprecated symbols from solana-client (mostly re-exports) (backport of #1992) (#2041)
Remove deprecated symbols from solana-client (mostly re-exports) (#1992)

* Remove usage of deprecated re-export from SendTransactionService

* Remove usage of deprecated re-export from core

* Remove usage of deprecated re-export from solana-dos

* Remove deprecated ConnectionCache methods

* Remove deprecated udp_client re-export

* Remove deprecated tpu_connection re-export

* Remove deprecated quic_client re-export

(cherry picked from commit 3cd7621a81)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 18:13:15 -06:00
mergify[bot] ec08d81213
v2.0: Remove deprecated symbols from recent_blockhashes_account (backport of #2004) (#2009)
Remove deprecated symbols from recent_blockhashes_account (#2004)

* Move recent_blockhashes_account to runtime

* Fixup imports

* Reduce pub

* Remove unused method

* Duplicate code to limit pub and dependency complexity

* Move test-only fn into tests module

(cherry picked from commit f77658b9e4)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-08 10:35:24 -06:00
mergify[bot] 2e5f5d5b4d
v2.0: Remove deprecated address_lookup_table_account re-export (backport of #1972) (#1990)
* Remove deprecated address_lookup_table_account re-export (#1972)

* Remove deprecated re-export

* Remove deprecated stuff from example_mocks

* Remove deprecated programs/alt re-export

(cherry picked from commit f681fe87d5)

# Conflicts:
#	sdk/program/src/lib.rs

* Fix conflict

---------

Co-authored-by: Tyera <tyera@anza.xyz>
2024-07-03 18:38:30 +00:00
Tao Zhu f8ae688668
Revert "v2.0: Refactor and additional metrics for cost tracking (backport of #1888) (#1900) (#1937)
Revert "v2.0: Refactor and additional metrics for cost tracking (backport of #1888) (#1900)"

This reverts commit 0aef62eac7.
2024-07-01 10:33:44 -06:00
mergify[bot] 0aef62eac7
v2.0: Refactor and additional metrics for cost tracking (backport of #1888) (#1900)
* Refactor and additional metrics for cost tracking (#1888)

* Refactor and add metrics:
- Combine remove_* and update_* functions to reduce locking on cost-tracker and iteration.
- Add method to calculate executed transaction cost by directly using actual execution cost and loaded accounts size;
- Wireup histogram to report loaded accounts size;
- Report time of block limits checking;
- Move account counters from ExecuteDetailsTimings to ExecuteAccountsDetails;

* Move committed transactions adjustment into its own function

(cherry picked from commit c3fadacf69)

* rename cost_tracker.account_data_size to better describe its purpose is to tracker per-block new account allocation

---------

Co-authored-by: Tao Zhu <82401714+tao-stones@users.noreply.github.com>
Co-authored-by: Tao Zhu <tao@solana.com>
2024-06-28 16:09:36 -05:00
mergify[bot] 04bceed0c0
v2.0: spl: Upgrade all crates to v2-only versions (backport of #1872) (#1880)
spl: Upgrade all crates to v2-only versions (#1872)

(cherry picked from commit 6aee8454c0)

Co-authored-by: Jon C <me@jonc.dev>
2024-06-26 18:16:26 +02:00
github-actions[bot] d6041c002b
Bump version to v2.0.2 (#1848)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-25 14:42:34 +08:00
github-actions[bot] 69c0b0edb6
Bump version to v2.0.1 (#1821)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-24 12:53:19 +08:00
Tao Zhu 077a651f01
harden sbf realloc tests (#1600) 2024-06-21 08:34:20 -05:00
Jon C 9bb532abcc
deps: Use bytemuck_derive explicitly instead of "derive" feature on bytemuck (#1799)
* deps: Use bytemuck_derive explicitly

* Missed a couple in zk-token-sdk

* Fix last few bits

* Fixup a re-export

* Use re-exports properly
2024-06-21 12:50:36 +02:00
Sammy Harris a9e3917082
Fix SyscallLogPubkey doc comment (#1805)
* Fix SyscallLogPubkey doc comment

* Update logging.rs
2024-06-20 11:22:16 -06:00
Alexander Meißner eceaf3433b
CI - SBPF program build script (#1581)
* Replaces the rust build script by a makefile
2024-06-20 13:40:00 +02:00
Lucas Ste 974c013c04
Make futures crate optional in solana-type-overrides (#1792) 2024-06-20 07:49:10 -03:00
Kevin Heavey 6cf32250ee
use bytemuck_derive 1.7.0 explicitly in sdk and program (#1793)
* use bytemuck_derive 1.7.0 explicitly in sdk and program

* explicitly activate the derive feature of bytemuck in zk-sdk
2024-06-20 09:42:37 +02:00
Alessandro Decina 2107adcf35
bpf_loader: use an explicit thread-local pool for stack and heap memory (#1370)
* Rename ComputeBudget::max_invoke_stack_height to max_instruction_stack_depth

The new name is consistent with the existing
ComputeBudget::max_instruction_trace_length.

Also expose compute_budget:MAX_INSTRUCTION_DEPTH.

* bpf_loader: use an explicit thread-local pool for stack and heap memory

Use a fixed thread-local pool to hold stack and heap memory. This
mitigates the long standing issue of jemalloc causing TLB shootdowns to
serve such frequent large allocations.

Because we need 1 stack and 1 heap region per instruction, and the
current max instruction nesting is hardcoded to 5, the pre-allocated
size is (MAX_STACK + MAX_HEAP) * 5 * NUM_THREADS. With the current
limits that's about 2.5MB per thread. Note that this is memory that
would eventually get allocated anyway, we're just pre-allocating it now.

* programs/sbf: add test for stack/heap zeroing

Add TEST_STACK_HEAP_ZEROED which tests that stack and heap regions are
zeroed across reuse from the memory pool.
2024-06-20 08:57:11 +07:00
Kevin Heavey 2bdba73ee6
program: move itertools to dev-dependencies (#1782)
* port join from itertools and use it in program_stubs.rs

* move itertools to dev-dependencies of solana-program

* add comment to join fn

* more concise replacement for join fn

Co-authored-by: Jon C <me@jonc.dev>

* remove join fn

---------

Co-authored-by: Jon C <me@jonc.dev>
2024-06-19 23:08:19 +02:00
dependabot[bot] 403b793fde
build(deps): bump url from 2.5.1 to 2.5.2 (#1788)
* build(deps): bump url from 2.5.1 to 2.5.2

Bumps [url](https://github.com/servo/rust-url) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.1...v2.5.2)

---
updated-dependencies:
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 23:16:36 +08:00
dependabot[bot] c8c23e2246
build(deps): bump bytemuck from 1.16.0 to 1.16.1 (#1789)
* build(deps): bump bytemuck from 1.16.0 to 1.16.1

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.16.0 to 1.16.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.0...v1.16.1)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 23:16:26 +08:00
Alexander Meißner da6f7f2d31
Refactor - Avoid host build of SBPF program test crates (#1711)
* Removes ProgramTest from simulation tests.

* Removes ProgramTest from sysvar syscall tests.

* Workaround for rustc crash caused by 16 byte aligned memcpy.

* Deduplicates test_program_sbf_sanity.

* Moves mem and remaining_compute_units into test_program_sbf_sanity().

* Removes unused dev-dependencies in Cargo.toml.

* Removes crate-type = lib from Cargo.tomls.

* Adds SBF_OUT_DIR env to CI script.

* Adds "sysvar" to build.rs.
2024-06-18 23:10:40 +02:00
Sean Young cd7f34ecfc
Ensure mapping of callee is updated with direct mapping (#1093)
Consider this scenario:

 - Program increases length of an account
 - Program start CPI and adds this account as a read-only account
 - In fn update_callee_account() we resize account, which may change
   the pointer
 - Once CPI finishes, the program continues and may read/write from
   the account. The mapping must be up-to-date else we use stale
   pointers.

Note that we always call callee_account.set_data_length(), which
may change the pointer. In testing I found that resizing a vector
from 10240 down to 127 sometimes changes its pointer. So, always
update the pointer.
2024-06-18 10:13:00 +01:00
Kevin Heavey b855bd0c54
Extract curve25519 crate from zk-token-sdk (#951)
* extract curve25519 crate

* remove obsolete comment

* fix Cargo.toml files

* fix imports

* update lock file

* remove unused deps from zk-token-sdk

* fmt

* add solana-curve25519 patch

* add missing override to programs/sbf/Cargo.toml

* copy over an allow()

* move new crate to curves dir

* use workspace version

* add back missing dev dep

* add missing dependencies to programs/sbf

* fmt

* move dep to the correct dependency table

* remove #[cfg(not(target_os = "solana"))] above errors mod
2024-06-18 14:08:57 +09:00
samkim-crypto 563d1c04d6
[sdk] Add ZK Elgamal Proof program feature gate (#1679)
* add `zk-elgamal-proof-program-enabled` feature gate

* reserve account for zk elgamal proof program

* add zk elgamal proof as builtin program

* cargo lock

* cargo sort

* replace feature gate key to start with `zk..`

* add simd number

* update `elgamal_program` to `zk_elgamal_proof_program`
2024-06-18 11:34:34 +09:00
Lucas Ste ebd063eb79
Add Shuttle multithreading test infrastructure (#1634) 2024-06-17 19:24:43 -03:00
Joe C 3af8f0cfdb
Program Runtime: Unify transaction batch program caches (#1399)
* local program cache: add `modified_entries` field

* use `modified_entries` for modified program cache

* invoke context: make `program_cache_for_tx_batch` mutable

* invoke context: unify local program cache instances

* remove `find_program_in_cache` alias
2024-06-17 17:08:13 -05:00
Kevin Heavey 988647d814
remove unused build dep `cc` from solana-program (#1659)
* remove unused build dep `cc` from solana-program

* remove cc from workspace
2024-06-17 08:13:54 -05:00
Kevin Heavey 7e0688341e
remove superfluous usage of allow(dead_code) (#1669) 2024-06-13 22:52:49 +08:00
dependabot[bot] 854620f51d
build(deps): bump lz4 from 1.24.0 to 1.25.0 (#1724)
* build(deps): bump lz4 from 1.24.0 to 1.25.0

Bumps [lz4](https://github.com/10xGenomics/lz4-rs) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/10xGenomics/lz4-rs/releases)
- [Changelog](https://github.com/10XGenomics/lz4-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/10xGenomics/lz4-rs/commits/v1.25)

---
updated-dependencies:
- dependency-name: lz4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 22:01:45 +08:00
dependabot[bot] 791f6ba5cf
build(deps): bump proc-macro2 from 1.0.84 to 1.0.85 (#1723)
* build(deps): bump proc-macro2 from 1.0.84 to 1.0.85

Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.84 to 1.0.85.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 22:01:29 +08:00
Jon C 9be66e975e
sdk-macro: Move package_metadata macro to separate crate (#1713)
* sdk-macro: Move package_metadata macro to separate crate

* Update sbf lockfile

* Cargo fmt
2024-06-13 13:05:58 +02:00