Commit Graph

24509 Commits

Author SHA1 Message Date
samkim-crypto e2c2029ac4
[zk-token-sdk] Restrict a single-bit of 256-bit batched range proof to 128 (#34803)
* fix previous typo

* restrict single-bit of 256-bit batched range proof to 128
2024-01-18 14:37:04 +09:00
Justin Starry 747df9c105
Fix versioned message json deserialization (#34808) 2024-01-18 10:31:05 +08:00
Trent Nelson 6dbcdc063f
sdk: add bounds check when instantiating `Keypair` from byte array (#34817) 2024-01-17 18:51:16 -07:00
Brooks 0e8f2de1da
deps: Upgrades h2 due to security advisory (#34816) 2024-01-17 17:10:13 -07:00
Brennan 8fe4f5d0b9
Shred Repair Request (#34771)
* shred repair admin rpc
2024-01-17 14:19:32 -08:00
behzad nouri 586c794c8a
adds get_proof_offset for Merkle shreds (#34798)
In preparation of adding chained Merkle shreds variant, the commit
reworks api for proof-offset within the shred binary.
2024-01-17 20:53:56 +00:00
Brooks d8788999a6
Removes unused snapshot errors (#34812) 2024-01-17 14:04:56 -05:00
dependabot[bot] 32f260b839
build(deps): bump bitflags from 2.4.1 to 2.4.2 (#34806)
* build(deps): bump bitflags from 2.4.1 to 2.4.2

Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2)

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

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

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-01-17 21:37:31 +08:00
dependabot[bot] d025e71445
build(deps): bump enum-iterator from 1.4.1 to 1.5.0 (#34791)
* build(deps): bump enum-iterator from 1.4.1 to 1.5.0

Bumps [enum-iterator](https://github.com/stephaneyfx/enum-iterator) from 1.4.1 to 1.5.0.
- [Commits](https://github.com/stephaneyfx/enum-iterator/compare/1.4.1...1.5.0)

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

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

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-01-17 21:36:33 +08:00
drebaglioni 79b9999f08
Update SECURITY.md (#34800)
Added announcement of changes in bounty payouts AND added the high/low for each payout under the respective category
2024-01-16 21:07:44 -07:00
Pankaj Garg 9edf65b877
Do not reserve QUIC stream capacity for unstaked client on forward port (#34779) 2024-01-16 16:35:29 -08:00
Yueh-Hsuan Chiang 3fa44e6fbe
[TieredStorage] Include executable field into AccountMetaFlags (#34724)
#### Problem
Before we have fully switched to the new way to determine whether
an account is executable, we still need a bit for th executable flag at
this moment in the TieredStorage as well as for backward compatibility
in case we want to revert it back.

#### Summary of Changes
This PR adds the executable flag into AccountMetaFlags.

#### Test Plan
Updated existing tests for AccountMetaFlags to cover executable flag.
2024-01-16 11:25:57 -08:00
Yihau Chen 0e90e985dd
ci: use openssl 3.1.1 for Windows build (#34795) 2024-01-16 17:11:19 +00:00
HaoranYi 258c920cf9
fix buffer size for updateable program buffer rent exempt fee calculation (#34781)
fix buffer size for updateable program buffer rent exempt fee
calculation

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-01-16 09:04:56 -06:00
dependabot[bot] 711215f832
build(deps): bump smallvec from 1.11.2 to 1.12.0 (#34784)
* build(deps): bump smallvec from 1.11.2 to 1.12.0

Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.2 to 1.12.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.2...v1.12.0)

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

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

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-01-16 14:09:05 +08:00
dependabot[bot] 256179a0b1
build(deps): bump base64 from 0.21.6 to 0.21.7 (#34782)
* build(deps): bump base64 from 0.21.6 to 0.21.7

Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.6 to 0.21.7.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.6...v0.21.7)

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

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

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-01-16 14:08:37 +08:00
Tao Zhu d0b793a6fd
remove old comment (#34775) 2024-01-15 16:39:10 -06:00
HaoranYi 8869d0c8a0
Upgrade sbf tests to use bpf loader v3 (#34691)
* update sbf test to use bpf_loader v2

* update test_program_sbf_invoke_sanity test

* update test bpf program owner

* update test_program_sbf_invoke_upgradeable_via_cpi

* update test_program_sbf_disguised_as_sbf_loader

* update test_program_reads_from_program_account

* update test_program_sbf_program_id_spoofing

* update test_program_sbf_caller_has_access_to_cpi_program

* update 3 more tests

* fix program buffer size in minimul for rent exempt calculation

* more test updates

* more update

* more test updates

* comments

* undo c format

* typo

* add sol_alloc_free not deployable and deployable tests

* comments

* review feedback - move buffer_keypair and program_keypair inside callee
fn.

* more refactor

* delete sof_alloc_free_syscall enabled tests

* revert lamport change

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-01-14 18:20:01 -06:00
Pankaj Garg f92275bcaa
Fix determination of staked QUIC connections (#34760)
* Fix determination of staked QUIC connections

* address review comments

* review comments

* treat connections with zero stake as unstaked
2024-01-13 18:38:31 -08:00
samkim-crypto 9468996c99
[zk-token-proof] Increase compute budget for zk-token-proof tests (#34777)
increase compute budget for zk-token-proof tests
2024-01-14 08:43:12 +09:00
kirill lykov 5a1a697620
use staked connection for bench-tps in net scripts (#34767)
* add client-node-id to use staked connection

* Add flag to use unstaked connection for bench-tps

* Add bind-address for multinode

* always specify url for bench-tps
2024-01-13 18:50:27 +01:00
Andrew Fitzgerald 257ba2f0b1
Add benchmark for execute_batch (#34717) 2024-01-13 09:09:04 -08:00
Tao Zhu 613f0ff226
removed obsolete field from cost_tracker (#34762) 2024-01-12 17:54:02 -06:00
samkim-crypto b222fdf3d7
[zk-token-proof] Add functionality to read proof from accounts instead of instruction data (#34750)
* add functionality to read proof from accounts instead of instruction data

* update add tests

* clippy

* clarify instruction data discriminator

* avoid cloning entire proof data

* Update programs/zk-token-proof/src/lib.rs

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

* update `PROOF_OFFSET_LENGTH` to `INSTRUCTION_DATA_LENGTH_WITH_PROOF_ACCOUNT`

* update instruction docs

* add feature gate

* Update sdk/src/feature_set.rs

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

* update feature name `enable_zk_from_account` to `enable_zk_proof_from_account`

* Apply suggestions from code review

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

* clarify the instruction data length more precisely

---------

Co-authored-by: Jon C <me@jonc.dev>
2024-01-13 08:15:44 +09:00
Tao Zhu 51eaa2b9cc
cleanup feature code after activation (#34695)
cleanup feature checking code
2024-01-12 14:28:50 -06:00
Andrew Fitzgerald beef8476f8
TransactionScheduler: Add funded check before graph insertion (#34699) 2024-01-12 11:54:04 -08:00
Andrew Fitzgerald 98a2873517
consumer bench same number of txs per iteration (#34752) 2024-01-12 08:24:45 -08:00
Andrew Fitzgerald be5337a839
earlier fee payer validation (#34666) 2024-01-12 08:22:39 -08:00
samkim-crypto bc136423b4
[zk-token-proof] include `VerifyBatchRangeProofU256` in the `enable_zk_transfer_with_fee` feature gate (#34747)
include `VerifyBatchRangeProofU256` in the `enable_zk_transfer_with_fee` feature
2024-01-12 21:58:33 +09:00
Tyera 4385ed11b1
Populate partitioned-rewards PDA during calculation (#34624)
* Add epoch_rewards_partition_data module

* Rename variable

* Pass hasher's parent_blockhash up to begin_partitioned_rewards

* Populate epoch rewards partition data account in begin_partitioned_rewards

* Fix method name
2024-01-11 23:15:55 -07:00
Pankaj Garg 22fcffeea8
Move EMA and stream throttling code to a new file (#34759) 2024-01-11 16:54:54 -08:00
steviez a203f1489e
ledger-tool: Condense ProcessOptions parsing logic (#34694)
The code to parse process options was repeated in several (8) commands
that replay block processing. So, move the argument parsing into a
common helper that can be used by all of those commands.
2024-01-11 13:24:21 -06:00
Tyera 8e2943604b
Use parent blockhash to seed EpochRewardsHasher (#34744)
* Use parent blockhash to seed rewards-partition hasher

* Make blockhash word more consistent
2024-01-11 11:21:11 -07:00
Pankaj Garg 904700cc56
Use EMA to compute QUIC streamer load for staked connections (#34586)
* Use EMA to compute QUIC streamer load for staked connections

* change min load to 25% of max load

* reduce max PPS from 500K to 250K

* update ema_function to account for missing intervals

* replace f64 math with u128

* track streams across all connections for a peer

* u128  -> u64

* replace ' as ' type conversion to from and try_from

* add counter for u64 overflow

* reset recent stream load on ema interval

* do not use same counter for unstaked connections from a peer IP
2024-01-11 10:05:38 -08:00
Yihau Chen e31a45ad0c
ci: use larger runner for macos stable clippy (#34745) 2024-01-11 23:51:57 +08:00
Tyera 166be2995e
Bigtable: update google proto files and allow configuration of max_message_size (#34740)
* Update proto files with tonic-build v0.9.2

* Manually ignore invalid doc-tests

* Add new ReadRowsRequest fields

* Add LedgerStorageConfig::max_message_size and default value

* Add BigtableConnection::max_message_size and use on client creation

* Add max_message_size to RpcBigtableConfig and make const pub

* Add solana-validator cli arg
2024-01-10 21:20:15 -07:00
dependabot[bot] 13b8d02170
build(deps): bump console from 0.15.7 to 0.15.8 (#34726)
* build(deps): bump console from 0.15.7 to 0.15.8

Bumps [console](https://github.com/console-rs/console) from 0.15.7 to 0.15.8.
- [Changelog](https://github.com/console-rs/console/blob/master/CHANGELOG.md)
- [Commits](https://github.com/console-rs/console/compare/0.15.7...0.15.8)

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

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

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-01-11 12:17:34 +08:00
Ryo Onodera a1be1042a9
Make check{2,3} faster by enabling parallel rustc for dcou (#34739)
Try to make check3 faster
2024-01-11 13:16:47 +09:00
Brooks e9a6bb35e2
Removes remaining unused accounts data len bits (#34732) 2024-01-10 18:16:56 -05:00
steviez 7ee9d9a1f2
ledger-tool: Move blockstore commands to blockstore subcommand (#34597)
solana-ledger-tool is a bit of a kitchen sink and currently has
upwards of 30 commands at the top level of the CLI. UI aside, the
contents of ledger-tool/src/main.rs are somewhat cluttered.

To reduce clutter and introduce a more hierarchical structure, this
change introduces a new blockstore subcommand and moves all commands
that only touch the blockstore to a blockstore subcommand. For example,
  solana-ledger-tool slot X 
is now invoked like
  solana-ledger-tool blockstore slot X

However, given how long the tool has existed, support is retained for
calling these old commands without the extra blockstore command. But,
the commands are not listed in the help in order to steer new users to
use the newer calling structure.
2024-01-10 15:42:09 -06:00
Jon C 5cb30cf9cc
cli: Use program length for deployments instead of 2x length (#34730)
* cli: Deploy the appropriate length program

* Extend the extend-program test for new default

* Add CHANGELOG entry

* Update docs, and include `extend`

* Update CHANGELOG.md

Co-authored-by: Tyera <teulberg@gmail.com>

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2024-01-10 20:12:29 +00:00
Ashwin Sekar fb97e93fe3
fix duplicate confirmed rollup detection for descendants (#34014)
* fix duplicate confirmed rollup detection for descendants

* pr feedback: optimistic rename -> guard new enum
2024-01-10 15:10:30 -05:00
Brooks fb35552f5b
Removes AccountsDataMeter (#34727) 2024-01-10 15:07:14 -05:00
Lijun Wang 843854409e
update docs for tpu using Quic (#34721)
Update tpu doc on using QUIC about streams and throttling
2024-01-10 10:51:15 -08:00
Yihau Chen 74df203dd4
ci: cancel the previous build when a new commit lands (#34733) 2024-01-10 18:33:39 +00:00
Brooks dc5af2c615
Removes AccountsDataMeter from InvokeContext (#34698) 2024-01-10 12:36:29 -05:00
HaoranYi 61e42cb390
Fix program buffer account rent-exempt lamport calculation (#34722)
fix program buffer size in minimul for rent exempt calculation

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-01-10 11:32:51 -06:00
Yihau Chen e3df207963
ci: use larger runner for macos nightly clippy (#34725)
* ci: using larger runner for macos nightly clippy

* update mergify rules
2024-01-11 01:26:20 +08:00
Andrew Fitzgerald ac04a758e1
Remove chain-joining thread-selection (#34554) 2024-01-10 09:10:12 -08:00
Tao Zhu 88f8d11da2
program-test consumes some units as native (#34714)
program-test consumes some units as native;
harden a unit test wrt if builtin consumes units;
2024-01-10 09:05:30 -06:00