347ff770bd
Correct days/year ( #17024 ) ( #17032 )
...
(cherry picked from commit 46d2755205
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-05-04 11:09:00 +00:00
41ab35fc9b
Refactor SignerSource to expose DerivationPath to other kinds of signers (backport #16933 ) ( #16940 )
...
* Refactor SignerSource to expose DerivationPath to other kinds of signers (#16933 )
* One use statement
* Add stdin uri scheme
* Convert parse_signer_source to return Result
* A-Z deps
* Convert Usb data to Locator
* Pull DerivationPath out of Locator
* Wrap SignerSource to share derivation_path
* Review comments
* Check Filepath existence, readability in parse_signer_source
(cherry picked from commit d6f30b7537
)
# Conflicts:
# Cargo.lock
# clap-utils/src/memo.rs
# remote-wallet/src/locator.rs
# sdk/Cargo.toml
* Fix conflicts
* Fix legacy compile test
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-29 17:14:37 +00:00
9cca79090c
Refactor remote-wallet path parsing (backport #16798 ) ( #16893 )
...
* SDK: More conversions for `Pubkey`
(cherry picked from commit 9b7120bf73
)
* SDK: More conversion for `DerivationPath`
(cherry picked from commit 722de942ca
)
* remote-wallet: Add helpers for locating remote wallets
(cherry picked from commit 64fcb792c2
)
# Conflicts:
# Cargo.lock
* remote-wallet: Plumb `Locator` into `RemoteWalletInfo`
(cherry picked from commit 3d12be29ec
)
# Conflicts:
# remote-wallet/src/ledger.rs
* remote-wallet: `derivation-path` crate doesn't like empty trailing child indexes
(cherry picked from commit 4ce4f04c58
)
* remote-wallet: Move `Locator` to its own module
(cherry picked from commit cac666d035
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-28 04:20:19 +00:00
9541973377
docs: getInflationReward rpc output fields should be in lower camel case ( #16802 ) ( #16804 )
...
(cherry picked from commit ec37a843a4
)
Co-authored-by: Josh <josh.hundley@gmail.com >
2021-04-24 19:23:12 +00:00
0bfe517cfb
runtime: checked math for Bank::withdraw ( #16787 )
...
(cherry picked from commit be29568318
)
# Conflicts:
# runtime/src/bank.rs
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-24 02:50:15 +00:00
bd8e3182ae
requires stakes for propagating crds values through gossip (backport #15561 ) ( #16773 )
...
* requires stakes for propagating crds values through gossip (#15561 )
(cherry picked from commit f2865dfd63
)
# Conflicts:
# core/src/cluster_info.rs
# sdk/src/feature_set.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-23 17:55:15 +00:00
e5460f97ad
Remove unactivated ristretto syscall (backport #16727 ) ( #16744 )
...
* Remove unactivated ristretto syscall (#16727 )
(cherry picked from commit be4df39a4c
)
# Conflicts:
# programs/bpf/Cargo.lock
# programs/bpf/rust/ristretto/Cargo.toml
# programs/bpf/tests/programs.rs
# programs/bpf_loader/src/syscalls.rs
# sdk/src/feature_set.rs
* fix conflicts
Co-authored-by: Jack May <jack@solana.com >
2021-04-22 21:45:18 +00:00
0de08eab3b
CLI: Make pay
subcommand a proper alias of transfer
( #16720 )
...
(cherry picked from commit 63957f0677
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-21 22:39:16 +00:00
80d6a5aa9d
Wrap derivation_path::DerivationPath (backport #16609 ) ( #16650 )
...
* Wrap derivation_path::DerivationPath (#16609 )
* Replace custom DerivationPath impl
* Add method to parse full-path from str with hardening
* Convert Bip44 to trait
* Hoist more work on derivation-path
* Privatize Bip44 trait
(cherry picked from commit 185bbf2db5
)
# Conflicts:
# programs/bpf/Cargo.lock
* Fix conflict
* Make derivation-path optional for legacy bpf build
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-20 22:14:56 +00:00
7f2977a3b0
Bump version to 1.5.20
2021-04-20 17:04:26 +00:00
936ff7424e
makes turbine peer computation consistent between broadcast and retransmit ( #14910 ) ( #16653 )
...
get_broadcast_peers is using tvu_peers:
https://github.com/solana-labs/solana/blob/84e52b606/core/src/broadcast_stage.rs#L362-L370
which is potentially inconsistent with retransmit_peers:
https://github.com/solana-labs/solana/blob/84e52b606/core/src/cluster_info.rs#L1332-L1345
Also, the leader does not include its own contact-info when broadcasting
shreds:
https://github.com/solana-labs/solana/blob/84e52b606/core/src/cluster_info.rs#L1324
but on the retransmit side, slot leader is removed only _after_ neighbors and
children are computed:
https://github.com/solana-labs/solana/blob/84e52b606/core/src/retransmit_stage.rs#L383-L384
So the turbine broadcast tree is different between the two stages.
This commit:
* Removes retransmit_peers. Broadcast and retransmit stages will use tvu_peers
consistently.
* Retransmit stage removes slot leader _before_ computing children and
neighbors.
(cherry picked from commit 570fd3f810
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
v1.5.19
2021-04-20 12:44:50 +00:00
23e114e077
buffers data shreds to make larger erasure coded sets ( #15849 ) ( #16674 )
...
Broadcast stage batches up to 8 entries:
https://github.com/solana-labs/solana/blob/79280b304/core/src/broadcast_stage/broadcast_utils.rs#L26-L29
which will be serialized into some number of shreds and chunked into FEC
sets of at most 32 shreds each:
https://github.com/solana-labs/solana/blob/79280b304/ledger/src/shred.rs#L576-L597
So depending on the size of entries, FEC sets can be small, which may
aggravate loss rate.
For example 16 FEC sets of 2:2 data/code shreds each have higher loss
rate than one 32:32 set.
This commit broadcasts data shreds immediately, but also buffers them
until it has a batch of 32 data shreds, at which point 32 coding shreds
are generated and broadcasted.
(cherry picked from commit 4f82b897bc
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-20 12:40:04 +00:00
09445506e2
CLI: Limit stake-history
output by default ( #16672 )
...
(cherry picked from commit f91de6a84d
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-20 11:34:03 +00:00
6268fa32c6
RPC: use finalized as default pubsub commitment level (backport #16659 ) ( #16665 )
...
* RPC: use finalized as default pubsub commitment level (#16659 )
* RPC: use finalized as default pubsub commitment level
* update docs
* Fix tests
(cherry picked from commit a7e65c0034
)
# Conflicts:
# core/tests/rpc.rs
* fix conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-20 10:07:16 +00:00
7df2525972
Refactored ShortU16Visitor::visit_seq() to reject overflows, extra leading zeros and ensure one-to-one encoding.
2021-04-20 03:01:52 -06:00
90543940bd
sdk: ShortU16 - rename variables for clarity
...
ShortU16's implementation embeds its usage as the length of a
ShortVec, confusingly referring to both a 'len' and a 'size'
at the same time.
2021-04-20 03:01:52 -06:00
dd21f20555
sdk: Add ShortU16 deser test
2021-04-20 03:01:52 -06:00
20a282f03f
Pin SPL downstream build to 589da55
2021-04-20 07:27:12 +00:00
b5894515e8
perf: use saturating/checked integer arithmetic
2021-04-19 23:05:26 -07:00
f6bf48e3c8
renames is_last_in_fec_set back to is_last_data ( #15848 )
...
https://github.com/solana-labs/solana/pull/10095
renamed is_last_data to is_last_in_fec_set. However, the code shows that
this is actually meant to indicate where the serialized data is
complete:
https://github.com/solana-labs/solana/blob/420174d3d/ledger/src/shred.rs#L599-L600
https://github.com/solana-labs/solana/blob/420174d3d/ledger/src/shred.rs#L229-L231
There are multiple FEC sets for each `&[Entry]` serialized and this flag
does not represent shreds last in FEC sets (only the very last one by
overlap). So the name is wrong and confusing
(cherry picked from commit 3b85cbc504
)
2021-04-19 23:04:51 -07:00
63224bd11e
Move derivation path into sdk (backport #16603 ) ( #16606 )
...
* Move derivation path into sdk (#16603 )
* Move DerivationPath to sdk
* Remove eprintln
(cherry picked from commit 52f4b96a80
)
* Fix legacy compile test
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-17 05:57:03 +00:00
4790b0a5cd
CLI BIP32 prep: KeypairUrl
refactor (backport #16592 ) ( #16604 )
...
* clap-utils: Rename KeypairUrl to SignerSource
(cherry picked from commit 09dcc9ea04
)
* clap-utils: Reduce SignerSource's visibility
(cherry picked from commit c5ab3ba6f1
)
* clap-utils: Use `uriparse` crate to parse `SignerSource`
(cherry picked from commit 5d1ef5d01d
)
# Conflicts:
# Cargo.lock
# clap-utils/Cargo.toml
* clap-utils: Add explicit schemes for `ask` and `file` `SignerSource`s
(cherry picked from commit 6444f0e57b
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-16 22:43:47 +00:00
8beaa43e6e
Feature-gate hash-based duplicate transaction check ( #16600 )
...
(cherry picked from commit 285f3c9d56
)
# Conflicts:
# sdk/src/feature_set.rs
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-16 20:23:33 +00:00
151d9bd28c
Don't parse uninitialized system/nonce accounts ( #16584 ) ( #16586 )
...
(cherry picked from commit ba77e48c12
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-15 23:40:21 +00:00
0c2faa3168
Cli: move airdrop to rpc requests ( #16557 ) ( #16563 )
...
* Add recent_blockhash to requestAirdrop
* Move tx confirmation to separate method
* Add RpcClient airdrop methods
* Request cli airdrop via RpcClient
* Pass optional faucet_addr into TestValidator and fix tests
* Update client/src/rpc_client.rs
Co-authored-by: Michael Vines <mvines@gmail.com >
Co-authored-by: Michael Vines <mvines@gmail.com >
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-15 18:12:07 +00:00
525421a669
Rotate CODECOV_TOKEN ( #16578 )
...
(cherry picked from commit a535c0e129
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-15 16:15:14 +00:00
2e5ad16b62
docs: Fix typo in program deploy instructions ( #16572 ) ( #16574 )
...
(cherry picked from commit c8ed14c647
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-15 14:04:54 +00:00
87494812a7
v1.5: faucet backports ( #16565 )
...
* Faucet: repurpose cap and slice args to apply to single IPs (#16381 )
* Single use stmt
* Log request IP
* Switch cap and slice to apply per IP
* Use SOL in logs, error msgs
* Use thiserror instead of overloading io::Error
* Return memo transaction for requests that exceed per-request-cap
* Handle faucet memos in cli
* Add some docs, esp about memo transaction
* Use SOL symbol & standardize memo
Co-authored-by: Michael Vines <mvines@gmail.com >
* Differentiate faucet tx-length errors
* Populate signature in cli airdrop memo case
Co-authored-by: Michael Vines <mvines@gmail.com >
* Add address_cache and exclude loopback from ip limit (#16487 )
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-15 10:13:14 +00:00
b555845ca2
dl-utils: use wide_msg
everywhere for truncation on narrow terminals ( #16554 )
...
(cherry picked from commit e61b4b7d70
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-15 01:09:41 +00:00
98867430d5
Fix sanity test flakiness by prebuilding binaries ( #16530 ) ( #16545 )
...
* Fix sanity test flakiness by prebuilding binaries
* ignore shellcheck
* bump
* nudge
* simplify
(cherry picked from commit 328e7690f3
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-14 18:50:35 +00:00
d7a8420d9a
bump solana_rbpf from 0.2.5 to 0.2.7 ( #16515 ) ( #16524 )
...
(cherry picked from commit f7eadd9d70
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-14 13:00:53 +00:00
ef3c33ad06
Remove blake3 from bpf program dependencies ( #16506 ) ( #16528 )
...
(cherry picked from commit f641429056
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-14 03:22:12 +00:00
02762ff785
v1.5: Use blake3 message hash in status cache ( #16513 )
...
* v1.5: Use blake3 message hash in status cache
* bump bpf ix count
2021-04-14 09:52:24 +08:00
07336e3e43
Fix account copy step in program test message processor ( #16469 ) ( #16471 )
...
(cherry picked from commit 278c125d99
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-14 01:45:12 +00:00
e5a76572d9
Deprecate RpcClient methods, RpcRequest variants ( #16516 ) ( #16518 )
...
* Deprecate RpcClient methods, RpcRequest variants
* Update cli to getSupply
(cherry picked from commit ccb11a939f
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-13 21:27:46 +00:00
0d3756b4d8
Status cache improvements ( #16174 ) ( #16511 )
...
Co-authored-by: sakridge <sakridge@gmail.com >
2021-04-13 13:08:31 +00:00
a6b346d876
removes OrderedIterator and transaction batch iteration order (backport #16153 ) ( #16510 )
...
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-13 12:47:44 +00:00
4276591eb9
limits number of unique pubkeys in the crds table (bp #15539 ) ( #16475 )
...
* limits number of unique pubkeys in the crds table (#15539 )
(cherry picked from commit 56923c91bf
)
# Conflicts:
# core/src/cluster_info.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-12 00:36:41 +00:00
127e7407e4
Fill in not-yet-finalized block-time if possible ( #16460 ) ( #16462 )
...
(cherry picked from commit 8bc0bdd40b
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-09 21:36:44 +00:00
11ab894256
[easy, cleanup] Simplify some pattern-matches (bp #16402 ) ( #16445 )
...
* Simplify some pattern-matches (#16402 )
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust ).
(cherry picked from commit b08cff9e77
)
# Conflicts:
# accounts-cluster-bench/src/main.rs
# core/src/rpc.rs
# runtime/src/accounts_hash.rs
# runtime/src/message_processor.rs
* Fix conflicts
Co-authored-by: François Garillot <4142+huitseeker@users.noreply.github.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-08 20:01:20 +00:00
f10f57e89f
Cli: use get_inflation_rewards and limit epochs queried ( #16408 ) ( #16443 )
...
* Fix block-with-limit when not finalized blocks found
* Enable confirmed commitment in getInflationReward
* Use get_inflation_rewards in cli
* Line up rewards output
* Add range validator
* Change cli epoch arg -> num epochs
* Add solana inflation rewards subcommand
* Consolidate epoch rewards meta
(cherry picked from commit bb9d2fd07a
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-08 19:05:59 +00:00
592a13b5f8
CI: Let cargo-install-all.sh
resolve stable ( #16429 )
...
(cherry picked from commit 388ce12207
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-07 21:46:59 +00:00
5702744399
CLI: Fix rent
panic ( #16417 ) ( #16425 )
...
* CLI: Fix `rent` panic on non-numeric input (+monikers)
* Update cli/src/cluster_query.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
* Update cli/src/cluster_query.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
* Update cli/src/cluster_query.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
(cherry picked from commit c5c3ae0203
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-07 17:17:51 +00:00
c7629d595b
Remove wallclock throttle from BankingStage tests (bp #16396 ) ( #16398 )
...
* No wallclock throttle tests (#16396 )
(cherry picked from commit 1219842a96
)
# Conflicts:
# core/src/banking_stage.rs
* Resolve conflicts
Co-authored-by: carllin <carl@solana.com >
2021-04-07 16:05:26 +00:00
cfc824d38d
Speed up net.sh builds (bp #16360 ) ( #16419 )
...
* Speed up net.sh builds (#16360 )
* Speed up net.sh builds
* feedback
* Update net/net.sh
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
* feedback
* fix
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
(cherry picked from commit 6cd4bc5e60
)
# Conflicts:
# scripts/cargo-install-all.sh
* fix
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-07 08:22:48 +00:00
492a02d737
Rpc: introduce get_inflation_reward rpc call (bp #16278 ) ( #16409 )
...
* Rpc: introduce get_inflation_reward rpc call (#16278 )
* feat: introduce get_inflation_reward rpc call
* fix: style suggestions
* fix: more style changes and match how other rpc functions are defined
* feat: get reward for a single epoch
* feat: default to the most recent epoch
* fix: don't factor out get_confirmed_block
* style: introduce from impl for RpcEncodingConfigWrapper
* style: bring commitment into variable
* feat: support multiple pubkeys for get_inflation_reward
* feat: add get_inflation_reward to rpc client
* feat: return rewards in order
* fix: rename pubkeys to addresses
* docs: introduce jsonrpc docs for get_inflation_reward
* style: early return in map (not sure which is more idiomatic)
* fix: call the rpc client function args addresses as well
* fix: style
* fix: filter out only addresses we care about
* style: make this more idiomatic
* fix: change rpc client epoch to optional and include some docs edits
* feat: filter out rent rewards in get_inflation_reward
* feat: add option epoch config param to get_inflation_reward
* feat: rpc client get_inflation_reward takes epoch instead of config and some filter staking and voting rewards
(cherry picked from commit e501fa5f0b
)
# Conflicts:
# client/src/rpc_client.rs
# core/src/rpc.rs
* fix: resolve cherry-pick conflicts
* fix: change bool_to_option filter_map to filter + map
* style: use filter_map in place of filter + map
Co-authored-by: Josh <josh.hundley@gmail.com >
2021-04-07 06:09:27 +00:00
624f9790bd
validator: Use a const for wait for supermajority threshold ( #16391 )
...
(cherry picked from commit 7a2a39093d
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-06 05:02:25 +00:00
a23fb497ec
Cluster info shred spies (bp #16389 ) ( #16394 )
...
* cluster-info: Don't subtract non-shred spies from node count
(cherry picked from commit b6b08706b9
)
* cluster-info: Get rid of some integer math while we're here
(cherry picked from commit b71875df61
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-06 01:25:16 +00:00
6107de87c0
merkle-tree: fix build when targeting bpf (bp #16335 ) ( #16341 )
...
* merkle-tree: Add Xargo.toml
(cherry picked from commit a1d9b53cd7
)
* merkle-tree: Get `Hash` et. al from program instead of sdk
(cherry picked from commit ddc0a16cec
)
* merkle-tree: Use `matches` crate when targeting eBPF
(cherry picked from commit a44c32694f
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-05 20:42:37 +00:00
0c0b65e9ab
Only get Blockstore::last_root once ( #16362 ) ( #16365 )
...
(cherry picked from commit b8b6777262
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-05 06:54:23 +00:00