Commit Graph

2010 Commits

Author SHA1 Message Date
Gary Wang f323f9e6c2 Use get_filtered_spl_token_accounts_by_owner for get_program_accounts if applicable 2020-12-20 21:35:42 +08:00
Gary Wang a970602a92 Add indexes on program id and spl-token owner 2020-12-20 21:35:42 +08:00
Tyera Eulberg 9e05d18177
Use mint-scan in spl-token rpcs via bank/accounts 2020-12-19 20:03:06 -07:00
Tyera Eulberg aebbdc0956 Do get_program_accounts filtering in scan 2020-12-19 18:22:50 -08:00
mergify[bot] 71eef63fce
Stream RPC snapshot downloads (bp #14213) (#14214)
* Stream RPC snapshot downloads

(cherry picked from commit b3dc9885646cd984f461b0d8b1a8ba47ae2e7a83)

# Conflicts:
#	core/Cargo.toml

* Update Cargo.toml

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-20 01:25:16 +00:00
mergify[bot] 420e4c772f
getBlockTime RPC method now falls back to BigTable in all cases (#14206)
(cherry picked from commit 0090106f60ab949c965c0b6ed43c3e3a271b5991)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-18 22:11:26 +00:00
mergify[bot] d4b2b787eb
Improved Transaction Forwarding (bp #13944) (#14194)
* Improved Transaction Forwarding (#13944)

* Forwarding

* Dedupe leaders

* Use consistent commitment for last_valid_slot in rpc send_transaction

* Plumb rpc send_transaction options into solana-validator

* Extend num slots banking-stage holds forwarded txs

Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit da7d1e2302f9d1c96d520a67e96b780be293565d)

# Conflicts:
#	cli/src/cli.rs
#	core/src/validator.rs
#	validator/src/main.rs

* Fix conflicts

Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-12-17 18:13:41 -07:00
sakridge 91a2d03f28
Update version to 1.4.19 (#14196) 2020-12-18 00:36:20 +00:00
Trent Nelson 120074f1c1 Bump SPL crates 2020-12-17 03:00:18 +00:00
mergify[bot] 7adcbae866
Add blockstore skipped api (#14145) (#14166)
* Add blockstore api to determine if a slot was skipped

* Return custom rpc error if slot is skipped

(cherry picked from commit ac0d32bc7e81848ccb85032c09c6d6d5f63a4813)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-16 22:22:41 +00:00
sakridge 82add14782
Bump version to v1.4.18 (#14144) 2020-12-16 04:15:05 +00:00
mergify[bot] 599b22baf3
Partial shred deserialize cleanup and shred type differentiation (#14094) (#14138)
* Partial shred deserialize cleanup and shred type differentiation in retransmit

* consolidate packet hashing logic

(cherry picked from commit d4a174fb7cc2daa80fce11b060d0232e714316a1)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-12-16 02:25:40 +00:00
mergify[bot] db339cb925
Fix race between setting tick height and calculating accounts hash (#14101) (#14131)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 75e9e321de9c8b6fcd958a7936de74fc63ebfe3f)

Co-authored-by: carllin <wumu727@gmail.com>
2020-12-15 22:55:13 +00:00
Michael Vines 539f108ea6 Bump version to 1.4.17 2020-12-14 15:57:53 -08:00
mergify[bot] a209984ec9
Add subscription cap (#14011) (#14089)
* Add subscription cap

* Elide unwraps

(cherry picked from commit 8541ffa3288b84a1b6a0281a1bc6df3574d6fd8e)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-12 03:29:36 +00:00
Trent Nelson 82f00bf9f7 Override yanked miow crate to 0.2.2 2020-12-12 00:16:37 +00:00
Trent Nelson 8fdfb291a9 Override yanked net2 0.2.37 2020-12-12 00:16:37 +00:00
mergify[bot] 5b31f3d790
Wrong rpc inflation rate (#14063) (#14064)
* Fix wrong inflation calculation in rpc

* Reorder

* Fix test

(cherry picked from commit 09bd412b1323a9be8bea120146fe91da3388f5d3)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-12-11 09:07:17 +00:00
mergify[bot] 0b5beac561
Check shred type in is_duplicate (#14050) (#14058)
(cherry picked from commit aa2751e61413a0e6decd201a5d1d5086d024599f)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-12-11 04:22:25 +00:00
Michael Vines fb3e88bb7e
Bump version to v1.4.16 (#14054) 2020-12-10 17:04:34 -08:00
mergify[bot] 3520990271
adds the instance token to crds-labels for node-instance crds-values (bp #14037) (#14040)
* adds the instance token to crds-labels for node-instance crds-values (#14037)

If a node "a" receives instance-info from node "b1" it will override any
instance-info associated with "b1" pubkey in its crds table. This makes
it less likely that when "b1" receives crds values from "a" (either
through pull or push), it sees other instances of itself (because node
"a" discarded them when it received "b1" instance info).

In order for the crds table to contain all instance-info associated with
the same pubkey at the same time, we need to add the instance tokens to
the keys in the crds table (i.e. the CrdsValueLabel).

(cherry picked from commit 409fe3bca112edc7aefafb6c7afe31c1e78f4f8a)

# Conflicts:
#	core/src/cluster_info.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-12-10 18:42:26 +00:00
mergify[bot] 90c6f8ae1a
Shred filter (#14030) (#14038)
(cherry picked from commit 5c95d8e963ea2d62dfb280a70ec87a0f8421dfba)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-12-10 17:12:16 +00:00
mergify[bot] 24bd147b1a
Better dupe detection (#13992) (#14033)
(cherry picked from commit c5fe076432a5cd196a5ac2cdeeaf5b86e3de04a7)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-12-10 08:32:44 +00:00
mergify[bot] 07191dc224
checks for duplicate validator instances using gossip (bp #14018) (#14028)
* checks for duplicate validator instances using gossip

(cherry picked from commit 8cd5eb9863ae62c90bd3da176b33a719386b8d3a)

# Conflicts:
#	core/src/cluster_info.rs

* pushes node-instance along with version early in gossip

(cherry picked from commit 542198180ab4116b89b4e0759dcdb059293ae2a2)

* removes RwLock on ClusterInfo.instance

(cherry picked from commit 895d7d6a65bb3589baf58dee9fa172038f61c486)

# Conflicts:
#	core/src/cluster_info.rs

* std::process::exit to kill all threads

(cherry picked from commit 1d267eae6b82222027780280f8141710260c6123)

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-12-09 13:04:57 -08:00
mergify[bot] 3687dccda6
Remove unneeded BankWeight fork choice (#13978) (#14003)
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 239a191612061eb4b49966c7f316f8c1a052505e)

Co-authored-by: carllin <wumu727@gmail.com>
2020-12-09 03:53:21 +00:00
mergify[bot] 8d96797e68
Use LRU cache and blake3 hash of shreds to filter duplicates (#13976) (#14007)
Co-authored-by: sakridge <sakridge@gmail.com>
2020-12-08 18:38:42 +00:00
mergify[bot] c66ee3c623
Add --rpc-max-multiple-accounts to override the getMultipleAccounts JSON RPC maximum (#14006)
(cherry picked from commit 6e9dbb4f6e35d93d15148776e974d9b298a5bf05)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-08 02:43:23 +00:00
mergify[bot] aa084e1d3c
Fix logsSubscribe (#13996) (#13998)
(cherry picked from commit 6ae4d2e5cb19974b3d14b49fcdd2b9f244dd5f8c)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-07 21:39:51 +00:00
mergify[bot] a0c1e4a6e2
removes recursive read-locks on gossip (#13973) (#13974)
ClusterInfo::tvu_peers acquires a read-lock on gossip:
https://github.com/solana-labs/solana/blob/f0e934145/core/src/cluster_info.rs#L1171-L1185
and so, ClusterInfo::repair_peers is recursively locking gossip for
read twice:
https://github.com/solana-labs/solana/blob/f0e934145/core/src/cluster_info.rs#L1202-L1223
But std::sync::RwLock is not re-entrant (recursive).

(cherry picked from commit 6706f2b3bb2958afcabbc7027182efd31407340b)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-12-06 17:32:56 +00:00
mergify[bot] add6989289
Report highest_confirmed_root and _slot in commitment metric (#13964) (#13968)
(cherry picked from commit ca35bb3ac88ab5484803b83c1eb90d3f8117fdb7)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-05 02:13:15 +00:00
mergify[bot] bb4943d8a7
samples repair peers using WeightedIndex (#13919) (#13938)
To output one random sample, weighted_best generates n random numbers:
https://github.com/solana-labs/solana/blob/f751a5d4e/core/src/weighted_shuffle.rs#L38-L63
WeightedIndex does so with only one random number:
https://github.com/rust-random/rand/blob/eb02f0e46/src/distributions/weighted_index.rs#L223-L240
Additionally, if the index is already constructed, it only does a total
of O(log(n)) amount of work; which can be achieved if RepairCache,
caches the weighted index:
https://github.com/solana-labs/solana/blob/f751a5d4e/core/src/serve_repair.rs#L83

Also, the repair-peers code can be reorganized to have fewer redundant
unlock-then-lock code.

(cherry picked from commit c3048b451dc1d8da683ee97c828092092a8ce1f9)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-12-03 19:48:09 +00:00
Michael Vines 38d7d7df50 Bump version to v1.4.15 2020-12-03 01:55:39 +00:00
mergify[bot] da1796f97a
Nonce cleanup followup (bp #13868) (#13922)
* runtime: Factor out `DurableNoncePartial` finishing logic and add tests

(cherry picked from commit 8df2a4bac0954b004556c2fc2e5c6bb7b86d1028)

* accounts: Don't assume fee-payer is the first account

(cherry picked from commit 47af5933caea0e03930e2ed03d18160903a832a7)

* accounts: Replace nonce_rollback unreachable block with descriptive panic

(cherry picked from commit be7760caa1725020290a25023046772c7b5dc733)

* sdk: Check owner when verifying nonce accounts

(cherry picked from commit 274312ebb59ffeac4a8a40f42375c2c6eedb03e7)

* runtime: Replace `HashAgeKind` with `NonceRollbackInfo`

(cherry picked from commit 404fc1570d722709344876dc91799edd576056bf)

* Make `Accounts::is_non_loader_key()` a method on `Message`

(cherry picked from commit 17defbff13fab30210c0b454adb5296f44bd4243)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-12-02 21:34:21 +00:00
mergify[bot] 72aa24db2c
Remove rpc_banks from validator (bp #13882) (#13905)
* Remove rpc_banks from validator (#13882)

* Remove rpc_banks from validator

* Bump abi-digest

(cherry picked from commit 10c81a2448c1db49e010afbbed94ac48209cba48)

# Conflicts:
#	core/src/validator.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-12-02 04:47:42 +00:00
Michael Vines a1828a0e45 Reduce the number of snapshots
(cherry picked from commit 73111b005f)
2020-12-01 13:05:24 -08:00
mergify[bot] 446e02bad1
Add logging in check_blockstore_max_root (#13887) (#13888)
(cherry picked from commit 8fd1e55805)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-01 09:01:09 +00:00
mergify[bot] 535c7a44db
Strengthen EpochSlots sanitization (#13873)
(cherry picked from commit 90d557d916)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-12-01 00:04:01 +00:00
mergify[bot] 3559062c00
caches vote-state de-serialized from vote accounts (#13795) (#13862)
Gossip and other places repeatedly de-serialize vote-state stored in
vote accounts. Ideally the first de-serialization should cache the
result.

This commit adds new VoteAccount type which lazily de-serializes
VoteState from Account data and caches the result internally.

Serialize and Deserialize traits are manually implemented to match
existing code. So, despite changes to frozen_abi, this commit should be
backward compatible.

(cherry picked from commit e1793e5a13)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-30 18:36:23 +00:00
sakridge cea722ac09
Bump version to v1.4.14 (#13852) 2020-11-29 18:20:19 +00:00
Michael Vines f5eb5a3ba6 Bump version to v1.4.13 2020-11-26 06:59:28 +00:00
mergify[bot] a09ee672a6
Separate blockstore checks for not (yet) rooted and cleaned up (#13814) (#13817)
(cherry picked from commit 4ff0f0949a)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-26 00:17:06 +00:00
mergify[bot] fe4c59e38d
Add `solana logs` command (#13812)
(cherry picked from commit 4ef2da0ff0)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-25 22:22:23 +00:00
mergify[bot] 305d5d97d8
Nonce updates (#13799) (#13810)
* runtime: Add `FeeCalculator` resolution method to `HashAgeKind`

* runtime: Plumb fee-collected accounts for failed nonce tx rollback

* runtime: Use fee-collected nonce/fee account for nonced TX error rollback

* runtime: Add test for failed nonced TX accounts rollback

* Fee payer test

* fixup: replace nonce account when it pays the fee

* fixup: nonce fee-payer collect test

* fixup: fixup: clippy/fmt for replace...

* runtime: Test for `HashAgeKind::fee_calculator()`

* Clippy

Co-authored-by: Trent Nelson <trent@solana.com>
(cherry picked from commit b70abdc645)

Co-authored-by: sakridge <sakridge@gmail.com>
2020-11-25 18:18:04 +00:00
mergify[bot] 96d8ee9e07
Add base64+zstd encoding for RPC account data (#13796)
(cherry picked from commit 215ddecaa5)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-25 03:20:20 +00:00
Tyera Eulberg fd9e003ae1
Bump version to 1.4.12 (#13792) 2020-11-24 22:53:36 +00:00
mergify[bot] c736c4633e
Clean up default commitment handling for subscriptions (#13781)
(cherry picked from commit 61ab2072bd)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-24 08:10:11 +00:00
Tyera Eulberg 7099d07fd3
Bump version to 1.4.11 (#13780) 2020-11-24 06:30:35 +00:00
Tyera Eulberg e3b47d22d7
Check SlotNotRooted if confirmed block not found in blockstore or bigtable (#13778) 2020-11-24 04:23:05 +00:00
mergify[bot] 225d15bde8
processes pull-request callers only once per unique caller (#13750) (#13753)
process_pull_requests acquires a write lock on crds table to update
records timestamp for each of the pull-request callers:
https://github.com/solana-labs/solana/blob/3087c9049/core/src/crds_gossip_pull.rs#L287-L300
However, pull-requests overlap a lot in callers and this function ends
up doing a lot of redundant duplicate work.

This commit obtains unique callers before acquiring an exclusive lock on
crds table.

(cherry picked from commit 26bf2b7e45)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-11-22 19:08:33 +00:00
mergify[bot] 6dc62bfb77
Fix fragile tests in prep of stake rewrite pr (#13654) (#13721)
* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!

(cherry picked from commit b74d7b5758)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-20 09:34:46 +00:00