Commit Graph

26091 Commits

Author SHA1 Message Date
mergify[bot] 4d1256af3b
v2.0: Remove support for deprecated rpc endpoints (backport of #1809) (#1886)
* Remove support for deprecated rpc endpoints (#1809)

* Remove rpc_obsolete_v1_7

* Remove rpc_deprecated_v1_7

* Remove rpc_deprecated_v1_9

* Add CHANGELOG entry

* Add another CHANGELOG entry

(cherry picked from commit 83527d9577)

# Conflicts:
#	CHANGELOG.md

* Fix conflict

---------

Co-authored-by: Tyera <tyera@anza.xyz>
2024-06-27 13:51:48 -06:00
mergify[bot] b463b9255c
v2.0: Make unified scheduler opt-in for block verification (backport of #1668) (#1874)
Make unified scheduler opt-in for block verification (#1668)

* Enable unified scheduler for block verification

* Revert making unified scheduler enabled by default

(cherry picked from commit 40508cd03f)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2024-06-27 16:59:05 +09:00
mergify[bot] d40aa491a5
v2.0: Use num_partitions to find specific stake rewards in partitions (backport of #1677) (#1881)
Use num_partitions to find specific stake rewards in partitions (#1677)

* Add helper to find and filter rewards from a slot

* Check feature enabled for desired epoch

* Refactor existing rewards code to support vote-rewards after activation

* Append stake rewards from partitions

* Remove feature deactivation from TestValidator

* Improve comments

* Add comment about retaining feature activation slot logic

* Add custom error and use in getInflationReward

* Review nit

(cherry picked from commit 0496b06f89)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-06-26 19:54:52 -06: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
mergify[bot] d4bd859389
v2.0: Add partitioned epoch rewards to changelog for v2.0 (backport of #1864) (#1868)
Add partitioned epoch rewards to changelog for v2.0 (#1864)

Add partitioned epoch rewards to changelog

(cherry picked from commit f0641effb5)

Co-authored-by: Tyera <tyera@anza.xyz>
2024-06-26 10:15:55 -06: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
mergify[bot] d02dac6077
v2.0: chore: publish solana-tps-client (backport of #1845) (#1846)
chore: publish solana-tps-client (#1845)

(cherry picked from commit 7584773312)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
2024-06-24 16:14:11 -05:00
mergify[bot] 811c87539b
v2.0: chore: remove publish=false from transaction-metrics-tracker/Cargo.toml (backport of #1828) (#1844)
chore: remove publish=false from transaction-metrics-tracker/Cargo.toml (#1828)

(cherry picked from commit ac63c0a78b)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
2024-06-24 15:35:05 -05:00
mergify[bot] edca6057eb
v2.0: chore: add dcou to apply_votes_to_tower (backport of #1831) (#1843)
chore: add dcou to apply_votes_to_tower (#1831)

* add dcou to apply_votes_to_tower

* cargo sort

* fix fmt

(cherry picked from commit 66bdefd178)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
2024-06-24 15:34:53 -05:00
Yihau Chen 9d7f0c148f
v2.0: add .github/CODEOWNERS (#1833) 2024-06-24 15:28:28 -05: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
Will Hickey 16de8b75eb
Update CHANGELOG.md in preparation for branching v2.0 (#1819) 2024-06-21 15:14:04 -05:00
Jeff Washington (jwash) e1e9a8394c
add stats for ancient bytes_from_newest_storages (#1802)
* add stats for ancient bytes_from_smallest_storages

* fix else if

* remove totally unrelated demo code. ugh.
2024-06-21 19:52:15 +00:00
Lucas Ste 437a6b1c92
Verify elf locally for write buffer cli command (#1794)
Verify elf locally for write buffer command
2024-06-21 15:31:32 -03:00
Joe C 1a679f470a
SVM: update spec (#1814) 2024-06-21 12:21:43 -05:00
Joe C 0f956c8ba7
SVM: Refactor program match criteria (#1784)
* SVM: hoist `program_modification_slot` up from bank

* SVM: add `check_program_modification_slot` to processing config

* SVM: hoist `program_match_criteria` up from bank

* SVM: drop `get_program_match_critera` from callbacks
2024-06-21 12:21:26 -05:00
Ryo Onodera 114d94a25e
Improve SchedulerStatus code and test as follow-up (#1797)
* Improve SchedulerStatus code and test as follow-up

* Don't use wait_timeout_while with magic number
2024-06-21 23:21:32 +09: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
samkim-crypto 1279ae6068
[docs] Add ciphertext validity proof docs (#1776)
* docs: add ciphertext validity proof docs

* update docs link to anza's

* remove extra space at the end of line
2024-06-21 10:33:31 +09:00
steviez 3ee204b5cb
ledger-tool: Get shreds from BigTable blocks (#1638)
There is often a desire to examine/replay/etc older blocks. If the
blocks are recent enough, they can be pulled from an actively running
node. Otherwise, the blocks must be pulled down from warehouse node
archives. These archives are uploaded on a per-epoch basis so they are
quite large, and can take multiple hours to download and decompress.

With the addition of Entry data to BigTable, blocks can be recreated
from BigTable data. Namely, we can recreate the Entries with proper PoH
and transaction data. We can then shred them such that they are the
same format as blocks that are produced from the cluster.

This change introduces a new command that will read BigTable data and
insert shreds into a local Blockstore. The new command is:
  $ agave-ledger-tool bigtable shreds ...

Several important notes about the change:
- Shred for some slot S will not be signed by the actual leader for
  slot S. Instead, shreds will be signed with a "dummy" keypair. The
  shred signatures does not affect the ability to replay the block.
- Entry PoH data does not go back to genesis in BigTable. This data
  could be extracted and uploaded from the existing rocksdb archives;
  however, that work is not planned as far as I know. --allow-mock-poh
  can be passed to generate filler PoH data. Blocks created with this
  flag are replayable by passing --skip-poh-verify to ledger-tool.
- A snapshot will be unpacked to determine items such as the shred
  version, tick hash rate and ticks per slot. This snapshot must be in
  the same epoch as the requested slots
2024-06-20 16:02:28 -05:00
Andrew Fitzgerald 8747c3f5e9
Clean up: remove unused _feature_set (#1803) 2024-06-20 15:35:48 -05:00
Justin Starry 66e3acce45
Rename tx counts from committed to executed (#1807) 2024-06-20 13:13:47 -07:00
Justin Starry 0d1ad0dc1d
Reuse compute budget processing (#1700)
* refactor: reuse compute budget limits

* fix tests
2024-06-20 19:22:19 +00:00
Andrew Fitzgerald 98f5d0ea63
ReadWriteAccountSet: use AHashSet (#1265) 2024-06-20 14:04:47 -05:00
Sammy Harris a9e3917082
Fix SyscallLogPubkey doc comment (#1805)
* Fix SyscallLogPubkey doc comment

* Update logging.rs
2024-06-20 11:22:16 -06:00
Tao Zhu 3668d104fe
charging CU for loaded accounts data size (#1356) 2024-06-20 11:54:20 -05:00
knotts 5feacd1d13
typo fixes (#1795) 2024-06-20 11:42:31 -05:00
Andrew Fitzgerald b0737e0e59
change match to an if (#726) 2024-06-20 11:38:14 -05:00
Justin Starry 8da4062644
refactor: consolidate fee deduction for failed transactions (#1636) 2024-06-20 08:03:40 -07:00
Brooks b1815e784d
Round up correctly when truncating max ancient storages (#1781) 2024-06-20 10:54:18 -04:00
Andrew Fitzgerald 246fc3c2f0
PrioGraphScheduler::complete_batch remove TransactionAccountLocks allocation (#1759) 2024-06-20 06:46:27 -05: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
steviez b70e6bbfd2
ledger-tool: Make verify --print-bank-hash support json (#1745)
The bank-hash command in ledger-tool was recently deprecated. However,
the command is used by some of the scripts that coordinate starting up
a fresh cluster. So, the deprecation of bank-hash broke those scripts.

This change fixes the scripts by doing the following:
- Makes --print-bank-hash support --output json
- Updates scripts to install jq on provisioned nodes
- Update remote-node.sh to parse the bank hash from json using jq
2024-06-20 00:15:18 -05: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
Ryo Onodera 3e53b644a8
Adjust replay-related metrics for unified scheduler (#1741)
* Adjust replay-related metrics for unified schduler

* Fix grammar

* Don't compute slowest for unified scheduler

* Rename to is_unified_scheduler_enabled

* Hoist uses to top of file

* Conditionally disable replay-slot-end-to-end-stats

* Remove the misleading fairly balanced text
2024-06-20 09:12:04 +09: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
Yihau Chen a6bc917f36
ci: ignore curve25519-dalek audit temporarily (#1786)
ci: ignore curve25519-dalek audit
2024-06-19 12:12:57 +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
Jeff Washington (jwash) 4c921ca276
add ancient pack metrics (#1750)
* add ancient pack metrics

* add missing params

---------

Co-authored-by: brooks <brooks@anza.xyz>
2024-06-18 19:45:43 +00:00
steviez ba2ff5384d
ledger-tool: Deduplicate max-genesis-archive-unpacked-size argument (#1774)
The argument is currently declared in multiple places. So, delcare the
argument in one central place.
2024-06-18 13:15:02 -05:00
Pankaj Garg ad0a48c731
SVM: Reduce public visibility of sysvar_cache (#1783) 2024-06-18 10:53:57 -07:00
Jeff Washington (jwash) 7eca784e78
remove double-counted metric (#1748) 2024-06-18 17:26:34 +00:00
Jeff Washington (jwash) d2b3476db9
always pack a few newest ancient slots (#1730)
* always pack a few newest ancient slots

* pr feedback

* remove extra ()

* adds high slot tests

---------

Co-authored-by: brooks <brooks@anza.xyz>
2024-06-18 11:20:27 -05:00
Joe C 2dc95087ae
SVM: Move `fee_structure` to environment input (#1771)
* SVM: add `fee_structure` to environment arg

* runtime: add `fee_structure` to bank

* SVM: drop `fee_structure` from global configs
2024-06-18 10:07:22 -05:00
Brooks 954f3d175b
Adds `diff` to accounts-hash-cache-tool (#1772) 2024-06-18 10:40:51 -04:00