Commit Graph

18386 Commits

Author SHA1 Message Date
50fba01842 rpc-pubsub: reduce metrics/log spam 2022-04-15 01:16:58 -06:00
97f2eb8e65 Banking stage: Deserialize packets only once
Benchmarks show roughly a 6% improvement. The impact could be more
significant when transactions need to be retried a lot.

after patch:
{'name': 'banking_bench_total', 'median': '72767.43'}
{'name': 'banking_bench_tx_total', 'median': '80240.38'}
{'name': 'banking_bench_success_tx_total', 'median': '72767.43'}
test bench_banking_stage_multi_accounts
... bench:   6,137,264 ns/iter (+/- 1,364,111)
test bench_banking_stage_multi_programs
... bench:  10,086,435 ns/iter (+/- 2,921,440)

before patch:
{'name': 'banking_bench_total', 'median': '68572.26'}
{'name': 'banking_bench_tx_total', 'median': '75704.75'}
{'name': 'banking_bench_success_tx_total', 'median': '68572.26'}
test bench_banking_stage_multi_accounts
... bench:   6,521,007 ns/iter (+/- 1,926,741)
test bench_banking_stage_multi_programs
... bench:  10,526,433 ns/iter (+/- 2,736,530)
2022-04-15 00:57:11 -06:00
f7d557d5ae Update simulateTransaction rpc handling of return_data, and update docs (#24355)
* Stringify return_data program_id; also camel-case all fields

* Update simulateTransaction json-rpc docs

* Base64-encode return data in simulation RPC responses
2022-04-14 23:42:08 -06:00
e7e7e87c93 Fast log2 ceiling (#24301)
* typo

* a fast way to compute log2 ceiling

* rename and assert

* clippy

* fix test return 0 for empty slice

* add test for empty slice
2022-04-14 22:22:08 -05:00
8cfc010b84 Send async quic batch of txs (#24298)
Add an interface send_wire_transaction_batch_async to TpuConnection to allow for sending batches without waiting for completion

Co-authored-by: Anatoly Yakovenko <anatoly@solana.com>
2022-04-14 22:20:34 -04:00
5e8c12ebdf Do not require default keypair to exist for bench-tps (#24356) 2022-04-14 19:05:08 -06:00
77182fcdda chore: bump fd-lock from 3.0.4 to 3.0.5 (#24344)
Bumps [fd-lock](https://github.com/yoshuawuyts/fd-lock) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/yoshuawuyts/fd-lock/releases)
- [Commits](https://github.com/yoshuawuyts/fd-lock/compare/v3.0.4...v3.0.5)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 16:13:25 -06:00
865e17f3cf Fix merge Yaml file (#24354) 2022-04-14 14:15:39 -07:00
a8c695ba52 security: Set expectation on when to get a response (#24346)
* security: Set expectation on when to get a response

* Update SECURITY.md

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-04-14 21:05:57 +02:00
0e7b0597db check for rewrites skipped in closure (#24330) 2022-04-14 13:46:18 -05:00
2456a7be35 Deprecate MINIMUM_STAKE_DELEGATION (#24329) 2022-04-14 11:59:18 -05:00
d20b4c9958 rename function param to avoid conflict (#24342) 2022-04-14 11:56:32 -05:00
a91b0c8ea3 dashmap -> rwlock<hashmap> for rewrites (#24327) 2022-04-14 11:55:58 -05:00
e5fc0d3f76 chore: bump indexmap from 1.8.0 to 1.8.1 (#24334)
* chore: bump indexmap from 1.8.0 to 1.8.1

Bumps [indexmap](https://github.com/bluss/indexmap) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.8.0...1.8.1)

---
updated-dependencies:
- dependency-name: indexmap
  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-14 10:42:38 -06:00
e570039ee0 Fix automerge automation for backport PRs (#24338) 2022-04-15 00:29:40 +08:00
e3ef0741be simplify bank drop calls (#24142)
* simplify bank drop calls

* clippy: import

* Update ledger/src/blockstore_processor.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Update runtime/src/accounts_background_service.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* Update runtime/src/bank.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* cleanup

* format

* use msb of bank_id to indicates that we are dropping

* clippy

* restore bank id

* clippy

* revert is-serialized_with_abs flag

* assert

* clippy

* whitespace

* fix bank drop callback check

* more fix

* remove msb dropping implementation

* fix

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-04-14 08:43:54 -05:00
57ff7371b4 Add StakeInstruction::DeactivateDelinquent 2022-04-14 01:49:22 -04:00
b9caa8cdfb chore: bump uriparse from 0.6.3 to 0.6.4 (#23799)
* chore: bump uriparse from 0.6.3 to 0.6.4

Bumps [uriparse](https://github.com/sgodwincs/uriparse-rs) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/sgodwincs/uriparse-rs/releases)
- [Changelog](https://github.com/sgodwincs/uriparse-rs/blob/master/RELEASES.md)
- [Commits](https://github.com/sgodwincs/uriparse-rs/commits)

---
updated-dependencies:
- dependency-name: uriparse
  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-13 19:33:42 -06:00
255ef66a27 move feature activation log to correct fn for hash (#24326) 2022-04-13 17:43:33 -05:00
e13efa0883 fix: do not modify transaction during simulation 2022-04-13 15:22:35 -07:00
aea17c35ae Add a stringified credential option for LedgerStorage (#24314)
* add a stringified credential option for LedgerStorage

* fix clippy::useless-format warning

* change CredentialOption to enum CredentialType

* rename credential_option to credential_type

* restore LedgerStorage new fn signature

* fmt

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-04-13 14:35:06 -06:00
e146e860e2 Add convenience function for programs to get minimum delegation (#24175) 2022-04-13 14:41:52 -05:00
b4b26894cd Iterate on IDL account/instruction decoding (#24239)
* Switch to more integrated Anchor data decoding

* Revert anchor account data tab and better error handling
2022-04-13 15:38:59 -04:00
96e3555e93 Add RpcClient support to bench-tps (#24297)
* Impl BenchTpsClient for RpcClient

* Support RpcClient in bench-tps
2022-04-13 13:11:34 -06:00
26899359d1 Support quic in bench-tps (#24295)
* Update comment

* Use connection_cache in tpu_client

* Add --tpu-use-quic to bench-tps

* Use connection_cache async send
2022-04-13 12:17:10 -06:00
2e0bc89ec4 featurize rejection of callx r10 instructions (#24309) 2022-04-13 11:09:33 -07:00
6a474f29cd default to disk index (#24251) 2022-04-13 09:24:50 -05:00
b6b8783323 add maybe_update_rent_epoch_on_load (#24294) 2022-04-13 08:55:24 -05:00
096febd593 Remove KeyedAccount in builtin program "address lookup table" (#24283)
* Makes sure that there is only one KeyedAccount at a time.

* KeyedAccount by BorrowedAccount in address_lookup_table.

* Cleanup unused code.
2022-04-13 12:17:07 +02:00
b8ca1bcb68 Remove NativeLoader from program runtime (#24296)
* Deletes native_loader.rs

* Deletes the feature: remove_native_loader
2022-04-13 12:15:28 +02:00
47b938e617 Don't request reviews for community pr's that have been reviewed (#24307) 2022-04-13 12:47:25 +08:00
c29fca000b Fix community PR review requests (#24306) 2022-04-13 11:24:30 +08:00
e7fcda1424 Quic client stats (#24195)
* Add metrics to connection-cache to measure cache hits and misses

* Add congestion stats

* Add more client stats

* Review comments

Co-authored-by: Ryan Leung <ryan.leung@solana.com>
2022-04-13 05:04:40 +02:00
d8c45a69c3 fix: don't override a transaction's recentBlockhash when calling simulate if it's already set (#24280)
* Update simulate to add blockhash if not exist

Simulate has been overriding the recentBlockhash of the passed
Transaction which can be considered destructive and with side effects.

Since the purpose of this function is to purely simulate, it should not
override recentBlockhash if it has already been set

Refs https://github.com/solana-labs/solana/issues/24279

* Apply prettier
2022-04-13 10:15:50 +08:00
a43ff3bbcb cleanup (#24299) 2022-04-12 17:52:47 -07:00
138f04a49f featurize bpf function hash collision fix (#24262) 2022-04-12 17:52:32 -07:00
929753a11f typo (#24291) 2022-04-12 16:46:59 -05:00
4ac730944e Use explicit configuration of RBPF (#24286) 2022-04-12 13:54:39 -07:00
7a4a6597c0 Don't enforce ulimit for validator test config (#24272) 2022-04-12 22:06:37 +02:00
6b611e1c52 Bump bpf-tools to v1.25
- Tweak linker script
  Ensure that all read only sections end up in one segment, and
  everything else in other segments. Discard .eh_frame, .hash and
  .gnu.hash since they are unused.
- Don't create invalid string slices in stdout/stderr on Solana
- Report exceeded stack size as a warning if dynamic frames are off
- Native support for signed division in SBF
  Adds BPF_SDIV, which is enabled only for the SBF subtarget.
- Introduce dynamic stack frames and the SBFv2 flag
  Dynamic stack frames  are currently opt-in and enabled setting
  cpu=sbfv2. When sbfv2 is used, ELF files are flagged with
  e_flags=EF_SBF_V2 so the runtime can detect it and react
  accordingly.
2022-04-12 10:51:15 -07:00
69e9ad5571 update comment (#24288) 2022-04-12 12:37:46 -05:00
b035991c35 migrate memberes from deprecated structs (#24263) 2022-04-12 09:49:42 -07:00
2d4d639635 add expected_rent_collection (#24028)
* add expected_rent_collection

* update some comments for clarity and resolve a todo

* add test for 'LeaveAloneNoRent'
2022-04-12 11:32:23 -05:00
8487030ea6 Add TpuClient support to bench-tps (#24227)
* Add fallible send methods, and rpc_client helper

* Add helper to return RpcClient url

* Implement BenchTpsClient for TpuClient

* Add cli rpc and identity handling

* Handle different kinds of clients in main, use TpuClient

* Add tpu_client integration test
2022-04-12 09:43:29 -06:00
bdbca3362e increase test timeout (#24277) 2022-04-12 09:54:57 -05:00
1bc49d219d IndexLimitMb option adds 'Unspecified' state (#24249) 2022-04-12 09:38:09 -05:00
605036c117 move test fn into its own mod (#24212)
* move test fn into its own mod

* pub
2022-04-12 09:36:05 -05:00
474080608a Async send for send transaction service (#24265)
* async send
2022-04-12 07:15:59 -07:00
f3aa80d3f8 typo (#24257) 2022-04-12 09:08:35 -05:00
9488a73f52 Don't request reviews from community-pr-subscribers if reviewer assigned (#24270) 2022-04-12 16:35:05 +08:00