Commit Graph

9462 Commits

Author SHA1 Message Date
4fd298abd5 Bump jsonrpc crates to 15.0.0 (bp #12491) 2020-09-25 20:24:39 +00:00
7a33ef1547 Ignore cargo audit RUSTSEC-2020-0008 (bp #12485) (#12488)
* Ignore cargo audit RUSTSEC-2020-0008

(cherry picked from commit cd5c7f30d5)

# Conflicts:
#	ci/test-checks.sh

* conflicts

Co-authored-by: Jack May <jack@solana.com>
2020-09-25 10:06:12 -07:00
f4a2045876 CLI: Factor out offline helpers (bp #12382) 2020-09-24 03:10:04 +00:00
dfabe35b27 Move dropping AppendVecs outside lock (#12408) (#12428)
* Move drop outside lock

Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 55be8d4016)

Co-authored-by: carllin <wumu727@gmail.com>
2020-09-23 23:27:56 +00:00
75fec798bc patches default impl for crds filter (bp #12199) (#12418)
* patches default impl for crds filter (#12199)

In CrdsFilter.mask all bits after mask_bits are set to 1:
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L65
However the default implementation, sets both mask and mask_bits to zero
which is inconsistent with CrdsFilter::compute_mask for a mask_bits of
zero.

This commit changes the default implementation by setting mask to
`!0u64` (i.e all bits set to one). As a result, for the default crds
filter, `test_mask` will always return true, whereas previously it was
always returning false.
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L85

This is only used in tests and benchmarks, but causes some benchmarks to
be misleading by short circuiting in this line:
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L429

(cherry picked from commit d6ec03f13c)

# Conflicts:
#	core/src/crds_gossip_pull.rs

* resolves mergify merge conflict

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-09-23 22:06:33 +00:00
0c4743df03 RpcClient::get_multiple_accounts() now works (#12426)
(cherry picked from commit ff890c173c)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-23 21:58:23 +00:00
29f9c1e1f2 uses rust intrinsics to convert hashes to u64 (#12097) (#12379)
(cherry picked from commit 28f2fa3fd5)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-09-23 14:59:12 +00:00
c4609d0b6d Fix solana-tokens check_payer_balances for distribute-stake (bp #12380) (#12403) (#12407)
* Fix solana-tokens check_payer_balances for distribute-stake (#12380)

* Handle distribute-stakes properly

* Remove dry-run gating for balance checks

* Reword and simplify InsufficientFunds errors

* Split up test and add helpers

* Rename sol_for_fees -> unlocked_sol

* Refactor distribute_allocations to collect Messages

* Clippy

* Clean up dangling bids

(cherry picked from commit 6563726f22)

# Conflicts:
#	tokens/src/commands.rs

* Fix conflicts

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-23 06:44:55 +00:00
3b70849885 validator: Add --require-tower stub arg 2020-09-23 05:06:37 +00:00
5979005454 adds new CrdsFilterSet type for Vec<CrdsFilter> (bp #12029) (#12378)
* adds new CrdsFilterSet type for Vec<CrdsFilter> (#12029)

(cherry picked from commit 114c211b66)

# Conflicts:
#	core/src/crds_gossip_pull.rs

* resolves mergify merge conflict

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-09-23 03:59:20 +00:00
27c8e7b905 Bump spl-token (bp #12395) (#12399)
* Bump spl-token (#12395)

(cherry picked from commit e1a212fb79)

# Conflicts:
#	Cargo.lock
#	account-decoder/Cargo.toml
#	core/Cargo.toml
#	transaction-status/Cargo.toml

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-09-23 01:17:44 +00:00
3612964a58 Adjust bpf epoch for tests, not effecting prod. (#12387)
* Adjust bpf epoch for tests, not effecting prod.

* Fix local cluster test...
2020-09-23 04:55:08 +09:00
495e237935 Add PerfSamples column to blockstore (#12377)
* Add blockstore column to store performance sampling data

* Add PerfSamples to purge/compaction
2020-09-22 13:32:16 -06:00
1757cb85a1 Update comment 2020-09-21 18:59:17 -06:00
b10fb46a4b Update test hash to align across branches finally 2020-09-21 18:59:17 -06:00
7045aa9760 Improve pre-operating-mode-based hashing gating 2020-09-21 18:59:17 -06:00
e371681f53 CLI: Drop unused runtime dep (#12373)
(cherry picked from commit 6767264aa1)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-09-21 20:50:38 +00:00
e972db03bd Add blocktime column to blockstore (bp #12336) (#12341)
* Add blocktime column to blockstore (#12336)

(cherry picked from commit 95ed3641c6)

# Conflicts:
#	ledger/src/blockstore_db.rs

* Fix conflict

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-09-18 23:08:34 +00:00
a8f7a0c648 Bump version to 1.2.30 (#12301) 2020-09-17 11:25:14 +08:00
687254497c Restore --expected-shred-version argument for mainnet-beta (#12299)
(cherry picked from commit 9410eab2af)

Co-authored-by: Michael Vines <mvines@gmail.com>
v1.2.29
2020-09-17 01:19:30 +00:00
b8932ad0c8 RPC: Limit request payload size to 50kB (#12286)
(cherry picked from commit 32dcce0ac1)

Co-authored-by: Trent Nelson <trent@solana.com>
2020-09-16 23:50:11 +00:00
1d4dbe0090 v1.2: Remove client resends (#12292)
* Remove resends from client send_tx methods

* Retry status queries until blockhash expires
2020-09-16 17:48:02 -06:00
1f8e9c2364 builds crds filters without looping over filters (#11998) (#12291)
(cherry picked from commit bc7adb97ed)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2020-09-16 23:35:06 +00:00
ac07fb392d Fix off-by-one max payload checks (bp #12230) (#12284)
* Fix off-by-one max payload checks

(cherry picked from commit f6cda2579f)

# Conflicts:
#	faucet/src/faucet.rs

* Update faucet.rs

Co-authored-by: Justin Starry <justin@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-16 21:09:20 +00:00
a492357964 v1.2: Backports of solana tokens improvements, including transfer to many arg (#12278)
* Clean up solana-tokens (#10667)

* Use a trait object in solana-tokens' ThinClient

* Inline arg resolution

Not worth the code complexity

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add lockups via solana-tokens (bp #11782) (#12263)

* Add lockups via solana-tokens (#11782)

* Allow stake distributions to update lockups

* Reorg

* Add lockup test

* Fix clippy warning

(cherry picked from commit 5553732ae2)

* Fix build

Co-authored-by: Greg Fitzgerald <greg@solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>

* Improve solana-tokens UX (#12253) (#12260)

* Fix computed banks port

* Readme incorrect

* Return error if csv cannot be read

* Move column headers over columns

* Add dry-run check for sender/fee-payer balances

* Use clap requires method for paired args

* Write transaction-log anytime outfile is specified

* Replace campaign-name with required db-path

* Remove bids

* Exclude new_stake_account_address from logs for non-stake distributions

* Fix readme

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

* solana-tokens: Add capability to perform the same transfer to a batch of recipients (bp #12259) (#12266)

* solana-tokens: Add capability to perform the same transfer to a batch of recipients (#12259)

* Add transfer-amount argument, use simplified input-csv

* Add transfer-amount to readme

(cherry picked from commit a48cc073cf)

# Conflicts:
#	tokens/src/commands.rs
#	tokens/tests/commands.rs

* Fix build

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

Co-authored-by: Greg Fitzgerald <greg@solana.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-16 17:42:31 +00:00
e0bb26d9db RPC sendTransaction now returns transaction logs on simulation failure (bp #12267) (#12275)
* RPC sendTransaction now returns transaction logs on simulation failure

(cherry picked from commit 749208fa32)

# Conflicts:
#	core/src/rpc.rs

* Remove stale comment

(cherry picked from commit c6eea94edc)

# Conflicts:
#	core/src/rpc.rs

* Resolve merge conflicts

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-16 17:32:55 +00:00
d687dd9f13 validator-info get/set no longer crash on invalid account data (#12257)
(cherry picked from commit 56282f0c01)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-16 01:18:36 +00:00
4b649a71df Drop the recommendation that --expected-shred-version be set by validators (bp #12242) (#12243)
* Drop the recommendation that `--expected-shred-version` be set by validators

`--expected-shred-version` is another knob for users to get wrong and is
documentation that can get stale due to cluster restarts.  Turns out
it's also generally not required anymore either because:
1. The cluster entrypoint can always be expected to be using the correct
   shred version, and that shred version will be adopted by the new node
   (earlier this was not the case when the `solana-gossip spy` node on
   mainnet-beta.solana.com:8001 ran with shred version 0)
2. On a cluster restart, `--expected-bank-hash` is a much stronger
   assertion that the validator is starting from the correct place (and
   didn't exist when `--expected-shred-version` was first recommended)

(cherry picked from commit 4ada4d43f2)

# Conflicts:
#	docs/src/clusters.md
#	docs/src/running-validator/restart-cluster.md

* Update clusters.md

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-15 17:43:00 +00:00
388a285517 Update Cargo.lock 2020-09-15 09:46:20 -07:00
45c368d670 Add new validator options for running in more restrictive environments (bp #12191) (#12217)
* Add --restricted-repair-only-mode flag

(cherry picked from commit 63a67f415e)

# Conflicts:
#	validator/src/main.rs

* Add --gossip-validator argument

(cherry picked from commit daae638781)

# Conflicts:
#	core/src/crds_gossip_pull.rs
#	core/src/crds_gossip_push.rs
#	core/src/gossip_service.rs
#	validator/src/main.rs

* Documenet how to reduce validator port exposure

(cherry picked from commit c8f03c7f6d)

* Resolve conflicts

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-15 04:44:04 +00:00
bf5609b4fc Fix propagation on startup from snapshot (#12177) (#12198)
(cherry picked from commit 9c490e06b0)

Co-authored-by: carllin <wumu727@gmail.com>
2020-09-12 04:44:00 +00:00
d8c0633f0f Add bank-hash subcommand
(cherry picked from commit a07980536a)
2020-09-10 10:13:54 -06:00
aebb8187a8 Add --print-account-stats/--snapshot-archive-path arguments to ledger-tool (#10945)
Allows for seeing how the accounts are being stored
and specifying a different snapshot source directory.

(cherry picked from commit 6429042b6e)
2020-09-10 10:13:54 -06:00
159722a960 genesis: Half-support new --cluster-type on v1.2
Just map these values onto OperatingMode
2020-09-10 05:25:46 +00:00
c5b36cf18c Specify loader when bootstrapping bpf programs (#11571) (#12145)
(cherry picked from commit 0a94e7e7fa)

Co-authored-by: Jack May <jack@solana.com>
2020-09-10 03:51:20 +00:00
fae90ff397 Program subscriptions now properly check results len and token program id (#12139) (#12140)
(cherry picked from commit 4431080066)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-09-09 22:20:59 +00:00
a91a106319 Make ledger-tool accounts print rent_epoch and slot (#11845) (#12125)
(cherry picked from commit 57174cdabe)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-09-09 07:12:35 +00:00
7c8debd14a RPC: getMinimumBalanceForRentExemption now only responds to valid account lengths (bp #12113) (#12115)
* getMinimumBalanceForRentExemption now only responds to valid account lengths

(cherry picked from commit 9e96180ce4)

# Conflicts:
#	core/src/rpc.rs

* Update rpc.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-08 19:28:07 +00:00
9c64e5e3b1 Fix RPC transaction method options serialization (bp #12100) (#12101)
* Fix RPC transaction method configs serialization (#12100)

(cherry picked from commit 9940870c89)

# Conflicts:
#	core/src/rpc.rs

* Update rpc.rs

Co-authored-by: Justin Starry <justin@solana.com>
2020-09-08 09:40:47 +00:00
e48ce1e682 Compress snapshot archive within the validator to reduce system dependencies, and default to zstd compression (bp #12085) (#12086)
* Compress snapshot archive within the validator to reduce system dependencies

(cherry picked from commit d3750b47d2)

* Default snapshot compression to zstd instead of bzip2 for quicker snapshot generation

(cherry picked from commit 9ade73841f)

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-07 07:03:59 +00:00
2c239904cc Bump version to 1.2.29 2020-09-04 22:37:52 -07:00
9e459f0093 Bump version to 1.2.28 v1.2.28 2020-09-04 20:00:27 -07:00
166251fccd v1.2: Bigtable bug fixes (#12059)
* Accommodate stricted get_bincode_cell in get_confirmed_signatures_for_address

* Sort signatures newest-oldest, even within slot
2020-09-04 20:29:03 -06:00
ebbb106fb7 Add unlock epochs for blake3 (bp #12054) (#12055)
* Add unlock epochs for blake3 (#12054)

Co-authored-by: Carl <carl@solana.com>
(cherry picked from commit a13efc52b3)

# Conflicts:
#	runtime/src/accounts_db.rs

* Resolve conflicts

* Bump hash

Co-authored-by: carllin <wumu727@gmail.com>
Co-authored-by: Carl <carl@solana.com>
2020-09-05 00:42:16 +00:00
a018d78056 Add LARGEST_CONFIRMED_ROOT_UPLOAD_DELAY 2020-09-04 23:42:25 +00:00
67daa6f01e Request correct access 2020-09-04 23:42:25 +00:00
d5aa648947 Remove dead code 2020-09-04 23:42:25 +00:00
acfd72d7c4 Adapt to v1.2 2020-09-04 23:42:25 +00:00
096d9ce5c7 Cargo.lock 2020-09-04 23:42:25 +00:00
a8e522702c Add exit flag for bigtable upload operations 2020-09-04 23:42:25 +00:00