Commit Graph

14685 Commits

Author SHA1 Message Date
4b8c4704b0 Fix typo (#18595) (#18596)
(cherry picked from commit ab45532b52)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-07-12 08:02:06 +00:00
c5374095e6 storage-proto: Rework source generation (#18584)
(cherry picked from commit 899b09872b)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-11 03:33:56 +00:00
6abd5fbc3e removes redundant (mutable) self receivers (backport #18574) (#18580)
* removes redundant (mutable) self receivers (#18574)

(cherry picked from commit 918b5c28b2)

# Conflicts:
#	gossip/src/cluster_info.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-11 01:02:20 +00:00
a6a302f41f chore: bump ouroboros from 0.5.1 to 0.9.3 (#18189) (#18573)
* chore: bump ouroboros from 0.5.1 to 0.9.3

Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.5.1 to 0.9.3.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

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

* Api changes

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: Tyera Eulberg <tyera@solana.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: Tyera Eulberg <tyera@solana.com>
2021-07-10 20:44:54 +00:00
4c764829da CI: Make BPF test suite a first-class citizen (backport #18535) (#18571)
* CI: Extricate BPF tests from stable-perf

(cherry picked from commit 1eab0773af)

* CI: Dump BPF assembly listings and upload as artifact

(cherry picked from commit f1996ca0f3)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-10 19:24:23 +00:00
9900c1ad8a adds a generic implementation of Gossip{Read,Write}Lock (#18559) (#18569)
(cherry picked from commit fd9c10c2e2)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-10 15:51:29 +00:00
3fabbab417 Add storage-proto build.rs and readme (backport #18353) (#18562)
* Add storage-proto build.rs and readme (#18353)

* Use build.rs for storage-proto generation

* Add readme

* Single use statements

(cherry picked from commit c2e7d39154)

# Conflicts:
#	Cargo.lock
#	storage-proto/build-proto/Cargo.lock
#	storage-proto/build-proto/Cargo.toml

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-09 22:21:08 +00:00
6c99c1ae13 Bump prost, prost-types, and tonic (backport #18537) (#18558)
* Bump prost, prost-types, and tonic (#18537)

* Bump prost+tonic and accommodate generated service changes

* Unignore advisory

* Fixup .proto error list

(cherry picked from commit 761de8b1a3)

# Conflicts:
#	Cargo.lock
#	storage-bigtable/Cargo.toml
#	storage-proto/Cargo.toml

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-09 19:54:29 +00:00
c2320fceab Remove sysvar special cases for rent and assign 2021-07-10 01:24:44 +09:00
8b87d86358 Bump compute budget for neon evm (#17700) (#18522)
(cherry picked from commit 2867584985)

Co-authored-by: Jack May <jack@solana.com>
2021-07-09 09:12:31 -07:00
5d0e1d62d5 removes id and shred_version from CrdsGossip (backport #18505) (#18554)
* removes id and shred_version from CrdsGossip (#18505)

ClusterInfo is the gateway to CrdsGossip function calls, and it already
has node's pubkey and shred version (full ContactInfo and Keypair in
fact).
Duplicating these data in CrdsGossip adds redundancy and possibility for
bugs should they not be consistent with ClusterInfo.

(cherry picked from commit 4e1333fbe6)

# Conflicts:
#	gossip/src/cluster_info.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-09 15:37:05 +00:00
7e613c7a78 skips process_push_message for local messages (backport #18493) (#18532)
* skips process_push_message for local messages (#18493)

received_cache is not relevant for local messages, and does not need to
be updated:
https://github.com/solana-labs/solana/blob/92c5cdab6/gossip/src/crds_gossip_push.rs#L166-L189

(cherry picked from commit 27cc7577a1)

# Conflicts:
#	gossip/src/cluster_info.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-09 13:33:40 +00:00
2a30436e45 Show grcov version as well (#18549) (#18551)
(cherry picked from commit a5b91ef4c3)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-07-09 12:41:44 +00:00
5315a89e7d Remove dead solana airdrop parameters (#18520) (#18524)
(cherry picked from commit f39ffa69f6)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-07-08 21:56:25 +00:00
8c328316ae Add ecrecover syscall (backport #17720) (#18500)
* Add ecrecover syscall (#17720)

Co-authored-by: Anton Lisanin <lisanin.anton@gmail.com>
(cherry picked from commit 1f288ce527)

# Conflicts:
#	Cargo.lock
#	programs/bpf/Cargo.lock
#	programs/bpf/tests/programs.rs
#	programs/bpf_loader/Cargo.toml
#	programs/bpf_loader/src/syscalls.rs
#	sdk/program/Cargo.toml

* resolve conflicts

Co-authored-by: s-medvedev <40623263+s-medvedev@users.noreply.github.com>
Co-authored-by: Jack May <jack@solana.com>
2021-07-08 21:56:19 +00:00
030a97d098 Temporarily ignore prost-types advisory (backport #18525) (#18527)
* Temporarily ignore prost-types audit (#18525)

(cherry picked from commit 6188283ba6)

* Bump tokio

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-08 13:49:33 -06:00
c40e71dc03 featurize_policy_update (#18492) (#18502)
(cherry picked from commit ccdf93e2b8)

Co-authored-by: Jack May <jack@solana.com>
2021-07-07 22:31:05 +00:00
2f633cdfb7 Refactor verify_and_update write privileges check (#18468) (#18484)
Co-authored-by: Justin Starry <justin@solana.com>
2021-07-07 21:46:07 +00:00
edd6ae588a Update verify policy (backport #18459) (#18491)
* Update verify policy (#18459)

(cherry picked from commit 44289e6728)

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
2021-07-07 19:02:52 +00:00
2a73ba2fbb Fix cargo check (#18497) 2021-07-07 14:01:19 -05:00
5eadb86500 Fix example in docs for getInflationReward (#18494) (#18496)
(cherry picked from commit ebc7df62f3)

Co-authored-by: Max Ogden <maxogden@users.noreply.github.com>
2021-07-07 18:43:24 +00:00
c98ab6c6dc Record parent slot to reconstruct fork tree from influxdb (#18482) (#18488)
(cherry picked from commit d69f469b83)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-07-07 17:42:03 +00:00
5321463892 Refactoring: Unify account_deps and accounts (backport #17898) (#18486)
* Refactoring: Unify account_deps and accounts (#17898)

* Changes ThisInvokeContext::get_account() to use accounts instead of pre_accounts.

* Adds explicit keys to accounts to make them symmetric to account_deps.

* Appends account_deps to accounts in transaction loading and removes account_deps everywhere else.

(cherry picked from commit 7462c27d07)

# Conflicts:
#	program-test/src/lib.rs
#	runtime/src/bank.rs
#	runtime/src/message_processor.rs

* fix conflicts

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Co-authored-by: Justin Starry <justin@solana.com>
2021-07-07 17:14:39 +00:00
d668a7694f implements an unbiased weighted shuffle using binary indexed tree (#18343) (#18485)
Current implementation of weighted_shuffle:
https://github.com/solana-labs/solana/blob/b08f8bd1b/gossip/src/weighted_shuffle.rs#L11-L37
uses a heuristic which results in biased samples.

For example, if the weights are [1, 10, 100], then the 3rd index should
come first 100 times more often than the 1st index. However,
weighted_shuffle is picking the 3rd index 200+ times more often than the
1st index, showing a disproportional bias in favor of higher weights.

This commit implements weighted shuffle using binary indexed tree to
maintain cumulative sum of weights while sampling. The resulting samples
are demonstrably unbiased and precisely proportional to the weights.

Additionally the iterator interface allows to skip computations when
not all indices are processed.

Of the use cases of weighted_shuffle, changing turbine code requires
feature-gating to keep the cluster in sync. That is not updated in
this commit, but can be done together with future updates to turbine.

(cherry picked from commit dba42c57b4)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-07 16:07:41 +00:00
9bb482e46f persists repair-peers cache across repair service loops (#18400) (#18483)
The repair-peers cache is reset each time repair service loop runs,
and so computed repeatedly for the same slots:
https://github.com/solana-labs/solana/blob/d2b07dca9/core/src/repair_service.rs#L275

This commit uses an LRU cache to persists repair-peers for each slot.
In addition to LRU eviction rules, in order to avoid re-using outdated
data, each entry also has 10 seconds TTL.

(cherry picked from commit a0551b4054)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-07 15:43:15 +00:00
c534c928a7 encapsulates turbine peers computations of broadcast & retransmit stages (#18238) (#18464)
Broadcast stage and retransmit stage should arrange nodes on turbine
broadcast tree in exactly same order. Additionally any changes to this
ordering (e.g. updating how unstaked nodes are handled) requires feature
gating to keep the cluster in sync.

Current implementation is scattered out over several public methods and
exposes too much of implementation details (e.g. usize indices into
peers vector) which makes code changes and checking for feature
activations more difficult.

This commit encapsulates turbine peer computations into a new struct,
and only exposes two public methods, get_broadcast_peer and
get_retransmit_peers, for call-sites.

(cherry picked from commit 04787be8b1)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-07-07 14:30:55 +00:00
0d0478c4a4 Add vote/stake checked instructions (backport #18345) (#18457)
* Add vote/stake checked instructions

(cherry picked from commit ee219ffa47)

* Fix set-lockup custodian index

(cherry picked from commit 544f62c92f)

* Add parsing for new stake instructions; clean up confusing test args

(cherry picked from commit 9b302ac0b5)

* Add parsing for new vote instructions

(cherry picked from commit 39bac256ab)

* Add VoteInstruction::AuthorizeChecked test

(cherry picked from commit b8ca2250fd)

* Add Stake checked tests

(cherry picked from commit 74e89a3e3e)

Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-07 03:17:21 +00:00
cda681a2f0 Remove obsolete stake-monitor command (backport #18020) (#18462)
* Remove obsolete stake-monitor command

(cherry picked from commit f859a39b86)

# Conflicts:
#	Cargo.lock
#	stake-monitor/Cargo.toml

* Fix conflict

Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-07 00:55:13 +00:00
72ed4f28b1 Remove feature switch for demoting sysvar write locks (#18373) (#18454)
Co-authored-by: Justin Starry <justin@solana.com>
2021-07-06 23:25:28 +00:00
6afeaac7a5 Fix transaction logs and inner ixs for leader nodes (backport #18395) (#18448)
* Fix transaction logs and inner ixs for leader nodes (#18395)

* Fix transaction logs and inner ixs for leader nodes

* Fix cpi log storage flag

(cherry picked from commit 5dd399dafa)

# Conflicts:
#	runtime/src/bank.rs

* resolve conflict

Co-authored-by: Justin Starry <justin@solana.com>
2021-07-06 23:04:19 +00:00
75a2b66206 docs: Correct integration validator cli reference (#18458)
(cherry picked from commit 77f61a5e2e)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-06 22:26:38 +00:00
5966053a6d Improve account unlock performance (#18442) (#18447)
* Improve account unlock performance

* fix clippy

(cherry picked from commit 6319e8811a)

Co-authored-by: Justin Starry <justin@solana.com>
2021-07-06 21:40:04 +00:00
e500b79858 Update terminology.md (#18430) (#18431)
* Update terminology.md

Fix duplicate "holders"

* Update docs/src/inflation/terminology.md

Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit b887e89972)

Co-authored-by: Sean Michael <seankmichael@gmail.com>
2021-07-06 03:13:50 +00:00
428c20c79f borsh: add bool type (#18429)
(cherry picked from commit e7b36c8484)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-07-05 21:48:10 +00:00
bf84bc17ea Cli: expose --with-memo to nonce and stake commands (#18404) (#18410)
* Fmt memo_arg

* Add --with-memo to nonce and stake cli commands

(cherry picked from commit 1dd730d685)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-07-05 01:19:17 +00:00
30fa9cbee7 sdk: add is_interactive() method Signer trait (#18407)
(cherry picked from commit 2af5ec4f57)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-03 09:09:39 +00:00
eefca613ad Rename Tower::lockouts to Tower::vote_state
(cherry picked from commit d5c2c72360)
2021-07-02 20:35:02 -07:00
f6d943aec7 SDK: Add test for illegal Pubkey::create_with_seed owners (#18402)
(cherry picked from commit 216983c50e)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-03 01:27:53 +00:00
88462e67b5 Allow a solana-validator to join a cluster established by solana-test-validator (backport #18394) (#18399)
* Report 404 instead of 502 when a snapshot file is not found

This provides the client with more useful information about why their
request failed

(cherry picked from commit 40d696fcbc)

* As a last resort try to download an uncompressed snapshot

`solana-test-validator` creates uncompressed snapshots and it can be
useful to attach another validator to a `solana-test-validator` cluster
from time to time

(cherry picked from commit e36247d187)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-07-03 00:27:42 +00:00
eb683dd402 Document order of recent blockhashes sysvar (#18379)
I wanted to use this sysvar to get a recent block hash, but I didn't
know whether the first or the last entry contains the most recent block
hash.

By calling it for mainnet, printing the results, and comparing that to
the recent blocks on solanabeach.io/blocks, I discovered that the
entries are ordered from most recent to least recent. Document this to
save future readers the trouble.

(cherry picked from commit 94ab0eb49f)

Co-authored-by: Ruud van Asseldonk <ruud@chorus.one>
2021-07-02 07:03:04 +00:00
c7d0aea5f4 Make set roots an iterator (#18357) (#18377)
(cherry picked from commit 0eca92de18)

Co-authored-by: carllin <carl@solana.com>
2021-07-02 04:44:38 +00:00
8f08953100 Added formats to notifications in WebSocket RPC client. (#18231)
(cherry picked from commit 8e7d393b70)
2021-07-01 21:14:49 -07:00
09b009abd9 Removed unused purged_slots in purge_older_root_entries (#18102)
Removed unused purged_slots in purge_older_root_entries

(cherry picked from commit ccf6b21bf8)
2021-07-01 21:13:02 -07:00
c37e481a43 test (#18159) (#18289)
(cherry picked from commit 47cafb70da)

Co-authored-by: carllin <carl@solana.com>
2021-07-02 04:12:53 +00:00
72cf55b8c3 More detailed voting timings in replay stage (#18229)
(cherry picked from commit 5d08bf9aa3)
2021-07-01 21:12:11 -07:00
6cb24ae7b6 Docs expose Transaction v2 proposal (backport #18283) (#18286)
* docs: expose TX v2 proposal

(cherry picked from commit 0972d12c1c)

* docs: A-Z sort accepted proposals

(cherry picked from commit 70d75ce4e8)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-07-02 03:07:26 +00:00
eeaf0234f0 Add proposal for transactions v2 and address map program (#17103) (#18376)
* Add proposal for supporting big transactions

* account index program

* fix formatting

* review feedback

* Add cost changes section

* Add cost section and more attack details

* fix lint

* document metadata changes

* nit

* rpc details

* add index meta struct

* add additional proposal and chagne title

* rename proposal file

* rename to address map and rewrite tx format

* no more appends, limit mapping size to 256

* update dos section

* add note about readonly

* restructure message to use enum

* cleanup

(cherry picked from commit 191519188d)

Co-authored-by: Justin Starry <justin@solana.com>
2021-07-02 02:39:44 +00:00
0200740d70 Add sdk and program READMEs (#18154)
(cherry picked from commit 94905dae52)
2021-07-01 18:25:04 -07:00
1268eef3b2 Revert "Clean up build warning"
This reverts commit 17a173ebb5.

(cherry picked from commit d269975784)
2021-07-01 18:23:23 -07:00
b433048003 report on min/max bin stats for accounts index (#18338) (#18347)
(cherry picked from commit 531f1bce78)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-07-01 23:55:43 +00:00