Commit Graph

18466 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 569b15d863
maybe_update_rent_epoch_on_load (#24055) 2022-04-19 08:29:36 -05:00
Jeff Washington (jwash) dc98510d6d
accounts hash calls maybe_rehash_skipped_rewrite (#24316) 2022-04-19 08:29:09 -05:00
behzad nouri 16222553b8
defines const fn for serialized size of VoteState, Feature and Nonce (#24435)
bincode::serialized_sized requires constructing a temporary object and
it is slow. Silently changing serialized size of these structs can also
be a backward incompatible change.
This commit instead hard-codes serialized size of VoteState, Feature and
Nonce, and defines the functions as const. Added tests verify hard-coded
values.
2022-04-19 13:10:14 +00:00
Jack May 5d1adf1270
Fix signature count (#24471)
* Fix signature count

* protect the signature count futher
2022-04-19 17:59:06 +08:00
kirill lykov 76c80d9573
Add clap-v3-utils (#24096)
* Add clap-utils-v3

* update Cargo.lock

* address PR comment: rename crate

* address PR comment: rename to clap-v3-utils

* update dep version

* fix clippy errors

* update Cargo.lock
2022-04-19 11:48:34 +02:00
Alexander Meißner 998cdd1c29
Remove `KeyedAccount` in builtin program "BPF loader" (#24381)
* Uses transaction_context.get_key_of_account_at_index() when only the key is needed.

* Uses "!instruction_context.is_signer()" instead of ".signer_key().is_none()".

* Uses instruction_context.get_index_in_transaction() to detect account aliasing.

* Makes sure that there is only one KeyedAccount at a time.
Everywhere except for DeployWithMaxDataLen and Upgrade.

* Makes sure that there is only one KeyedAccount at a time.
In DeployWithMaxDataLen and Upgrade.

* Replaces KeyedAccount by BorrowedAccount.

* Removes unused code.
2022-04-19 11:35:40 +02:00
Justin Starry 697c9e1969
Automatically set PR merger as backport PR assignee (#24430)
* Automatically set PR author as backport PR assignee

* Use merged_by instead of author for assignee
2022-04-19 17:26:21 +08:00
Alexander Meißner d6ff50bcc1
Remove `KeyedAccount` in builtin program "system instruction processor" (#24452)
* Makes sure that there is only one KeyedAccount at a time.
Moves keyed_account_at_index() into create_account(), transfer_verified(), transfer() and transfer_with_seed() to do so.

* Uses transaction_context.get_key_of_account_at_index() when only the key is needed.

* Uses "!instruction_context.is_signer()" instead of ".signer_key().is_none()".

* Replaces KeyedAccount by BorrowedAccount.

* Removes unused code.
2022-04-19 09:28:07 +02:00
dependabot[bot] 1e08178aa9
chore: bump flate2 from 1.0.22 to 1.0.23 (#24460)
* chore: bump flate2 from 1.0.22 to 1.0.23

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.22...1.0.23)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-18 23:50:17 -06:00
Jeff Washington (jwash) 0e0f306996
mechanism for disabling hash calc caching (#24437) 2022-04-18 22:44:30 -05:00
Jeff Washington (jwash) 94d3ec37d2
collect_rent_eagerly can just do rewrites (#24438) 2022-04-18 22:44:19 -05:00
Jeff Washington (jwash) bf1e0c89e8
rename local: max_slot_in_storages -> inclusive (#24453) 2022-04-18 22:42:02 -05:00
Dmitri Makarov f58ebff44e Update C toolchain linker script to match the rust toolchain script 2022-04-18 17:35:38 -07:00
behzad nouri 039488b562
drops redundant turbine propagation path (#24351)
Most nodes in the cluster receive the same shred from two different
nodes: parent, and the first node of their neighborhood:
https://github.com/solana-labs/solana/blob/a8c695ba5/core/src/cluster_nodes.rs#L178-L197

Because of the erasure codings, half of the shreds are already
redundant. So this redundant propagation path will only add extra
overhead.

Additionally the very first node of the broadcast tree has 2x fanout
(i.e. 400 nodes) which adds too much load at one node.

This commit simplifies the broadcast tree by dropping the redundant
propagation path and removing the 2x fanout at root node.
2022-04-19 00:11:29 +00:00
behzad nouri 1d50832389
replaces counters with datapoints in gossip metrics (#24451) 2022-04-18 23:14:59 +00:00
dependabot[bot] 6ff7de7cab
chore: bump quinn from 0.8.1 to 0.8.2 (#24408)
* chore: bump quinn from 0.8.1 to 0.8.2

Bumps [quinn](https://github.com/quinn-rs/quinn) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/commits)

---
updated-dependencies:
- dependency-name: quinn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-18 18:10:47 -04:00
Jacob Creech 42532f5b20 docs: Update CTA for tech support to have StackOverflow
docs: Update CTA for tech support to have StackOverflow

docs: Update CTA for tech support to have StackOverflow

docs: remove discord praise
2022-04-18 13:32:26 -07:00
Alexander Meißner 8b854d4141
Remove `KeyedAccount` in builtin program "nonce keyed account" (#24436)
* Makes sure that there is only one KeyedAccount at a time.
Moves keyed_account_at_index() into withdraw_nonce_account() to do so.

* Replaces KeyedAccount by BorrowedAccount.

* Removes unused code.
2022-04-18 22:19:51 +02:00
Jeff Washington (jwash) ee384f7254
remove 'startup' from verify_snapshot_bank (#24441) 2022-04-18 14:35:49 -05:00
Brooks Prumo 1769a4e7b9
Fix intermittent failures in test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_startup() (#24440) 2022-04-18 13:08:06 -05:00
Jeff Washington (jwash) bcc5b96bda
remove redundant EpochSchedule (#24444) 2022-04-18 13:04:48 -05:00
Jason Davis 9052e41b32 Ran cargo fmt 2022-04-18 11:57:40 -05:00
Jason Davis 4dfeab3b38 Fix build error introduced by my editor setup, part 2 2022-04-18 11:57:40 -05:00
Jason Davis 87fb78dc56 Fix build error introduced by my editor setup 2022-04-18 11:57:40 -05:00
Jason Davis c2f7f2fff8 Remove redundant epoch_schedule from AccountsPackage 2022-04-18 11:57:40 -05:00
Jason Davis 36c0bdaa78 Fix a test 2022-04-18 11:57:40 -05:00
Jason Davis ed7813e698 Fixes to initial code 2022-04-18 11:57:40 -05:00
Jason Davis 5472d2e605 Removing redundant EpochSchedule param from fns 2022-04-18 11:57:40 -05:00
HaoranYi c6a751d658
Detect and report bank drop signal queue full and disconnect events (#24112)
* nonblocking send when when droping banks

* detect and report drop signal queue full/disconnect events

* comments

* use counter for reporting bank_drop_queue events

* reduce log

* use datapoint to report stats

* logging instead of reporting bank drop signal full

* fix a corner case for reporting

* fix build
2022-04-18 11:19:11 -05:00
Alexander Meißner 1ffbb91a62
Remove `KeyedAccount` in builtin program "config" (#24347)
* Makes sure that there is only one KeyedAccount at a time.

* Replaces KeyedAccount by BorrowedAccount in config.

* Removes unused code.
2022-04-18 17:06:23 +02:00
Christian Kamm d2c6c04d3e banking-bench: Add and rearrange options
- Add write-lock-contention option, replacing same_payer
- write-lock-contention also has a same-batch-only value, where
  contention happens only inside batches, not between them
- Rename num-threads to batches-per-iteration, which is closer to what
  it is actually doing.
- Add num-banking-threads as a new option
- Rename packets-per-chunk to packets-per-batch, because this is closer
  to what's happening; and it was previously confusing that num-chunks
  had little to do with packets-per-chunk.

Example output for a iterations=100 and a permutation of inputs:

contention,threads,batchsize,batchcount,tps
none,           3,192, 4,65290.30
none,           4,192, 4,77358.06
none,           5,192, 4,86436.65
none,           3, 12,64,43944.57
none,           4, 12,64,65852.15
none,           5, 12,64,70674.37
same-batch-only,3,192, 4,3928.21
same-batch-only,4,192, 4,6460.15
same-batch-only,5,192, 4,7242.85
same-batch-only,3, 12,64,11377.58
same-batch-only,4, 12,64,19582.79
same-batch-only,5, 12,64,24648.45
full,           3,192, 4,3914.26
full,           4,192, 4,2102.99
full,           5,192, 4,3041.87
full,           3, 12,64,11316.17
full,           4, 12,64,2224.99
full,           5, 12,64,5240.32
2022-04-18 09:43:46 -05:00
Christian Kamm 2c7699eb8c banking-bench: Migrate to clap 3.1.8 2022-04-18 09:43:46 -05:00
Yang Li a6742b5838
fix: remove async for createProgramAddress and findProgramAddress (#2… (#23185)
* fix: remove async for createProgramAddress and findProgramAddress (#23184)

make sync

* test: add test to ensure backwards compatibility
2022-04-18 16:17:00 +02:00
HaoranYi 6d1b6bdd7c
typo (#24400) 2022-04-18 08:52:56 -05:00
dependabot[bot] 3155270fa4
chore: bump @types/node from 16.11.26 to 17.0.24 in /web3.js (#24432)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.26 to 17.0.24.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 08:12:09 +00:00
kirill lykov 1ae07aab02
bench_tps test simplification (#24384) 2022-04-18 09:43:43 +02:00
Caio b7bf00a9ee
Implement From<[u8; 32]> for Pubkey and Hash (#24427) 2022-04-18 07:36:31 +00:00
steviez 38f0d60b00
Move repeated logic into common function (#24373) 2022-04-18 00:16:06 -05:00
steviez 6a5a540b39
Use Packet::from_data() to remove repeated logic (#24372) 2022-04-18 00:15:39 -05:00
Tao Zhu 2970507d7c remove unused file 2022-04-17 19:26:24 -05:00
Tao Zhu 578d59c802 Remove the code that handles cost update for separate pr 2022-04-17 19:26:24 -05:00
Tao Zhu 85281de981 move number utility functions to sdk; log error if cost adjust overflows i64 2022-04-17 19:26:24 -05:00
Tao Zhu e97ffb55cb nit - renaming variables to concise names 2022-04-17 19:26:24 -05:00
Tao Zhu 6bc6384f8e refactor to consolidate info into single return field 2022-04-17 19:26:24 -05:00
Tao Zhu 9dadfb2e2c Add checked_add_signed() to apply cost adjustment to cost_tracker 2022-04-17 19:26:24 -05:00
Tao Zhu 810b1dff40 undo cost of executed-but-not-recorded transactions from cost_tracker 2022-04-17 19:26:24 -05:00
Tao Zhu 23d365d02f Address review comment: extract transaction was_executed status to avoid cloning execution_results 2022-04-17 19:26:24 -05:00
Tao Zhu 094da35b91 Address review comments:
1. use was_executed to correctly identify transactions requires cost adjustment;
2. add function to specifically handle executino cost adjustment without have to copy accounts
2022-04-17 19:26:24 -05:00
Tao Zhu 29ca21ed78 undo transaction cost from cost_tracker if it was not executed successfully 2022-04-17 19:26:24 -05:00
Justin Starry 3426433f99
cli: Fix resume deploy directions (#24422) 2022-04-17 16:10:22 +08:00