Commit Graph

13835 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 36e11998c7
read only accounts cache uses accurate size representation (#16610)
* read ony accounts cache uses accurate size representation

* add comment and test
2021-04-20 09:58:01 -05:00
behzad nouri bc90e04e64 uses current local timestamp when recording purged values
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
2021-04-20 11:21:00 +00:00
Trent Nelson f91de6a84d CLI: Limit `stake-history` output by default 2021-04-20 10:15:25 +00:00
dependabot[bot] 97f6b090b9
chore:(deps): bump @solana/web3.js from 1.4.0 to 1.5.0 in /explorer (#16669)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Changelog](https://github.com/solana-labs/solana-web3.js/blob/master/.releaserc.json)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 18:07:38 +08:00
dependabot[bot] 2c2e7e4cf9
chore:(deps): bump @testing-library/user-event in /explorer (#16668)
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.1.4 to 13.1.5.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v13.1.4...v13.1.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 09:16:06 +00:00
dependabot[bot] b32ad29071
chore:(deps): bump @solana/spl-token-registry in /explorer (#16667)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.57 to 0.2.58.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.57...v0.2.58)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 09:03:29 +00:00
Trent Nelson 12678a819d docs: Expand native program descriptions 2021-04-20 08:50:54 +00:00
Trent Nelson d575450ef0 docs: Flesh out address verification in integraion guide 2021-04-20 08:50:54 +00:00
Justin Starry a7e65c0034
RPC: use finalized as default pubsub commitment level (#16659)
* RPC: use finalized as default pubsub commitment level

* update docs

* Fix tests
2021-04-20 08:19:54 +00:00
Michael Vines c8b474cd0b Send votes to next leader's TPU instead of our TPU 2021-04-20 00:38:21 -07:00
dependabot[bot] a19c3ba5b0
chore: bump @types/node from 14.14.37 to 14.14.41 in /web3.js (#16614)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 14.14.41.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 13:37:49 +08:00
dependabot[bot] b20314738f
chore:(deps): bump @solana/web3.js from 1.2.7 to 1.4.0 in /explorer (#16632)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 1.2.7 to 1.4.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Changelog](https://github.com/solana-labs/solana-web3.js/blob/master/.releaserc.json)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v1.2.7...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 13:37:38 +08:00
Jack May 01786f684e
Remove unwrap (#16652) 2021-04-19 20:17:56 -07:00
Tyera Eulberg 30c95d38a5 feat: support commitment in getConfirmed methods 2021-04-19 20:49:20 -06:00
Tyera Eulberg a99ee15a85 fix: add Finality type for confirmed+ 2021-04-19 20:49:20 -06:00
Michael Vines 568438aa6f Prefix current validators with nbsp for easier sed-ing 2021-04-19 16:31:23 -07:00
Michael Vines f14cf3ed1a Add --number argument 2021-04-19 16:31:23 -07:00
Michael Vines 1824b5a2ce Print the header as a footer when there's a large number of validators to show 2021-04-19 16:31:23 -07:00
Michael Vines 818c3198c1 Add line numbers to `solana validators` output 2021-04-19 16:31:23 -07:00
Michael Vines b66faf7e80 Add --sort argument to `solana validators` 2021-04-19 16:31:23 -07:00
Tyera Eulberg 185bbf2db5
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
2021-04-19 20:57:43 +00:00
Jack May 2409bb18f3
Remove unwrap from bpf_loader serialization (#16645) 2021-04-19 13:30:31 -07:00
Michael Vines 1b63bdaf44 `solana validators`: Restore the meaning of "credits" in the JSON output 2021-04-19 13:01:40 -07:00
Christian Drappi 0b84440e0f
cargo-install-all.sh: on Mac OS X, use greadlink instead of readlink (#16642)
* on Mac OS X, use greadlink when building from source

* this is a cleaner way to do it

* we want to keep the cargo install comment at the top of the script
2021-04-19 19:05:46 +00:00
Michael Vines f5f06904c3 `solana validators` now shows current epoch credits instead of lifetime credits 2021-04-19 10:19:30 -07:00
Jeff Washington (jwash) 4aa753ff01
rename threads: 15 char limit (#16625) 2021-04-19 12:16:58 -05:00
Alexander Meißner 9dfcb921cf
Refactoring: Move KeyedAccounts to InvokeContext (#15410)
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
Jeff Washington (jwash) 015bc034a5
improve failing assert (#16581) 2021-04-19 08:55:01 -05:00
dependabot[bot] 1e638c1371
chore:(deps): bump @solana/spl-token-registry in /explorer (#16631)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.56 to 0.2.57.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.56...v0.2.57)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 10:25:25 +00:00
dependabot[bot] 376d0bf063
chore:(deps): bump @testing-library/user-event in /explorer (#16630)
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.1.3 to 13.1.4.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v13.1.3...v13.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 10:25:19 +00:00
Michael Vines b06e93fe5b Increase test timeout 2021-04-18 20:55:02 -07:00
Michael Vines a911ae00ba clippy 2021-04-18 20:55:02 -07:00
Michael Vines 3b79b21e9d Upgrade to Rust 1.51.0 2021-04-18 20:55:02 -07:00
behzad nouri cfe7a4340b adds a shrink policy to the recycler without an allocation limit
https://github.com/solana-labs/solana/pull/15320
added an allocation limit to the recycler, which has been the source of a
number of bugs. For example the code bellow panics by simply cloning packets:

    const RECYCLER_LIMIT: usize = 8;
    let recycler = PacketsRecycler::new_with_limit("", RECYCLER_LIMIT as u32);
    let packets = Packets::new_with_recycler(recycler.clone(), 1).unwrap();
    for _ in 0..RECYCLER_LIMIT {
        let _ = packets.clone();
    }
    Packets::new_with_recycler(recycler.clone(), 1);

The implementation also fails to account for instances where objects are
consumed. Having the allocation limit in the recycler also seems out of place,
as higher level code has better context to impose allocation limits (e.g. by
using bounded channels to rate-limit), whereas the recycler would be simpler
and more efficient if it just do the recycling.

This commit:
* Reverts https://github.com/solana-labs/solana/pull/15320
* Adds a shrink policy to the recycler without an allocation limit.
2021-04-18 19:29:24 +00:00
behzad nouri e405747409 Revert "Add limit and shrink policy for recycler (#15320)"
This reverts commit c2e8814dce.
2021-04-18 19:29:24 +00:00
Michael Vines 6907a2366e Remove unnecessary clone 2021-04-17 10:23:13 -07:00
Guillaume Claret 5399faaf53 Documentation typo for langauge 2021-04-17 07:53:21 -07:00
dependabot[bot] 7e01adc050
chore: bump eslint-plugin-prettier from 3.3.0 to 3.4.0 in /web3.js (#16619)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 14:46:35 +00:00
dependabot[bot] 4eac6cf366
chore: bump @typescript-eslint/parser from 4.21.0 to 4.22.0 in /web3.js (#16618)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.21.0 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 14:32:04 +00:00
dependabot[bot] 7426861817
chore: bump mockttp from 1.2.0 to 1.2.2 in /web3.js (#16617)
Bumps [mockttp](https://github.com/httptoolkit/mockttp) from 1.2.0 to 1.2.2.
- [Release notes](https://github.com/httptoolkit/mockttp/releases)
- [Commits](https://github.com/httptoolkit/mockttp/compare/v1.2.0...v1.2.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 14:18:35 +00:00
dependabot[bot] aa64f13172
chore: bump @types/sinon from 9.0.11 to 10.0.0 in /web3.js (#16615)
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 9.0.11 to 10.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 14:05:15 +00:00
dependabot[bot] a6b197adfe
chore: bump eslint-config-prettier from 8.0.0 to 8.2.0 in /web3.js (#16613)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.0.0 to 8.2.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.0.0...v8.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 13:44:35 +00:00
dependabot[bot] 87715b59a1
chore: bump @types/secp256k1 from 4.0.1 to 4.0.2 in /web3.js (#16612)
Bumps [@types/secp256k1](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/secp256k1) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/secp256k1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 13:38:29 +00:00
dependabot[bot] 48d836b8e2
chore: bump @typescript-eslint/eslint-plugin in /web3.js (#16531)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.21.0 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 21:25:17 +08:00
dependabot[bot] cd5398a889
chore: bump rollup from 2.44.0 to 2.45.2 in /web3.js (#16532)
Bumps [rollup](https://github.com/rollup/rollup) from 2.44.0 to 2.45.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.44.0...v2.45.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 21:25:09 +08:00
dependabot[bot] c94a5a170b
chore: bump eslint from 7.23.0 to 7.24.0 in /web3.js (#16533)
Bumps [eslint](https://github.com/eslint/eslint) from 7.23.0 to 7.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.23.0...v7.24.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 21:25:01 +08:00
Tyera Eulberg 52f4b96a80
Move derivation path into sdk (#16603)
* Move DerivationPath to sdk

* Remove eprintln
2021-04-16 22:03:24 +00:00
Trent Nelson 6444f0e57b clap-utils: Add explicit schemes for `ask` and `file` `SignerSource`s 2021-04-16 13:56:12 -06:00
Trent Nelson 5d1ef5d01d clap-utils: Use `uriparse` crate to parse `SignerSource` 2021-04-16 13:56:12 -06:00
Trent Nelson c5ab3ba6f1 clap-utils: Reduce SignerSource's visibility 2021-04-16 13:56:12 -06:00