Commit Graph

13689 Commits

Author SHA1 Message Date
11f6c04990 get_program_accounts_with_config() now correctly defaults to RpcClient's commitment level (backport #17312) (#17315)
* get_program_accounts_with_config() now correctly defaults to RpcClient's commitment level

(cherry picked from commit 63b97729e6)

# Conflicts:
#	client/src/rpc_client.rs

* Update rpc_client.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-18 21:19:19 +00:00
18c4d13ab2 fix test (#17310) (#17314)
(cherry picked from commit cfcae50022)

# Conflicts:
#	programs/bpf/c/src/ser/ser.c

Co-authored-by: Jack May <jack@solana.com>
2021-05-18 20:05:00 +00:00
d2e907655f Add Contextual Search (#17299) (#17300)
* this should prevent other language results appearing in the search area

(cherry picked from commit c65c4475f6)

Co-authored-by: Ryan M. Shea <8948187+rmshea@users.noreply.github.com>
2021-05-18 06:32:51 +00:00
e182afa50f Minor test cleanup and comments (backport #17283) (#17295)
* Minor test cleanup and comments (#17283)

(cherry picked from commit bcbe155575)

# Conflicts:
#	runtime/src/rent_collector.rs

* Fix conflicts

* More clean cherry-pick...

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-05-18 03:50:28 +00:00
00d1cb0333 Clear release cache for stable-perf (#17287) (#17296)
(cherry picked from commit 7ea1131090)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-17 23:38:24 +00:00
bab82ab632 Update keypair configuration output (backport #17277) (#17285)
* Update keypair configuration output

While going through the tutorial to start a validator I noticed that the output I received from running...

```
solana config set --keypair ~/validator-keypair.json
```

...different from the output I was seeing. Wondering whether the docs are out of date I thought I'd propose an update to the docs just in case.

(cherry picked from commit 02157f4753)

* Update docs/src/running-validator/validator-start.md

(cherry picked from commit de76adbdf3)

Co-authored-by: Chris Bellew <cjbellew@gmail.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2021-05-17 17:38:31 +00:00
b9ba312975 Add two more testnet entrypoints (#17282)
(cherry picked from commit 1f322b8a9c)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-17 16:32:36 +00:00
c5ff373965 fixed getProgramAccounts fields list (#17278) (#17279)
(cherry picked from commit 611628a402)

Co-authored-by: Marcin Zawiejski <dragmz@gmail.com>
2021-05-17 14:46:59 +00:00
51a2d93a0d Remove duplicate std::net reference (#17254) (#17266)
(cherry picked from commit d6ab4196ea)

Co-authored-by: Sebastian Ibarguen <sebasibarguen@users.noreply.github.com>
2021-05-17 01:15:22 +00:00
409ac4dcfa Bump version to v1.6.10 (#17250) 2021-05-15 01:47:56 +00:00
9e42883d4b Fix a bug in input deserialization in the C SDK (#17217) (#17249)
When the input contains more accounts than the user has requested to be deserialized, and one of the excess ones is a dup, the input pointer is not adjusted correctly.

Compare the lines added by this commit to line 401: "input += 7; // padding". Since the input data layout does not depend on the number of accounts the user wants to deserialize, this adjustment by 7 bytes must happen in both branches.

(cherry picked from commit e02b4e1192)

Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
v1.6.9
2021-05-15 00:10:02 +00:00
e41460d500 feat: update api urls (backport #17186) (#17248)
* feat: update api urls

(cherry picked from commit 0f3045fb68)

* fix: cluster test

(cherry picked from commit ae5a10dffd)

* docs: update old devnet and testnet url references

(cherry picked from commit ec621e71dc)

* fix: update devnet and testnet urls

(cherry picked from commit 7be3171f4a)

Co-authored-by: Josh Hundley <josh.hundley@gmail.com>
2021-05-15 00:08:24 +00:00
9aacd0f3c3 Zero pad data shreds on fetch from blockstore (#17147)
* Zero pad data shreds on fetch from blockstore

This is a partial backport of #16602 to allow compatibility with that change.

* Remove size check and resize shreds to consistent length
2021-05-14 16:18:00 -05:00
3f908306a3 test-validator: Hint at airdrop when wallet is unavailable (#17235)
(cherry picked from commit 2c8dde7224)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-14 18:32:48 +00:00
8093586b78 docs: remove missig link (#17212) (#17230)
(cherry picked from commit 5e642a174c)

Co-authored-by: Laptev Stanislav <42931743+dubalda@users.noreply.github.com>
2021-05-14 15:51:22 +00:00
a08a6d55fa test-validator: Display genesis hash in dashboard (backport #17216) (#17225)
* rpc: plumb shred_version through RpcContactInfo

(cherry picked from commit 67e6a3106f)

* test-validator: Display more cluster info in dash

(cherry picked from commit 754c708473)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-14 09:56:27 +00:00
802c5fcb00 Update clusters.md (#17220) (#17221)
(cherry picked from commit 26afc7620b)

Co-authored-by: joeaba <77398477+joeaba@users.noreply.github.com>
2021-05-14 04:39:04 +00:00
8749a97b94 Remove bloat from secondary indexes (#17048) (#17219)
(cherry picked from commit 239ab8799c)

Co-authored-by: carllin <carl@solana.com>
2021-05-14 04:04:55 +00:00
4313240b1b Return error for excluded secondary-index keys (backport #17193) (#17215)
* Return error for excluded secondary-index keys (#17193)

* Add runtime helpers to check secondary indexes for key

* Add custom rpc error

* Check secondary-index key inclusion in rpc

* Clone complete AccountSecondaryIndexes into rpc to avoid bank query

(cherry picked from commit 27004f1b76)

# Conflicts:
#	core/src/rpc.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-05-13 23:04:01 +00:00
24bae00560 docs: Add docs for solana-test-validator (backport #17199) (#17211)
* docs: Add docs for `solana-test-validator`

(cherry picked from commit 768a2ebe9d)

* Update docs/src/developing/test-validator.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit 056c1a7b50)

* Update docs/src/developing/test-validator.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit 5b13d4057b)

* Update docs/src/developing/test-validator.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit 38d7e9a4c4)

* Update docs/src/developing/test-validator.md

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

* Update docs/src/developing/test-validator.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit 3214105a21)

* Update docs/src/developing/test-validator.md

(cherry picked from commit 7868df3211)

* Update docs/src/developing/test-validator.md

(cherry picked from commit 3e0c0abb53)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-13 18:41:16 +00:00
fae0a6307d docs: add hackathon banner 2021-05-13 05:03:15 +00:00
9753f1a6ca Add bip32 support to solana-keygen recover (#17180) (#17189)
* 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

(cherry picked from commit b437b0a49d)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-12 20:48:53 +00:00
8ad1554bc9 Update devnet and testnet endpoints (#17188) (#17191)
(cherry picked from commit 597373f5fa)

Co-authored-by: joeaba <77398477+joeaba@users.noreply.github.com>
2021-05-12 20:25:05 +00:00
2367f561dc include/exclude keys on account secondary index (backport #17110) (#17179)
* 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

(cherry picked from commit 7d96f78821)

# Conflicts:
#	runtime/src/accounts_db.rs
#	runtime/src/accounts_index.rs

* resolve merge conflicts

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2021-05-12 15:09:46 +00:00
21d41b976b Move Signer types out of the signature module (backport #17099) (#17177)
* sdk: Move `Signer` trait to own module

(cherry picked from commit af6f3d776e)

* sdk: Move `Keypair` to `signer` module

(cherry picked from commit 0eba6eb401)

* sdk: Move `Presigner` to `signer` module

(cherry picked from commit 12bf6c06c3)

* sdk: Move `NullSigner` to `signer` module

(cherry picked from commit b71e4bdc61)

* sdk: Move `signers` module into `signer` module

(cherry picked from commit 967840aed6)

* sdk: keypair - drop superfluous iter()

(cherry picked from commit dbac38702a)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-11 20:44:54 +00:00
3303ead54d Add Keccak256 syscall and sdk support (backport #16498) (#17157)
* Add Keccak256 syscall and sdk support (#16498)

(cherry picked from commit 8eb05d6ed4)

# Conflicts:
#	Cargo.lock
#	programs/bpf/Cargo.lock
#	programs/bpf/rust/sha/Cargo.toml
#	programs/bpf/tests/programs.rs
#	programs/bpf_loader/Cargo.toml
#	sdk/program/Cargo.toml
#	sdk/program/src/lib.rs
#	sdk/src/feature_set.rs

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
2021-05-11 09:31:16 +00:00
f91d7da5a4 sdk: Add get_instance_packed_len for variable-size types (#17092) (#17153)
* sdk: Add get_instance_packed_len for variable-size types

* Add comment for get_packed_len

* Add more tests

(cherry picked from commit 4b60b2863e)

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-05-11 09:16:14 +00:00
b2dad84d05 Update web-wallet.md to add phantom with fixed link (#17161) (#17163)
* 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>
(cherry picked from commit 4625231e30)

Co-authored-by: chaseeb <chaseeb@gmail.com>
2021-05-11 04:46:41 +00:00
a7b2939bc8 SignerSource: rename input scheme to prompt, default to bip44 solana base key (#17154) (#17159)
* 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

(cherry picked from commit a5ec3a0547)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-11 02:43:49 +00:00
ea3b783b63 fix c program deploy help (#17152) (#17156)
(cherry picked from commit 82fb6712e7)

Co-authored-by: Jack May <jack@solana.com>
2021-05-10 23:36:16 +00:00
733ef4b0b8 type AccountSecondaryIndexes = HashSet (backport #17108) (#17149)
* type AccountSecondaryIndexes = HashSet (#17108)

(cherry picked from commit f39dda00e0)

# Conflicts:
#	runtime/benches/accounts.rs
#	runtime/src/accounts.rs
#	runtime/src/accounts_db.rs
#	runtime/src/accounts_index.rs

* resolve merge errors

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2021-05-10 20:55:33 +00:00
0cf83887c6 Move block-time caching earlier (#17109) (#17150)
* 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

(cherry picked from commit 6e9deaf1bd)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-10 20:31:56 +00:00
094271be7d indexes crds values by their insert order (backport #16809) (#17132)
* indexes crds values by their insert order

(cherry picked from commit dfa3e7a61c)

* 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

(cherry picked from commit 22c02b917e)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-05-10 00:00:00 +00:00
efc3c0d65f Add a make target to run the readelf utility on a compiled program (#17131)
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.

(cherry picked from commit ff95e2aaa6)

Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
2021-05-09 02:46:49 +00:00
0300eea0d6 Fix syscalls in the C SDK failing at runtime when compiled as C++ (#17124) (#17126)
Some syscalls are wrongly declared "static" in solana_sdk.h, which makes clang++ assume they are local to the compilation unit. It therefore ignores the extern "C" {} block and mangles their names. While that doesn't break C++ compilation, the syscall fails at runtime with something along the lines of "ELF error: Unresolved symbol (_ZL26sol_create_program_addressPK13SolSignerSeediPK9SolPubkeyS4_)".

(cherry picked from commit 6927d0c77e)

Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
2021-05-08 17:27:56 +00:00
b03186e3c6 Add chinese translations to docs (#17125) (#17127)
* import zh translations

* Fix broken links

* fix whitespace

(cherry picked from commit a1df57a4ea)

Co-authored-by: Justin Starry <justin@solana.com>
2021-05-08 17:09:51 +00:00
65e1b881f9 Bump version to v1.6.9 2021-05-08 06:28:08 +00:00
28b9e5b572 getBlockProduction now correctly reports block production (#17116)
(cherry picked from commit d6c076f1b6)

Co-authored-by: Michael Vines <mvines@gmail.com>
v1.6.8
2021-05-08 04:19:39 +00:00
072e884c24 solana-validator exit now uses process::exit() to ensure prompt termination (#17107)
(cherry picked from commit ec2b06d81d)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-07 18:49:36 +00:00
dc95663de7 Add ledger-tool for restoring roots to the Roots CF (#17045) (#17091)
* Add ledger-tool for restoring roots to the Roots CF

* Print successful repair data, and repair in chunks

* Add parameter to limit num slots checked for root repair

(cherry picked from commit ddfbae260f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-05-06 21:28:28 +00:00
a73303be22 Fixing a broken link in the docs (#16975) (#17085)
(cherry picked from commit 40c31f87e0)

Co-authored-by: Jordan Sexton <jordan@jordansexton.com>
2021-05-06 16:05:37 +00:00
330f42c375 implements cursor for gossip crds table queries (#16952) (#17084)
VersionedCrdsValue.insert_timestamp is used for fetching crds values
inserted since last query:
https://github.com/solana-labs/solana/blob/ec37a843a/core/src/cluster_info.rs#L1197-L1215
https://github.com/solana-labs/solana/blob/ec37a843a/core/src/cluster_info.rs#L1274-L1298

So it is crucial that insert_timestamp does not go backward in time when
new values are inserted into the table. However std::time::SystemTime is
not monotonic, or due to workload, lock contention, thread scheduling,
etc, ... new values may be inserted with a stalled timestamp way in the
past. Additionally, reading system time for the above purpose is
inefficient/unnecessary.

This commit adds an ordinal index to crds values indicating their insert
order. Additionally, it implements a new Cursor type for fetching values
inserted since last query.

(cherry picked from commit fa86a335b0)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-05-06 15:23:01 +00:00
5d088c7d06 Dump rent_collector/inflation with ledger-tool cap (#17069) (#17081)
(cherry picked from commit d19526e6c2)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-05-06 11:48:21 +00:00
5c9495f955 CLI: Print gossip nodes with cli-output crate (#17072)
(cherry picked from commit cb5e000615)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-06 09:07:36 +00:00
fb163187b5 RpcClient now respects the retry-after server response header when getting rate limited
(cherry picked from commit 7d1637d89a)
2021-05-05 19:34:18 -07:00
970bba495f Add --tower argument to specify where tower files are persisted (#17060)
(cherry picked from commit 9ba2c53b85)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-05 20:37:36 +00:00
9761af201b Don't recognize temp snapshots as possible snapshots to open
(cherry picked from commit 3e0fed48e7)
2021-05-05 09:32:54 -07:00
7600be946a SDK: Factor out pubkey on-curve test to a helper (#16935)
(cherry picked from commit cfc1cb1aee)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-05-05 06:19:19 +00:00
524b380a71 Bump version to 1.6.8 2021-05-04 12:46:57 -07:00
ebb5fc1285 chore: conflate use statement
(cherry picked from commit 6d11d5dd9f)
v1.6.7
2021-05-04 10:28:45 -07:00