2ce6c86c2a
runtime: checked math for Bank::withdraw ( #16788 )
...
(cherry picked from commit be29568318
)
# Conflicts:
# runtime/src/bank.rs
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-24 00:25:41 +00:00
ff9573714b
get_packed_len() now correctly handles u32/i32 types
...
(cherry picked from commit 1500011fc6
)
2021-04-23 13:52:10 -07:00
826111cf79
Restore text wrapping ( #16776 ) ( #16780 )
...
(cherry picked from commit da58f20a99
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-23 17:34:47 +00:00
f31f1d0f52
fix reference to Rust Restrictions section ( #16763 ) ( #16775 )
...
(cherry picked from commit e9a616cfc2
)
Co-authored-by: strykerin <dacosta.pereirafabio@gmail.com >
2021-04-23 17:02:27 +00:00
e220f7067b
docs: fix formatting issue ( #16761 ) ( #16774 )
...
(cherry picked from commit c217ee3a00
)
Co-authored-by: strykerin <dacosta.pereirafabio@gmail.com >
2021-04-23 17:02:18 +00:00
d9726e61bc
retains crds values if the origin is still active ( #16576 ) ( #16771 )
...
Local timestamps are updated for records associated with a pubkey if the
origin is still active:
https://github.com/solana-labs/solana/blob/c8ed14c64/core/src/crds.rs#L301-L311
However this is done inconsistently on some gossip paths (pull requests
and pull responses) but not all (e.g. push messages). Additionally
update_record_timestamp is inefficient since there can be ~800 values
associated with each pubkey.
This commit updates records timestamps only on contact-infos; and,
instead utilizes origin's timestamp when purging old values.
(cherry picked from commit 2c82f2154d
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-23 16:42:54 +00:00
786fa4f22e
removes first_coding_index from erasure recovery code ( #16646 ) ( #16770 )
...
first_coding_index is the same as the set_index and is so redundant:
https://github.com/solana-labs/solana/blob/37b8587d4/ledger/src/blockstore_meta.rs#L49-L60
(cherry picked from commit 03194145c0
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-23 13:21:27 +00:00
5b74678e37
Ingest votes from gossip into fork choice ( #16560 ) ( #16724 )
...
(cherry picked from commit 4c94f8933f
)
Co-authored-by: carllin <carl@solana.com >
2021-04-23 07:20:10 +00:00
d203bd1998
Add TPU client for sending txs to the current leader tpu port ( #16736 ) ( #16762 )
...
* Add TPU client for sending txs to the current leader tpu port
* Update tpu_client.rs
(cherry picked from commit 75b8434b76
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-23 02:50:30 +00:00
5f5fa38d85
program-test: Add large bootstrap stake for realistic warmups (backport #16739 ) ( #16741 )
...
* program-test: Add large bootstrap stake for realistic warmups (#16739 )
(cherry picked from commit f4214637a9
)
# Conflicts:
# program-test/Cargo.toml
* Fix merge conflict
Co-authored-by: Jon Cinque <jon.cinque@gmail.com >
2021-04-22 23:07:52 +00:00
fadf1efa41
Update getLeaderSchedule options ( #16749 ) ( #16752 )
...
(cherry picked from commit 636b5987af
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-22 21:02:46 +00:00
0269fffa5a
Remove unactivated ristretto syscall (backport #16727 ) ( #16745 )
...
* 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
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2021-04-22 18:33:27 +00:00
50e441a9ed
Update secp instruction link in docs ( #16729 ) ( #16733 )
...
(cherry picked from commit b22c13dcd7
)
Co-authored-by: Jack May <jack@solana.com >
2021-04-22 04:53:38 +00:00
9413051053
Clean up "APR" language around inflation rewards ( #16732 )
...
(cherry picked from commit b8b54567b1
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-22 03:29:52 +00:00
13e176a633
getLeaderSchedule now supports filtered results based on validator identity ( #16731 )
...
(cherry picked from commit 6004c0abf5
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-22 02:29:01 +00:00
9268239c75
Make metrics tests independent of RUST_LOG env var ( #16710 ) ( #16730 )
...
Previously, running the tests with RUST_LOG=none would fail, because the
env logger would set its filter level to reject all log messages, and
incrementing a counter only happens if the global logger has at least
the specified log level. Having the tests behave differently when
RUST_LOG is set is surprising, they should be self-contained.
Nix' buildRustPackage sets RUST_LOG="" to make the build logs less
verbose. I have trouble packaging Solana for Nix because of this, and I
believe making the tests independent of the environment is a good
solution for this.
(cherry picked from commit 3f92abedd5
)
Co-authored-by: Ruud van Asseldonk <dev@veniogames.com >
2021-04-22 01:41:07 +00:00
e51d7af847
verify_pubkey() now takes a ref ( #16725 )
...
(cherry picked from commit 91b6888e15
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-21 23:22:13 +00:00
147ba1de69
Update float docs ( #16695 ) ( #16726 )
...
(cherry picked from commit bb2b4c7e0b
)
Co-authored-by: Jack May <jack@solana.com >
2021-04-21 22:55:00 +00:00
7cc709c82a
CLI: Make pay
subcommand a proper alias of transfer
( #16721 )
...
(cherry picked from commit 63957f0677
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-21 22:40:11 +00:00
a2395e8730
Add --seed support to delegate-stake and withdraw-stake commands ( #16717 )
...
(cherry picked from commit ba9a502e7e
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-21 21:49:39 +00:00
ae605f8f02
expands number of erasure coding shreds in the last batch in slots (backport #16484 ) ( #16707 )
...
* expands number of erasure coding shreds in the last batch in slots (#16484 )
Number of parity coding shreds is always less than the number of data
shreds in FEC blocks:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L719
Data shreds are batched in chunks of 32 shreds each:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L714
However the very last batch of data shreds in a slot can be small, in
which case the loss rate can be exacerbated.
This commit expands the number of coding shreds in the last FEC block in
slots to: 64 - number of data shreds; so that FEC blocks are always 64
data and parity coding shreds each.
As a consequence of this, the last FEC block has more parity coding
shreds than data shreds. So for some shred indices we will have a coding
shred but no data shreds. This should not cause any kind of overlapping
FEC blocks as in:
https://github.com/solana-labs/solana/pull/10095
since this is done only for the very last batch in a slot, and the next
slot will reset the shred index.
(cherry picked from commit 37b8587d4e
)
# Conflicts:
# core/benches/shredder.rs
# ledger/src/shred.rs
* removes backport merge conflicts
* ignore the flaky test for now
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-21 15:25:26 +00:00
ea2cc90215
Improve net scripts (backport #16699 ) ( #16700 )
...
* Pass limit-ledger-size value
(cherry picked from commit 51b748408c
)
* Initialize non-bootstrap ndoes with faucet address
(cherry picked from commit 053120e04c
)
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-21 08:45:11 +00:00
e15ddbb979
Add port and gossip options to solana-test-validator ( #16696 ) ( #16698 )
...
(cherry picked from commit 0924c2d070
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-21 03:46:52 +00:00
bbd8bd2e74
Enforce host aligned memory for program regions (backport #16590 ) ( #16683 )
...
* Enforce host aligned memory for program regions (#16590 )
(cherry picked from commit 08d5253651
)
# Conflicts:
# cli/Cargo.toml
# programs/bpf/Cargo.toml
# programs/bpf/benches/bpf_loader.rs
# programs/bpf/tests/programs.rs
# programs/bpf_loader/Cargo.toml
# programs/bpf_loader/src/lib.rs
* fix conflicts
Co-authored-by: Jack May <jack@solana.com >
2021-04-21 01:47:00 +00:00
a5794efe16
getVoteAccounts: Limit the length of the epoch_credits
array ( #16692 )
...
(cherry picked from commit 34addee882
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-20 22:55:17 +00:00
27095378fa
Remove unwrap from bpf_loader serialization ( #16645 ) ( #16649 )
...
(cherry picked from commit 2409bb18f3
)
Co-authored-by: Jack May <jack@solana.com >
2021-04-20 16:35:45 +00:00
a8836649cb
uses current local timestamp when recording purged values ( #16675 )
...
CrdsGossipPull.purged_values is meant to record recently purged values
so that they are excluded from imminent pull requests, until the entire
cluster have synced to the updated value:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds_gossip_pull.rs#L449-L454
However, VersionedCrdsValue.local_timestamp represents the local time
when the value was last updated, and given that crds values may have
different timeouts based on stake, it does not necessarily represent how
recently the value was purged:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds.rs#L75-L76
As such, recording current local timestamp when purging values is more
appropriate. Additionally, purge_purged assumes that the purge_values is
sorted in timestamps when draining the old ones; which is not true if
those timestamps are VersionedCrdsValue.local_timestamp:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds_gossip_pull.rs#L563-L571
(cherry picked from commit bc90e04e64
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2021-04-20 12:42:30 +00:00
cc81830f13
CLI: Limit stake-history
output by default ( #16673 )
...
(cherry picked from commit f91de6a84d
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-20 11:36:15 +00:00
558a46f5d5
RPC: use finalized as default pubsub commitment level ( #16659 ) ( #16666 )
...
* RPC: use finalized as default pubsub commitment level
* update docs
* Fix tests
(cherry picked from commit a7e65c0034
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-20 09:47:50 +00:00
57add5366e
Expand a couple docs sections (backport #16664 ) ( #16671 )
...
* docs: Flesh out address verification in integraion guide
(cherry picked from commit d575450ef0
)
* docs: Expand native program descriptions
(cherry picked from commit 12678a819d
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-20 09:33:40 +00:00
5057aaddc0
Send votes to next leader's TPU instead of our TPU ( #16663 )
...
(cherry picked from commit c8b474cd0b
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-20 08:45:58 +00:00
3865219085
Remove unwrap ( #16652 ) ( #16657 )
...
(cherry picked from commit 01786f684e
)
Co-authored-by: Jack May <jack@solana.com >
2021-04-20 04:45:37 +00:00
6da06654ff
Wrap derivation_path::DerivationPath (backport #16609 ) ( #16651 )
...
* 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
)
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-04-20 00:50:16 +00:00
4a375acebc
Add --sort argument to solana validators
(backport #16640 ) ( #16655 )
...
* Add --sort argument to `solana validators`
(cherry picked from commit b66faf7e80
)
* Add line numbers to `solana validators` output
(cherry picked from commit 818c3198c1
)
* Print the header as a footer when there's a large number of validators to show
(cherry picked from commit 1824b5a2ce
)
* Add --number argument
(cherry picked from commit f14cf3ed1a
)
* Prefix current validators with nbsp for easier sed-ing
(cherry picked from commit 568438aa6f
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-20 00:42:19 +00:00
9fcd465928
solana validators
: Restore the meaning of "credits" in the JSON output (#16647 )
...
(cherry picked from commit 1b63bdaf44
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-19 21:08:12 +00:00
1f8ef5e640
solana validators
now shows current epoch credits instead of lifetime credits (#16639 )
...
(cherry picked from commit f5f06904c3
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-19 18:52:27 +00:00
a1b0f2f681
Increase test timeout
2021-04-19 04:12:16 +00:00
f59d4f29d9
clippy
2021-04-19 04:12:16 +00:00
b379004c3b
Upgrade to Rust 1.51.0
2021-04-19 04:12:16 +00:00
25491780df
Remove unnecessary clone ( #16621 )
...
(cherry picked from commit 6907a2366e
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-17 18:31:18 +00:00
4354ad3299
Documentation typo for langauge ( #16620 )
...
(cherry picked from commit 5399faaf53
)
Co-authored-by: Guillaume Claret <dev@clarus.me >
2021-04-17 15:20:54 +00:00
4e94446fc3
Bump version to v1.6.7
2021-04-16 23:31:30 +00:00
d99795c000
Move derivation path into sdk ( #16603 ) ( #16607 )
...
* Move DerivationPath to sdk
* Remove eprintln
(cherry picked from commit 52f4b96a80
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-16 23:23:14 +00:00
fe775a9716
CLI BIP32 prep: KeypairUrl
refactor (backport #16592 ) ( #16605 )
...
* 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
)
* clap-utils: Add explicit schemes for `ask` and `file` `SignerSource`s
(cherry picked from commit 6444f0e57b
)
Co-authored-by: Trent Nelson <trent@solana.com >
v1.6.6
2021-04-16 21:14:31 +00:00
ac76a75937
Feature-gate hash-based duplicate transaction check ( #16601 )
...
(cherry picked from commit 285f3c9d56
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-16 19:59:55 +00:00
6c1678244f
docs: Fix typo in program deploy instructions ( #16572 ) ( #16575 )
...
(cherry picked from commit c8ed14c647
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-04-16 05:58:31 +00:00
63a9f33be1
Don't parse uninitialized system/nonce accounts ( #16584 ) ( #16587 )
...
(cherry picked from commit ba77e48c12
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-15 23:39:16 +00:00
c9da91cb1c
Rotate CODECOV_TOKEN ( #16579 )
...
(cherry picked from commit a535c0e129
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2021-04-15 16:15:20 +00:00
b3488e0139
Cli: move airdrop to rpc requests ( #16557 ) ( #16564 )
...
* 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 >
(cherry picked from commit 7dfb51c0b4
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-04-15 07:35:19 +00:00
f3814a0478
docs: freshen and clarify rent-exempt dev description ( #16562 )
...
(cherry picked from commit 76ce28c723
)
Co-authored-by: Trent Nelson <trent@solana.com >
2021-04-15 04:35:08 +00:00