Commit Graph

13748 Commits

Author SHA1 Message Date
443f132de5 Add cluster state verifier logging (#16330) (#16336)
* Add cluster state verifier logging

* Add duplicate-slots iterator to ledger tool

(cherry picked from commit 4e5ef6bce2)

Co-authored-by: carllin <carl@solana.com>
2021-04-06 01:25:12 +00:00
95299e43a2 validator: Use a const for wait for supermajority threshold (#16392)
(cherry picked from commit 7a2a39093d)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-04-06 00:53:05 +00:00
0cf1894ede issue #10831: added --with-memo option to all cli commands that submit (bp #16291) (#16387)
* issue #10831: added --with-memo option to all cli commands that submit (#16291)

* issue #10831: added --with-memo option to all cli commands that submit
transactions.  Also, improve the block command to show UTF-8 string instead
of integer values for memo program data.

* Fixed tests and changed some syntax according to feedback.

* Use spl_memo id (all versions where applicable) instead of hardcoding id.

* Update Cargo.toml in programs/bpf.

* Update formatting via cargo fmt.

* Update to use spl_memo version 3.0.1, which simplifies package imports

(cherry picked from commit 364af3a3e0)

# Conflicts:
#	cli-output/Cargo.toml
#	cli/Cargo.toml

* Fix conflicts

Co-authored-by: bji <bryan@ischo.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-04-05 23:14:16 +00:00
f2f4f28c0b merkle-tree: fix build when targeting bpf (bp #16335) (#16342)
* 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 21:57:26 +00:00
57da68d563 Update Cargo.toml 2021-04-05 14:02:34 -07:00
8d2337ccf8 Update Cargo.toml 2021-04-05 14:02:34 -07:00
270749185c Adjust tokio version to just "1"
(cherry picked from commit 43feef7362)

# Conflicts:
#	faucet/Cargo.toml
#	net-utils/Cargo.toml
2021-04-05 14:02:34 -07:00
6184254416 Reduce test-validator ledger size
(cherry picked from commit b242f82696)
2021-04-05 09:24:49 -07:00
c8bb13b3f7 Fixup AncestorIterator method (bp #16357) (#16359)
* Fixup iterator method (#16357)

(cherry picked from commit 1a13d22984)

* Only get Blockstore::last_root once (#16362)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-04-05 05:27:58 +00:00
5da83c1491 Bump version to v1.6.5 (#16361) 2021-04-04 22:00:40 -06:00
b04ce80255 Add channel version check
(cherry picked from commit 527adbed34)
v1.6.4
2021-04-04 13:53:50 -07:00
a788021181 Bump version to v1.6.4 (#16345) 2021-04-04 13:31:35 -07:00
553e9fb8cd Set ticks_per_slot higher for banking stage tests (#16094) (#16356)
Tests are timing out because the bank hit the MaxTickHeight and
will not process the transactions.

(cherry picked from commit 96ccc40f0a)

Co-authored-by: sakridge <sakridge@gmail.com>
2021-04-04 20:29:53 +00:00
f1bc7ec4fa wait-for-restart-window works again for unstaked nodes
(cherry picked from commit a679aebc82)
2021-04-04 12:59:13 -07:00
581181e87f Fix test_replay_commitment_cache (#16131) (#16355)
(cherry picked from commit 9b94741290)

Co-authored-by: sakridge <sakridge@gmail.com>
2021-04-04 19:41:45 +00:00
36e1f9fae8 Bump bpf-tools to version v1.5 (#16331) (#16350)
The new version of bpf-tools eliminates the separate
rust-bpf-sysroot. The Rust standard libraries for the BPF target are
built in tree when the compiler is built.  The standard libraries code
is slightly more optimized and some reduction of compute budget can be
expected with this version of bpf-tools.

(cherry picked from commit 1359bceb5d)

Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
2021-04-04 16:58:52 +00:00
f10ae394c8 Remove unprocessed transactions from log notifications (#16349)
(cherry picked from commit 0596cf5405)
2021-04-04 09:38:23 -07:00
f7905d369a Throttle PoH ticks by cumulative slot time (#16139) (#16315)
* Throttle PoH ticks by cumulative slot time

    * respond to pr feedback

    * saturating sub

    * updated comment

    (cherry picked from commit 4f4cffbd03)

    # Conflicts:
    #       core/src/poh_recorder.rs

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2021-04-03 23:40:46 +00:00
ef079d202b Wait for 90 percent of stake before starting (#16340) (#16344)
(cherry picked from commit 3429785d9b)

Co-authored-by: sakridge <sakridge@gmail.com>
2021-04-03 22:50:58 +00:00
b7efc2373c wait-for-restart-window now indicates how far away the next restart window is
(cherry picked from commit c8c89dd5f7)
2021-04-02 23:23:16 -07:00
d3b50bc55b Remove UNSTABLE warning from logsSubscribe 2021-04-02 12:54:20 -07:00
8fd3465f8a Cleanup use (bp #16327) (#16328)
* Cleanup use (#16327)

(cherry picked from commit dee655df35)

# Conflicts:
#	Cargo.lock
#	program-test/Cargo.toml

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
2021-04-02 19:54:00 +00:00
23b9e6eae3 add metric for ticks from poh_recorder.record (#16047) (#16312)
(cherry picked from commit 2fc609a294)

    # Conflicts:
    #       core/src/poh_recorder.rs

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2021-04-02 18:50:50 +00:00
fe1a977f9e Parse SPL associated-token-account instructions (bp #16318) (#16321)
* Parse SPL associated-token-account instructions (#16318)

(cherry picked from commit a902505810)

# Conflicts:
#	transaction-status/Cargo.toml

* Fix conflict

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-04-02 02:38:28 +00:00
5e538eff7c metrics for poh_recorder.record (#15998) (#16317)
(cherry picked from commit ddc758439e)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-04-02 02:35:09 +00:00
3efe4b5478 increase timeout in TransactionRecorder.record (#16133) (#16314)
(cherry picked from commit 06ac0fe9a3)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-04-02 00:58:52 +00:00
90e0d4fefe poh record metrics (#16092) (#16313)
(cherry picked from commit f68860a643)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-04-01 21:27:16 +00:00
2e983fb39f pushes addresses instead of insert v1.6.3 2021-04-01 11:14:05 -06:00
527b20fbbd nit: fix variable names (#16283) (#16295)
(cherry picked from commit aa45e81b3e)

Co-authored-by: Jack May <jack@solana.com>
2021-04-01 09:24:52 +00:00
a0c4b4e5fc Rpc: enable getConfirmedSignaturesForAddress2 to return confirmed (not yet finalized) data (#16281) (#16293)
* Update blockstore method to allow return of unfinalized signature

* Support confirmed sigs in getConfirmedSignaturesForAddress2

* Add deprecated comments

* Update docs

* Enable confirmed transaction-history in cli

* Return real confirmation_status; fill in not-yet-finalized block time if possible

(cherry picked from commit da27acabcc)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-04-01 06:30:36 +00:00
282315a721 Rpc: fix getConfirmedTransaction slot (#16288) (#16290)
* Fix transaction blockstore apis

* Update blockstore apis in rpc

(cherry picked from commit 18bd47dbe1)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-04-01 04:58:53 +00:00
b8198f8cc5 removes OrderedIterator and transaction batch iteration order (#16153) (#16285)
In TransactionBatch,
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/transaction_batch.rs#L4-L11
lock_results[i] is aligned with transactions[iteration_order[i]]:
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/bank.rs#L2414-L2424
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/accounts.rs#L788-L817

However load_and_execute_transactions is iterating over
  lock_results[iteration_order[i]]
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/bank.rs#L2878-L2889
and then returning i as for the index of the retryable transaction.

If iteratorion_order is [1, 2, 0], and i is 0, then:
  lock_results[iteration_order[i]] = lock_results[1]
which corresponds to
  transactions[iteration_order[1]] = transactions[2]
so neither i = 0, nor iteration_order[i] = 1 gives the correct index for the
corresponding transaction (which is 2).

This commit removes OrderedIterator and transaction batch iteration order
entirely. There is only one place in blockstore processor which the
iteration order is not ordinal:
https://github.com/solana-labs/solana/blob/e50f59844/ledger/src/blockstore_processor.rs#L269-L271
It seems like, instead of using an iteration order, that can shuffle entry
transactions in-place.

(cherry picked from commit 3f63ed9a72)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-04-01 01:28:01 +00:00
68ad2dcce1 Use more performant copy (#16282) (#16284)
(cherry picked from commit ad7f8e7f23)

Co-authored-by: Jack May <jack@solana.com>
2021-04-01 01:08:01 +00:00
e87c3421bc Update overview.md (#16280)
fix link which was broken/wrong

(cherry picked from commit c723251575)

Co-authored-by: Huge <mr.huge@seznam.cz>
2021-03-31 22:05:24 +00:00
20754a7115 Drop write lock on sysvars (#15497) (#16233)
* Drop write lock on sysvars

* adds env var for demoting sysvar write lock demotion

* moves demote logic to is_writable

* feature gates sysvar write lock demotion

* adds builtins to write lock demotion

* adds system program id to builtins

* adds Feature111...

* adds an abi-freeze test

* mvines set of builtin program keys

Co-authored-by: Michael Vines <mvines@gmail.com>

* update tests

* adds bpf loader keys

* Add test sysvar

* Plumb demote_sysvar to is_writable

* more plumbing of demote_sysvar_write_locks to is_writable

* patches test_program_bpf_instruction_introspection

* hard codes demote_sysvar_write_locks to false for serialization/encoding methods

* Revert "hard codes demote_sysvar_write_locks to false for serialization/encoding methods"

This reverts commit ae3e2d2e777437bddd753933097a210dcbc1b1fc.

* change the hardcoded ones to demote_sysvar_write_locks=true

* Use data_as_mut_slice

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 54c68ea83f)

Co-authored-by: sakridge <sakridge@gmail.com>
2021-03-31 20:23:20 +00:00
8a57ee181e Cleanup nits (bp #16211) (#16237)
* Cleanup nits (#16211)

(cherry picked from commit f84e88f0a2)

# Conflicts:
#	programs/bpf/Cargo.lock
#	programs/bpf/rust/sysvar/Cargo.toml

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
2021-03-31 10:01:18 +00:00
4e6b5a9808 Fix BPF ELF layout (#16256) (#16261)
* Fix BPF ELF layout

* whitespace

(cherry picked from commit bcd89dd34c)

Co-authored-by: Jack May <jack@solana.com>
2021-03-31 09:56:57 +00:00
f24fbde43b Helpful const and Arg doc (#16248) (#16252)
(cherry picked from commit 67b747938f)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-31 06:32:18 +00:00
47f60c7607 Validator monitor now displays the max retransmit slot
(cherry picked from commit aac18d7564)
2021-03-30 21:57:23 -07:00
8b307ed409 security policy: Add out-of-scope section (bp #16249) (#16251)
* security policy: Add out-of-scope section

(cherry picked from commit e9e46ff521)

* Update SECURITY.md

Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 700ebde474)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-31 04:49:17 +00:00
cf21719a07 Add get_max_retransmit_slot/get_max_shred_insert_slot to RpcClient (#16243)
(cherry picked from commit 2a1639836a)

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-31 01:09:11 +00:00
3157b464c4 Align ProcessInstruction error handling (#16232) (#16238)
(cherry picked from commit ce7f7c2b6c)

Co-authored-by: Jack May <jack@solana.com>
2021-03-30 21:55:08 +00:00
2581db5748 docs: Reduce airdrop examples to 1 SOL (#16241)
(cherry picked from commit 2bcfbad653)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-30 21:52:42 +00:00
634959b3ab Bump version to v1.6.3 2021-03-30 16:17:47 +00:00
03b21f2e9d Bump version to v1.6.2 v1.6.2 2021-03-30 00:06:01 -06:00
cc5565b17e Setup ReplayStage confirmation scaffolding for duplicate slots (#9698)
(cherry picked from commit 52703badfa)
2021-03-29 22:07:14 -06:00
50beef0b15 Allow incomplete features in frozen-abi (#16205)
(cherry picked from commit 9ba9d2a8ae)

Co-authored-by: Trent Nelson <trent@solana.com>
2021-03-30 03:46:10 +00:00
06a54e1423 remove old code (#15988) (#15993)
(cherry picked from commit 9760fded2d)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-03-30 00:50:27 +00:00
4d731ecd08 eliminate lock on record (#15929) (#16073)
* eliminate lock on record

* use same error as MaxHeightReached

* clippy

* review feedback

* refactor should_tick code

* pr feedback

(cherry picked from commit 57ba86c821)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
2021-03-30 00:46:13 +00:00
ee06789a66 sdk: Add try_from_slice_unchecked for Borsh (#16098) (#16158)
* sdk: Add try_from_slice_unchecked for Borsh

* Add tests

* Rename + clarify comment

* Rename back to unchecked

(cherry picked from commit cffa851e0f)

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-03-29 23:15:34 +00:00