Skip to content

Commit

Permalink
Api docs fix (#3)
Browse files Browse the repository at this point in the history
* chore: update docusaurus to latest version

* fix: added required fields

* fix: custom layout pages

* fix: updated doc keywords to array

* fix: remobed breadcrumbs for the default

* feat: added new JSON API example

* feat: created api partial pages

* fix: updated links

* feat: added api landing page and updates api sidebar

* fix: updated the call to action on the http method page

* fix: mobile responsive-ness

* fix: updated sidebar link

* fix: updated internal linking to use new api page

* rolls back merkle shreds on testnet (solana-labs#29340)

solana-labs#29339
adds hash domain to merkle shreds. In order to merge that change, need
to temporarily disable merkle shreds on testnet.

* remove acctdb.min_num_stores (solana-labs#29335)

* Remove println (solana-labs#29342)

* exclude Vote transactions from updating min-fee-cache (solana-labs#29341)

* Add metrics for min/max priority fee per slot, and counters for fee/non-fee transactions (solana-labs#29330)

* Add metrics for min/max priority fee per slot, and counters for fee/non-fee txs

* get fee range of prioritized transactions only

* Update runtime/src/prioritization_fee.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update runtime/src/prioritization_fee.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* fix format

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* test_utils::create_test_accounts pre-allocates an append vec first (solana-labs#29336)

* test_utils::create_test_accounts pre-allocates an append vec first

* remove comment

* introduce ShrinkInProgress (solana-labs#29329)

* introduce ShrinkInProgress

* remove redundant check

* add comments

* Fix "tranaction" typo in code base (solana-labs#29347)

Fix typos

* [docs] updating the "writing programs" section (solana-labs#29197)

* docs: added limitations page

* fix: updated deprecated cargo test-bpf

* docs: moved content off of overview

* fix: added compute budget description

* fix: updated compute buddget

* fix: rearranged sections

* fix: update code snippet

* docs: overview page and links

* [docs] Updated transactions overview page (solana-labs#29345)

fix: added broad overview

* docs: transactions fees/confirmation and deploying programs (solana-labs#28895)

docs: adds and updates

* Remove checks for activated feature check_physical_overlapping (solana-labs#29355)

* fix: client-test timeout (solana-labs#29364)

* fix: retry counter doesn't count

* set timeout for wait_for

* Expand solana-sdk API docs. (solana-labs#29063)

* Expand solana-sdk API docs.

* Update sdk/src/genesis_config.rs

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

* Update sdk/src/hard_forks.rs

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

* Update sdk/src/builtins.rs

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

* Update sdk/src/builtins.rs

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

* Update sdk/src/rpc_port.rs

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

* Update sdk/src/lib.rs

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

* Clarify derivation_path docs

* 'entry point' -> 'entrypoint'

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

* Add fee-payer arg to solana feature activate (solana-labs#29367)

* replace ./cargo with cargo in sbf/bpf build scripts (solana-labs#29371)

* Make connection cache to support specified client endpoint (solana-labs#29240)

ConnectionCache is being used for managing connections for sending messages using quic. In the current implementation the connection's endpoint is created in a lazy initialized fashion and set to one per connection pool. In repair we need all connections to use the same Endpoint so that the server can send back the response to the same Endpoint.

* chore: bump futures-util from 0.3.24 to 0.3.25 (solana-labs#29337)

* chore: bump futures-util from 0.3.24 to 0.3.25

Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.24 to 0.3.25.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@0.3.24...0.3.25)

---
updated-dependencies:
- dependency-name: futures-util
  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>

* get rid of ./cargo when building downstream projects (solana-labs#29372)

* vote: Prevent commission update in the second half of epochs (solana-labs#29362)

* vote: Prevent commission update in the second half of epochs

* Address feedback

* Fix tests

* Make the feature enabled by single-contributor

* Use a cooler pubkey

* ci: trigger downstream pipeline when cargo-[test|build]-[bpf|sbf] is modified (solana-labs#29390)

* ci: trigger stable-sbf pipeline when cargo-[test|build]-[bpf|sbf] is modified (solana-labs#29391)

* Security TXT: Add source_release and source_revision fields (solana-labs#29392)

* Fix BigTable upload early return (solana-labs#29378)

* Change Err when slot range is empty to Ok and log; add method docs

* Update var and log to be more correct

* Promote log level to warn

* Minor cleanup on bigtable_upload (solana-labs#29379)

Adjust some logs, and remove an unnecessary cloned().

* Adjust ledger-tool bigtable upload starting-slot default value (solana-labs#29384)

Currently, if starting-slot is unspecified, a value of 0 will be chosen.
In the common case where someone is operating on a much more recent
range, this would result in a ton of wasted operations & time.

Instead, choose a smarter default value for starting-slot based on what
we detect is currently in the blockstore.

* feat: Allow for verifying the sigs of partially signed txs in web3.js (solana-labs#29249)

* feat: allow for verifying the sigs of partially signed txs

* fix: make comment ab verifying sigs more specific

Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>

* feat: add tests for partial signed tx verification

* fix: revert lockfile changes

* fix: make tests more modular

* fix: run linter

Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>

* Increase Stalebot's operation consumption limit by another 50%

* feat: add getInflationRate RPC call to web3.js (solana-labs#29377)

* Add getInflationRate RPC call

* Fix code formatting

Co-authored-by: steveluscher <me+github@steveluscher.com>

* Temporary increase the build redundancy threshold (solana-labs#29412)

* Add an option to reinstall sbf-tool binaries by cargo-build-sbf (solana-labs#29410)

* Enable full output of cargo-build-sbf tests (solana-labs#29411)

* test: fix get inflation rate test failed at test:live (solana-labs#29413)

* Bump sbf-tools to v1.32 (solana-labs#29325)

* Bump sbf-tools to v1.32

This version of sbf-tools is based on Rust 1.65.0 and LLVM 15.0.

* Temporary ignore build-sbf tests until issue with buildkite cache resolved

* ci: fix web3-commit-lint (solana-labs#29414)

chore: update web3 package-lock.json

* Re-enable cargo-build-sbf tests (solana-labs#29415)

* Plumb dumps from replay_stage to repair (solana-labs#29058)

* Plumb dumps from replay_stage to repair

When dumping a slot from replay_stage as a result of duplicate or
ancestor hashes, properly update repair subtrees to keep weighting and
forks view accurate.

* add test

* pr comments

* experiments different turbine fanouts for propagating shreds (solana-labs#29393)

The commit allocates 2% of slots to running experiments with different
turbine fanouts based on the slot number.
The experiment is feature gated with an additional feature to disable
the experiment.

* Increase the Stalebot operations limit by another 50%.

* Double the Stalebot operations limit

* Add more logging and documentation to flaky optimistic confirmation tests (solana-labs#29418)

* Revert "add retry for flakey local cluster test (solana-labs#29228)"

This reverts commit 7a97121.

* Add logging for repair

* replaced ./cargo with cargo in build docs (solana-labs#29375)

* expands test coverage for merkle/legacy shreds sigverify (solana-labs#29424)

* expands test coverage for sign_shreds_gpu (solana-labs#29429)

* Crank Stalebot's operations limit up to a level that should handle all issues

This thing seems to have been humming along at 300 in the dead zone between NA night and Europe morning. Let's see if it can handle the entire corpus.

* simplifies shreds sigverify (solana-labs#29436)

Simplifying this code in preparation of removing merkle roots from
shreds binary.

* fix typo in rpc client (solana-labs#29434)

* fix typo in runtime docs

* fix typo in rpc client

* chore: typecheck web3.js tests (solana-labs#29422)

* fix: web3.js test typescript errors

Fixes the typescript errors throughout the
web3.js test suite

* fix: node14 test

AbortController is a default in node16 but needs
to be imported for node14

* fix: additional typescript errors

Adds the tests to the tsconfig to auto-include mocha
and fixes remaining typescript errors

* fix: graphql-tools to work with typescript

version of graphql-tools initially installed has incompatible
types preventing ./scripts/typegen.sh from passing when tests
are added to the include path of tsconfig.json

* Don't build typedefs for tests

Co-authored-by: steveluscher <me+github@steveluscher.com>

* implements shred::layout::get_merkle_root (solana-labs#29437)

In preparation of removing merkle roots form shreds binary, the commit
adds api to recover the root from the merkle proof embedded in shreds
payload.

* Update SECURITY.md

* feat: add commission fields matching RPC spec to web3.js client (solana-labs#29435)

* fix: adds commission field matching RPC spec

* fix: update optional to follow type pattern

* chore: bump @babel/runtime from 7.18.0 to 7.20.7 in /web3.js (solana-labs#29439)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.18.0 to 7.20.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.7/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @solana/buffer-layout from 4.0.0 to 4.0.1 in /web3.js (solana-labs#29441)

Bumps [@solana/buffer-layout](https://github.com/solana-labs/buffer-layout) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/solana-labs/buffer-layout/releases)
- [Changelog](https://github.com/solana-labs/buffer-layout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/buffer-layout/commits)

---
updated-dependencies:
- dependency-name: "@solana/buffer-layout"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @babel/plugin-transform-runtime from 7.17.0 to 7.19.6 in /web3.js (solana-labs#29442)

chore: bump @babel/plugin-transform-runtime in /web3.js

Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.17.0 to 7.19.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.19.6/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump bn.js from 5.2.0 to 5.2.1 in /web3.js (solana-labs#29443)

Bumps [bn.js](https://github.com/indutny/bn.js) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](indutny/bn.js@v5.2.0...v5.2.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* adds shred::layout::get_signed_data (solana-labs#29438)

Working towards removing merkle root from shreds payload, the commit
implements api to obtain signed data from shreds binary.

* removes merkle root comparison in erasure_mismatch (solana-labs#29447)

Merkle shreds within the same erasure batch have the same merkle root.
The root of the merkle tree is signed. So either the signatures match
or one fails sigverify, and the comparison of merkle roots is redundant.

* generalizes the return type of Shred::get_signed_data (solana-labs#29446)

The commit adds an associated SignedData type to Shred trait so that
merkle and legacy shreds can return different types for signed_data
method.
This would allow legacy shreds to point to a section of the shred
payload, whereas merkle shreds would compute and return the merkle root.
Ultimately this would allow to remove the merkle root from the shreds
binary.

* chore: bump @rollup/plugin-json from 4.1.0 to 6.0.0 in /web3.js (solana-labs#29452)

Bumps [@rollup/plugin-json](https://github.com/rollup/plugins/tree/HEAD/packages/json) from 4.1.0 to 6.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/json/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/url-v6.0.0/packages/json)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-json"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @typescript-eslint/parser from 5.40.1 to 5.47.1 in /web3.js (solana-labs#29453)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.40.1 to 5.47.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add test_shrink_ancient_overflow (solana-labs#29363)

* cleanup 'shrinking_in_progress' (solana-labs#29359)

* feature: set rent_epoch to Epoch::MAX (solana-labs#28690)

* check android builds

* feature: set rent_epoch to Epoch::MAX

* tweaks

* Update runtime/src/rent_collector.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* simplify changes to tests

* back out some test changes

* calculate_rent_result passes through Exempt

* move calc outside loop

* if rent epoch is already max, use 'NoRentCollectionNow'

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* test permutations of set_exempt_rent_epoch_max (solana-labs#29461)

* add test and comments (solana-labs#29459)

* simplify get_storages_for_slot (solana-labs#29463)

* handle ancient overflow case correctly (solana-labs#29458)

* migrate tests to not use AccountStorage::get (solana-labs#29464)

* decrease frequency of random shrink of ancient append vec (solana-labs#29462)

* remove metric time_hashing_skipped_rewrites_us (solana-labs#29470)

* Fix snapshot download test (solana-labs#29457)

snapshot download tests will now attempt to load the downloaded snapshot

* test_rent_exempt_temporal_escape works in passes (solana-labs#29460)

* cleanup in account_storage.rs (solana-labs#29467)

* Snapshot download test (solana-labs#29474)

* remove skip rewrite code from collect_rent_from_accounts (solana-labs#29472)

* skip_rewrites will only be feature driven (solana-labs#29468)

* filter get_snapshot_storages for requested_slots earlier (solana-labs#29465)

* filter get_snapshot_storages for requested_slots earlier

* Update runtime/src/accounts_db.rs

Co-authored-by: apfitzge <apfitzge@gmail.com>

Co-authored-by: apfitzge <apfitzge@gmail.com>

* add test (solana-labs#29471)

* Cli: refactor program code slightly (solana-labs#29477)

* Remove unused messages Vecs

* Remove superfluous Option in check_payer and send_deploy_messages

* Remove superfluous Option in do_process_program_write_and_deploy

* Remove unnecessary block-wrapping in do_process_program_write_and_deploy

* Cli: the authority passed to `solana program write-buffer` must be a proper signer (solana-labs#29476)

* Fix upgrade signer parsing in program deploy (noop)

* Fix buffer-authority signer parsing in program write-buffer (error on Pubkey input)

* Move async remove to snapshot_utils.rs (solana-labs#29406)

* remove unnecessary type (solana-labs#29473)

* refactor RecycleStores::add_entries (solana-labs#29475)

* refactor RecycleStores::add_entries

* pr feedback

* add AccountStorage.is_empty (solana-labs#29478)

* add test method get_and_assert_single_storage (solana-labs#29481)

* add test method assert_no_storages_at_slot() (solana-labs#29483)

* remove single use AccountStorage.slot_store_count (solana-labs#29479)

* get_snapshot_storages removes call to AccountStorage.get (solana-labs#29466)

* remove should_retain from mark_dirty_dead_stores (solana-labs#29358)

* typo (solana-labs#29485)

* update leger tool help for db verify refcounts (solana-labs#29486)

* Add retries for get_latest_blockhash for accounts cluster bench (solana-labs#29456)

* retry get_latest_blockhash

* more retries for get_latest_blockhash

* retry for get_fee too

* clippy

* fmt

* sleep

* Update accounts-cluster-bench/src/main.rs

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

* Update accounts-cluster-bench/src/main.rs

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

* rename

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

* dedups gossip addresses, taking the one with highest weight (solana-labs#29421)

dedups gossip addresses, keeping only the one with the highest weight

In order to avoid traffic congestion or sending duplicate packets, when
sampling gossip nodes if several nodes have the same gossip address
(because they are behind a relayer or whatever), they need to be
deduplicated into one.

* add AccountStorage.get_slot_storage_entry (solana-labs#29480)

* cleanup get_snapshot_storages (solana-labs#29488)

* cleanup get_snapshot_storages

* pr feedback

* add AccountStorage.is_empty_entry for tests (solana-labs#29489)

* bank: Record non-vote transaction count (solana-labs#29383)

A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159

* chore: add missing members back to workspace.members (solana-labs#29450)

* frozen-abi/macro

* program-runtime

* sdk/macro

* sdk/program

* storage-bigtable/build-proto

* fix sorting

* recovers merkle roots from shreds binary in {verify,sign}_shreds_gpu (solana-labs#29445)

{verify,sign}_shreds_gpu need to point to offsets within the packets for
the signed data. For merkle shreds this signed data is the merkle root
of the erasure batch and this would necessitate embedding the merkle
roots in the shreds payload.
However this is wasteful and reduces shreds capacity to store data
because the merkle root can already be recovered from the encoded merkle
proof.

Instead of pointing to offsets within the shreds payload, this commit
recovers merkle roots from the merkle proofs and stores them in an
allocated buffer. {verify,sign}_shreds_gpu would then point to offsets
within this new buffer for the respective signed data.

This would unblock us from removing merkle roots from shreds payload
which would save capacity to send more data with each shred.

* should_move_to_ancient_append_vec works with a single storage (solana-labs#29484)

* Fix typo in blockstore_metrics.rs (solana-labs#29503)

embeded -> embedded

* chore: added algolia keys

* get_storages_for_slot uses get_slot_storage_entry (solana-labs#29498)

* fix: update the api pages for rent PRs

* Rework method for reporting security problems (solana-labs#29511)

* solana-install: check for fixed releases directly (solana-labs#29365)

when initializing, if a specific release is requested, we only need to confirm it exists
this can be done with the download url itself, rather than pulling the list of releases

* Fix TransactionPrecompileVerification RPC error (solana-labs#29490)

* make rpc test tolerant of rent_epoch being set to max (solana-labs#29508)

* logger: Update to env_logger 0.9.3 (solana-labs#29510)

* remove unnecessary to_vec() (solana-labs#29516)

* filter_storages ignores reclaims (solana-labs#29512)

* cleanup ancient append vec tests (solana-labs#29514)

* migrate tests to get_slot_storage_entry (solana-labs#29515)

* require repair request signature, ping/pong for Testnet, Development clusters (solana-labs#29351)

* Adds SnapshotError::IoWithSourceAndFile (solana-labs#29527)

* remove store_ids from a few shrink data structures (solana-labs#29360)

* get_storage_to_move_to_ancient_append_vec returns a single append vec (solana-labs#29482)

get_storages_to_move_to_ancient_append_vec returns a single append vec

* use get_storage_for_slot() in tests (solana-labs#29517)

* process_storage_slot takes a single append vec (solana-labs#29519)

* Stream the executed transaction count in the block notification (solana-labs#29272)

Problem

The plugins need to know when all transactions for a block have been all notified to serve getBlock request correctly. As block and transaction notifications are sent asynchronously to each other it will be difficult.

Summary of Changes

Include the executed transaction count in block notification which can be used to check if all transactions have been notified.

* fixes errors from clippy::useless_conversion (solana-labs#29534)

https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

* Fixes format string (solana-labs#29533)

* fixes errors from clippy::needless_borrow (solana-labs#29535)

https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

* shrink_slot_forced uses a single append vec (solana-labs#29521)

* migrate tests to use get_storage_for_slot (solana-labs#29518)

* fixes errors from clippy::redundant_clone (solana-labs#29536)

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone

* Update CI pipeline to only run `checks` step on version bump PRs (solana-labs#29243)

* Add logic to buildkite pipeline so version bump PRs don't run the full CI

* simplifies sigverify copy_return_values (solana-labs#29495)

* shrink fns take a single append vec (solana-labs#29522)

* Refine appendvec sanitize error message to include path (solana-labs#29541)

* Removed assert on write_version ordering  (solana-labs#29530)

Removed assert on write_version ordering as snapshot created by earlier version
is not honoring that.

* storage rebuilder regex cleanup (solana-labs#29408)

* storage rebuilder regex cleanup

* Update runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs

Co-authored-by: apfitzge <apfitzge@gmail.com>

Co-authored-by: apfitzge <apfitzge@gmail.com>

* conflict fix

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Jeff Washington (jwash) <jeff.washington@solana.com>
Co-authored-by: Tyera <tyera@solana.com>
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
Co-authored-by: Yihau Chen <a122092487@gmail.com>
Co-authored-by: Brian Anderson <andersrb@gmail.com>
Co-authored-by: Tyera <teulberg@gmail.com>
Co-authored-by: kirill lykov <kirill.lykov@solana.com>
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Jon Cinque <jon@solana.com>
Co-authored-by: Daniel Kilimnik <daniel@neodyme.io>
Co-authored-by: steviez <steven@solana.com>
Co-authored-by: Nico Schapeler <38372048+cryptopapi997@users.noreply.github.com>
Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>
Co-authored-by: TJDawson10 <taylordaws47@gmail.com>
Co-authored-by: steveluscher <me+github@steveluscher.com>
Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
Co-authored-by: gr8den <gr8@nxt.ru>
Co-authored-by: Trent Nelson <trent@solana.com>
Co-authored-by: Kollan House <KollanH@gmail.com>
Co-authored-by: Brooks Prumo <brooks@prumo.org>
Co-authored-by: Brennan Watt <brennan.watt@solana.com>
Co-authored-by: apfitzge <apfitzge@gmail.com>
Co-authored-by: Xiang Zhu <xzhu70@gmail.com>
Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: Illia Bobyr <illia.bobyr@solana.com>
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: hana <81144685+2501babe@users.noreply.github.com>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: Brooks <brooks@solana.com>
Co-authored-by: Will Hickey <will.hickey@solana.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 336 changed files with 28,582 additions and 13,666 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manage-stale-issues-and-prs.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
exempt-issue-labels: blocked,do-not-close,feature-gate,security
exempt-pr-labels: blocked,do-not-close,feature-gate,security
# No actual changes get made in debug-only mode, so we can raise the operations ceiling.
operations-per-run: ${{ github.event_name == 'pull_request' && 100 || 67}}
operations-per-run: ${{ github.event_name == 'pull_request' && 1000 || 900}}
stale-issue-label: stale
stale-issue-message: "" # Leave no comment when marking as stale
stale-pr-label: stale
Expand Down
43 changes: 27 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Expand Up @@ -24,6 +24,7 @@ members = [
"entry",
"faucet",
"frozen-abi",
"frozen-abi/macro",
"genesis",
"genesis-utils",
"geyser-plugin-interface",
Expand All @@ -47,6 +48,7 @@ members = [
"perf",
"poh",
"poh-bench",
"program-runtime",
"program-test",
"programs/address-lookup-table",
"programs/address-lookup-table-tests",
Expand Down Expand Up @@ -77,9 +79,12 @@ members = [
"sdk/cargo-test-bpf",
"sdk/cargo-test-sbf",
"sdk/gen-headers",
"sdk/macro",
"sdk/program",
"send-transaction-service",
"stake-accounts",
"storage-bigtable",
"storage-bigtable/build-proto",
"storage-proto",
"streamer",
"sys-tuner",
Expand Down
52 changes: 33 additions & 19 deletions SECURITY.md
Expand Up @@ -5,38 +5,47 @@
2. [Incident Response Process](#process)

<a name="reporting"></a>
## Reporting security problems to Solana
## Reporting security problems in the Solana Labs Validator Client

**DO NOT CREATE AN ISSUE** to report a security problem. Instead, please send an
email to security@solana.com and provide your github username so we can add you
to a new draft security advisory for further discussion.
**DO NOT CREATE A GITHUB ISSUE** to report a security problem.

For security reasons, DO NOT include attachments or provide detail sufficient for exploitation regarding the security issue in this email. Instead, wait for the advisory to be created, and **provide any sensitive details in the private GitHub advisory**.
Instead please use this [Report a Vulnerability](https://github.com/solana-labs/solana/security/advisories/new) link.
Provide a helpful title and detailed description of the problem.

If you haven't done so already, please **enable two-factor auth** in your GitHub account.

DO send the email from an email domain that is less likely to get flagged for spam by gmail.
Expect a response as fast as possible in the advisory, typically within 72 hours.

Expect a response as fast as possible, typically within 72 hours.
--

If you do not receive a response within that time frame, please do followup with the team directly. You can do this through discord (#core-technology) by pinging the admins of the channel and referencing the fact that you submitted a security bounty.
If you do not receive a response in the advisory, send an email to
security@solana.com with the full URL of the advisory you have created. DO NOT
include attachments or provide detail sufficient for exploitation regarding the
security issue in this email. **Only provide such details in the advisory**.

As above, please DO NOT include attachments or provide detail regarding the security issue in this email.
If you do not receive a response from security@solana.com please followup with
the team directly. You can do this in the `#core-technology` channel of the
[Solana Tech discord server](https://solana.com/discord), by pinging the admins
in the channel and referencing the fact that you submitted a security problem.

<a name="process"></a>
## Incident Response Process

In case an incident is discovered or reported, the following process will be followed to contain, respond and remediate:
In case an incident is discovered or reported, the following process will be
followed to contain, respond and remediate:

### 1. Establish a new draft security advisory
In response to an email to security@solana.com, a member of the solana-labs/admins group will
Create a new draft security advisory for the incident at https://github.com/solana-labs/solana/security/advisories
Add the reporter's github user and the solana-labs/security-incident-response group to the draft security advisory
Create a private fork of the repository (grey button towards the bottom of the page)
Respond to the reporter by email, sharing a link to the draft security advisory.
### 1. Accept the new report
In response a newly reported security problem, a member of the
`solana-labs/admins` group will accept the report to turn it into a draft
advisory. The `solana-labs/security-incident-response` group should be added to
the draft security advisory, and create a private fork of the repository (grey
button towards the bottom of the page) if necessary.

If the advisory is the result of an audit finding, follow the same process as above but add the auditor's github user(s) and begin the title with "[Audit]".

If the report is out of scope, a member of the `solana-labs/admins` group will
comment as such and then close the report.

### 2. Triage
Within the draft security advisory, discuss and determine the severity of the issue. If necessary, members of the solana-labs/security-incident-response group may add other github users to the advisory to assist.
If it is determined that this not a critical network issue then the advisory should be closed and if more follow-up is required a normal Solana public github issue should be created.
Expand Down Expand Up @@ -78,7 +87,10 @@ We currently do not use the Github workflow to publish security advisories. Once

<a name="bounty"></a>
## Security Bug Bounties
We offer bounties for critical security issues. Please see below for more details. Either a demonstration or a valid bug report is all that's necessary to submit a bug bounty. A patch to fix the issue isn't required.
The Solana Foundation offer bounties for critical Solana security issues. Please
see below for more details. Either a demonstration or a valid bug report is all
that's necessary to submit a bug bounty. A patch to fix the issue isn't
required.

#### Loss of Funds:
$2,000,000 USD in locked SOL tokens (locked for 12 months)
Expand All @@ -91,7 +103,7 @@ $1,000,000 USD in locked SOL tokens (locked for 12 months)
* Consensus safety violation
* Tricking a validator to accept an optimistic confirmation or rooted slot without a double vote, etc.

#### Liveness / Loss of Availability:
#### Liveness / Loss of Availability:
$400,000 USD in locked SOL tokens (locked for 12 months)
* Whereby consensus halts and requires human intervention
* Eclipse attacks,
Expand All @@ -101,7 +113,7 @@ $400,000 USD in locked SOL tokens (locked for 12 months)
$100,000 USD in locked SOL tokens (locked for 12 months)
* Remote resource exaustion via Non-RPC protocols

#### Supply Chain Attacks:
#### Supply Chain Attacks:
$100,000 USD in locked SOL tokens (locked for 12 months)
* Non-social attacks against source code change management, automated testing, release build, release publication and release hosting infrastructure of the monorepo.

Expand All @@ -117,6 +129,8 @@ The following components are out of scope for the bounty program
* Bugs in dependencies. Please take them upstream!
* Attacks that require social engineering
* Any undeveloped automated tooling (scanners, etc) results. (OK with developed PoC)
* Any asset whose source code does not exist in this repository (including, but not limited
to, any and all web properties not explicitly listed on this page)

### Eligibility:
* The participant submitting the bug report shall follow the process outlined within this document
Expand Down
3 changes: 1 addition & 2 deletions account-decoder/src/parse_address_lookup_table.rs
Expand Up @@ -87,8 +87,7 @@ mod test {
meta: lookup_table_meta,
addresses: Cow::Owned(addresses),
};
let lookup_table_data =
AddressLookupTable::serialize_for_tests(lookup_table.clone()).unwrap();
let lookup_table_data = AddressLookupTable::serialize_for_tests(lookup_table).unwrap();

let parsing_result = parse_address_lookup_table(&lookup_table_data).unwrap();
if let LookupTableAccountType::LookupTable(ui_lookup_table) = parsing_result {
Expand Down
6 changes: 3 additions & 3 deletions accounts-bench/src/main.rs
Expand Up @@ -6,11 +6,11 @@ use {
rayon::prelude::*,
solana_measure::measure::Measure,
solana_runtime::{
accounts::{
accounts::Accounts,
accounts_db::{
test_utils::{create_test_accounts, update_accounts_bench},
Accounts,
AccountShrinkThreshold, CalcAccountsHashDataSource,
},
accounts_db::{AccountShrinkThreshold, CalcAccountsHashDataSource},
accounts_index::AccountSecondaryIndexes,
ancestors::Ancestors,
rent_collector::RentCollector,
Expand Down

0 comments on commit 39cf91d

Please sign in to comment.