14201 Commits

Author SHA1 Message Date
Trent Nelson
056c1a7b50 Update docs/src/developing/test-validator.md
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-13 17:28:31 +00:00
Trent Nelson
768a2ebe9d docs: Add docs for solana-test-validator 2021-05-13 17:28:31 +00:00
behzad nouri
0e646d10bb
prunes received-cache only once per unique owner's key (#17039) 2021-05-13 13:50:16 +00:00
behzad nouri
0aa7824884
retains one node-instance per pubkey (#17187)
crds table retains up to 32 node-instance values per each pubkey. This
is so because if there are multiple running instances of the same node,
then we want gossip to propagate node-instance values associated with
both instances, therefore the corresponding label/key includes the
randomly generated token in addition to the pubkey:
https://github.com/solana-labs/solana/blob/9c42a89a4/core/src/crds_value.rs#L448
https://github.com/solana-labs/solana/pull/14037

As a result, the number of such values per pubkey are effectively
unbounded, requiring custom mitigations implemented in:
https://github.com/solana-labs/solana/pull/14467
but still taking redundant extra memory and bandwidth.

This commit instead retains only one node-instance per pubkey by
extending crds values override logic. If a crds value is of type
node-instance, it will always override an existing one with the same key
if it has more recent starting timestamp (not wallclock). As a result,
gossip will always propagate the node-instance with more recent
timestamp. Since the check_duplicate logic will stop the node with older
timestamp, this change should preserve existing functionality.
2021-05-13 13:35:46 +00:00
dependabot[bot]
8b9c9aa790
chore: bump @babel/plugin-transform-runtime in /web3.js (#17206)
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.13.15 to 7.14.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-plugin-transform-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 10:09:25 +00:00
dependabot[bot]
e8090f45f2
chore: bump @babel/core from 7.14.0 to 7.14.2 in /web3.js (#17205)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.0 to 7.14.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 09:55:46 +00:00
dependabot[bot]
8e9c730f40
chore: bump @types/node from 15.0.2 to 15.0.3 in /web3.js (#17203)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.0.2 to 15.0.3.
- [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-05-13 09:37:28 +00:00
dependabot[bot]
0a4cdc8a85
chore: bump semantic-release from 17.4.2 to 17.4.3 in /web3.js (#17202)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 17.4.2 to 17.4.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v17.4.2...v17.4.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 09:27:36 +00:00
dependabot[bot]
6bc27e8864
chore: bump @commitlint/config-conventional in /web3.js (#17201)
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 12.1.3 to 12.1.4.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.1.3...v12.1.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 08:27:01 +00:00
dependabot[bot]
d9f96f71d4
chore: bump @commitlint/travis-cli from 12.1.3 to 12.1.4 in /web3.js (#17200)
Bumps [@commitlint/travis-cli](https://github.com/conventional-changelog/commitlint) from 12.1.3 to 12.1.4.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.1.3...v12.1.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 08:19:12 +00:00
Trent Nelson
248f2309ef docs: fix fixed banner layout 2021-05-13 04:27:17 +00:00
Trent Nelson
a821c4d57f docs: lock update missed in 545e037e38 2021-05-13 04:27:17 +00:00
carllin
239ab8799c
Remove bloat from secondary indexes (#17048) 2021-05-12 15:29:30 -07:00
joeaba
597373f5fa
Update devnet and testnet endpoints (#17188) 2021-05-12 19:39:15 +00:00
Tyera Eulberg
b437b0a49d
Add bip32 support to solana-keygen recover (#17180)
* Fix spelling

* Add validator for  SignerSources

* Add helper to generate Keypair from supporting SignerSources

* Add bip32 support to solana-keygen recover

* Make SignerSourceKind const strs, use for Debug impl and URI schemes
2021-05-12 19:33:11 +00:00
Lijun Wang
9c42a89a43
Issue #17008 -- make snapshot archives to hold on to configurable. (#17158)
* purge_old_snapshot_archives is changed to take an extra argument 'maximum_snapshots_to_retain' to control the max number of latest snapshot archives to retain. Note the oldest snapshot is always retained as before and is not subjected to this new options.
* The validator and ledger-tool executables are modified with a CLI argument --maximum-snapshots-to-retain. And the options are propagated down the call chains. Their corresponding shell scripts were changed accordingly.
* SnapshotConfig is modified to have an extra field for the maximum_snapshots_to_retain
* Unit tests are developed to cover purge_old_snapshot_archives
2021-05-12 10:32:27 -07:00
dependabot[bot]
e3d722bb42
chore: bump @commitlint/travis-cli from 12.1.1 to 12.1.3 in /web3.js (#17184)
Bumps [@commitlint/travis-cli](https://github.com/conventional-changelog/commitlint) from 12.1.1 to 12.1.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.1.1...v12.1.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 08:18:18 +00:00
dependabot[bot]
64a200b1c1
chore: bump @commitlint/config-conventional in /web3.js (#17183)
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 12.1.1 to 12.1.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.1.1...v12.1.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 08:12:16 +00:00
Jeff Washington (jwash)
7d96f78821
include/exclude keys on account secondary index (#17110)
* AccountSecondaryIndexes.include/exclude

* use normal scan if key is not indexed

* add a test to ask for a scan for an excluded secondary index

* fix up cli args
2021-05-11 22:06:22 +00:00
Dmitri Makarov
4ed828e4ee Enable RBPF trace output for BPF tests that are not using bpf_loader 2021-05-11 23:50:42 +02:00
Dmitri Makarov
88626b2945
Bump bpf-tools version to 1.7 (#17176) 2021-05-11 19:51:20 +00:00
Trent Nelson
dbac38702a sdk: keypair - drop superfluous iter() 2021-05-11 13:07:58 -06:00
Trent Nelson
967840aed6 sdk: Move signers module into signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
b71e4bdc61 sdk: Move NullSigner to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
12bf6c06c3 sdk: Move Presigner to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
0eba6eb401 sdk: Move Keypair to signer module 2021-05-11 13:07:58 -06:00
Trent Nelson
af6f3d776e sdk: Move Signer trait to own module 2021-05-11 13:07:58 -06:00
dependabot[bot]
d4ffd909a4
chore: bump @typescript-eslint/parser from 4.22.0 to 4.23.0 in /web3.js (#17167)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.22.0 to 4.23.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.23.0/packages/parser)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 09:25:03 +00:00
Dmitri Makarov
77272a17b3
Fix dump postprocessing in cargo-build-bpf (#17165) 2021-05-11 09:24:12 +00:00
dependabot[bot]
e21ad02288
chore: bump @typescript-eslint/eslint-plugin in /web3.js (#17166)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.22.1 to 4.23.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.23.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-05-11 09:07:33 +00:00
chaseeb
4625231e30
Update web-wallet.md to add phantom with fixed link (#17161)
* Update web-wallet.md to add phantom with fixed link

Update web-wallet.md to add phantom with fixed link

* Update web-wallets.md for phantom

removing trailing whitespaces

* Update docs/src/wallet-guide/web-wallets.md

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-11 04:23:13 +00:00
Tyera Eulberg
a5ec3a0547
SignerSource: rename input scheme to prompt, default to bip44 solana base key (#17154)
* Rename ask to prompt

* Default to Solana bip44 base if no derivation-path

* Add SignerSource legacy field, support legacy ASK

* Update docs

* Fix docs: validator current doesn't support uri SignerSources
2021-05-10 19:28:47 -06:00
Jack May
8eb05d6ed4
Add Keccak256 syscall and sdk support (#16498) 2021-05-10 16:16:58 -07:00
Christian Machacek
e511c442e6
fix: improve findProgramAddress error when MAX_SEED_LENGTH is exceeded (#17151) 2021-05-10 15:55:51 -07:00
Jack May
82fb6712e7
fix c program deploy help (#17152) 2021-05-10 15:38:01 -07:00
Jon Cinque
4b60b2863e
sdk: Add get_instance_packed_len for variable-size types (#17092)
* sdk: Add get_instance_packed_len for variable-size types

* Add comment for get_packed_len

* Add more tests
2021-05-10 23:31:02 +02:00
Tyera Eulberg
6e9deaf1bd
Move block-time caching earlier (#17109)
* Require that blockstore block-time only be recognized slot, instead of root

* Move cache_block_time to after Bank freeze

* Single use statement

* Pass transaction_status_sender by reference

* Remove unnecessary slot-existence check before caching block time altogether

* Move block-time existence check into Blockstore::cache_block_time, Blockstore no longer needed in blockstore_processor helper
2021-05-10 13:14:56 -06:00
Jeff Washington (jwash)
f39dda00e0
type AccountSecondaryIndexes = HashSet (#17108) 2021-05-10 14:22:48 +00:00
Jeff Washington (jwash)
a6a1355b80
fix secondary index test (#17111) 2021-05-10 08:54:30 -05:00
Ryo Onodera
c616c34825
Add comment for another unspoken eager collection subtlety (#17137) 2021-05-10 22:44:46 +09:00
behzad nouri
81ad795d46 removes position field in coding-shred-header
CodingShredHeader.position is equal to
  ShredCommonHeader.index - ShredCommonHeader.fec_set_index
and is so redundant. The extra position field can add bugs if not
consistent with index and fec_set_index.
2021-05-10 13:20:56 +00:00
dependabot[bot]
ad92414be3
chore: bump @solana/spl-token from 0.1.3 to 0.1.4 in /web3.js (#17142)
Bumps [@solana/spl-token](https://github.com/solana-labs/solana-program-library) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/solana-labs/solana-program-library/releases)
- [Commits](https://github.com/solana-labs/solana-program-library/compare/@solana/spl-token@v0.1.3...@solana/spl-token@v0.1.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 12:27:18 +00:00
dependabot[bot]
a74cbb2f93
chore: bump @rollup/plugin-commonjs from 18.1.0 to 19.0.0 in /web3.js (#17141)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 18.1.0 to 19.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v19.0.0/packages/commonjs)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 12:22:05 +00:00
dependabot[bot]
442ce816ac
chore: bump @types/chai-as-promised from 7.1.3 to 7.1.4 in /web3.js (#17140)
Bumps [@types/chai-as-promised](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai-as-promised) from 7.1.3 to 7.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai-as-promised)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 11:39:51 +00:00
dependabot[bot]
6ee90759c8
chore: bump @types/chai from 4.2.17 to 4.2.18 in /web3.js (#17139)
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.17 to 4.2.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 11:31:48 +00:00
dependabot[bot]
9983d6af77
chore: bump eslint from 7.25.0 to 7.26.0 in /web3.js (#17138)
Bumps [eslint](https://github.com/eslint/eslint) from 7.25.0 to 7.26.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.25.0...v7.26.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 11:27:04 +00:00
behzad nouri
22c02b917e reads gossip push messages off crds ordinal index
Having an ordinal index on crds values based on insert order allows to
efficiently filter values using a cursor. In particular
CrdsGossipPush::push_messages hash-map can be replaced with a cursor,
saving on the bookkeepings, purging, etc
2021-05-09 22:40:41 +00:00
behzad nouri
dfa3e7a61c indexes crds values by their insert order 2021-05-09 22:40:41 +00:00
Christian Machacek
ff95e2aaa6 Add a make target to run the readelf utility on a compiled program
The readelf utility (already shipped with the solana tools) shows meta-information about ELF files, such as symbol tables. It is useful for investigating "unresolved symbol" errors that crop up at runtime.

This commit also fixes the objdump flags (two dashes are required and there is no "color" option) as well as a few typos.
2021-05-08 18:49:14 -07:00
Justin Starry
a1df57a4ea
Add chinese translations to docs (#17125)
* import zh translations

* Fix broken links

* fix whitespace
2021-05-09 00:46:24 +08:00