2497 Commits

Author SHA1 Message Date
1509513339 hash calc: filler_accounts_enabled (#21243) 2021-11-12 09:53:21 -06:00
11153e1f87 refactor cost calculation (#21062)
* - cache calculated transaction cost to allow sharing;
- atomic cost tracking op;
- only lock accounts for transactions eligible for current block;
- moved qos service and stats reporting to its own model;
- add cost_weight default to neutral (as 1), vote has zero weight;

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update core/src/qos_service.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update core/src/qos_service.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-11-12 01:04:53 -06:00
ef29d2d172 Refactor vote state to remove double negative (#21244) 2021-11-12 00:26:43 +00:00
131c0d78c4 Fix compute budget bump (#21238) 2021-11-11 14:09:28 -08:00
c0f9e351db hashcalc eliminate zeros optimizations (#21209) 2021-11-11 09:44:32 +00:00
8b2133b078 Refactor total stats calculation into shared fn (#21212) 2021-11-09 19:13:37 -06:00
48265ada39 chore: bump blake3 from 1.1.0 to 1.2.0 (#21203)
* chore: bump blake3 from 1.1.0 to 1.2.0

Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.1.0...1.2.0)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* [auto-commit] Update all Cargo lock files

* Make versions consistent

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-11-08 15:27:37 -07:00
5827cf4c51 hash calc eliminate zero refactor get_item (#21036) 2021-11-08 20:27:48 +00:00
706b60b5c8 Add set_root bank drop logging (#21144) 2021-11-06 01:05:36 +00:00
1b46d1d54d hashcalc eliminate zeros cleanup (#21175) 2021-11-05 10:54:49 -05:00
c78f474373 Add validator option to change niceness of snapshot packager thread 2021-11-04 17:16:46 -06:00
7200c5106e Replaces MockInvokeContext by ThisInvokeContext in tests (#20881)
* Replaces MockInvokeContext by ThisInvokeContext in BpfLoader, SystemInstructionProcessor, CLIs, ConfigProcessor, StakeProcessor and VoteProcessor.

* Finally, removes MockInvokeContext, MockComputeMeter and MockLogger.

* Adjusts assert_instruction_count test.

* Moves ThisInvokeContext to the program-runtime crate.
2021-11-04 21:47:32 +01:00
0597594943 Fix rent debits test (#21177) 2021-11-04 20:03:19 +00:00
4e527b84b0 Remove unused upgrade epoch handling (#21164) 2021-11-04 10:44:36 -07:00
171243a370 add rent exempt count to get_total_accounts_stats (#21153) 2021-11-04 11:17:19 -05:00
e765542cd8 eliminate pubkey copy in eliminate_zeros (#21032)
* rework eliminate zero loop

* eliminate pubkey copy in eliminate_zeros
2021-11-04 11:16:36 -05:00
76e533be46 LoadedAccountAccessor::Cached does not store Pubkey (#21030) 2021-11-04 10:28:04 -05:00
aaccba8377 Refactor RentDebits to use hashmap instead of vec 2021-11-04 15:02:24 +00:00
b1e3a82c11 refactor rent collector and logs (#21155) 2021-11-04 06:28:41 -05:00
29ad081555 Stop caching sysvars, instead load them ahead of time. (#21108) 2021-11-04 09:48:34 +01:00
c326f41dfe Add bank::get_total_accounts_stats() (#21159) 2021-11-03 19:23:45 -05:00
c59c56c0f8 log rent exempt accounts (#21137) 2021-11-03 14:44:52 -05:00
c0952831be correctly clean filler accounts (#21139) 2021-11-03 11:27:15 -05:00
140a5f633d Simplify replay vote tracking by using packet metadata (#21112) 2021-11-03 09:02:48 +00:00
1e5212e60d Add set_root timing metrics (#21119) 2021-11-02 18:23:35 +01:00
bced07a099 Update fee api to use blockhash (#21054) 2021-10-29 13:52:59 -07:00
4aa12a52b6 Feature cleanup (#21038) 2021-10-28 09:04:03 -07:00
7a41b2c5d1 optimize get_accounts_delta_hash (#21027) 2021-10-28 10:40:32 -05:00
e9ab214237 filler accts: only add filler accts to slots in the current epoch (#21024) 2021-10-28 10:26:30 -05:00
6a1ff60c61 percent stats 0-1 -> 0-100 (#21028) 2021-10-27 18:08:27 -05:00
036d7fcc81 Clean up sanitized tx creation for tests (#21006) 2021-10-27 18:09:16 +01:00
9d330fc638 FillerAccts: use variable cycle partitions (#20963) 2021-10-27 11:18:27 -05:00
1e2bef76e3 Add compute budget program as a noop (#20992) 2021-10-26 20:08:59 -07:00
4d6190a1ba change bg waiting metrics to percent (#20955)
* Revert part of "AcctIdx: cleanup bg threads (#20731)"

This reverts part of commit 47de4f31b6.

* change bg waiting metrics to percent
2021-10-26 15:09:17 -05:00
2515f6a04f Update deprecation versions (#20959) 2021-10-26 09:06:41 -07:00
bbe3ce3db5 Accountsdb plugin write ordering (#20948)
Use the write_version in the Accounts's meta data so that account write with lower write_version would not overwrite the higher ones.
2021-10-25 14:07:56 -07:00
cf0fd5b2ca Moves NonceKeyedAccount from the SDK to the Runtime. (#20954) 2021-10-25 22:58:18 +02:00
9e85499d4c fix hash calc # storages, # slots (#20832) 2021-10-25 19:37:50 +00:00
43ea579f63 add cli for --accounts-hash-num-passes (#20827) 2021-10-25 09:45:46 -05:00
c2bfce90b3 - cost_tracker is data member of a bank, it can report metrics when bank is frozen (#20802)
- removed cost_tracker_stats and histogram
- move stats reporting outside of bank freeze
2021-10-24 22:19:23 -05:00
f14365f4b4 Accountsdb plugin postgres -- bulk insertion at startup (#20763)
Use bulk insertion to Postgres at startup to reduce time taken for initial snapshot restore for postgres plugin. Avoid duplicate writes of accounts at startup. Doing account plugin notification and indexing in parallel.

Improved error handling for postgres plugin to show the real db issues for debug purpose
Added more metrics for postgres plugin.
Refactored plugin centric code out to a sub module from accounts_db and added unit tests
2021-10-24 12:43:33 -07:00
bfbbc53dac Divorce the runtime from FeeCalculator (#20737) 2021-10-22 14:32:40 -07:00
735016661b Report timing info for stakes cache updates from txs (#20856) 2021-10-22 12:49:02 -04:00
1d9c1ccfd2 chore: bump blake3 from 1.0.0 to 1.1.0 (#20877)
* chore: bump blake3 from 1.0.0 to 1.1.0

Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.0.0...1.1.0)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2021-10-22 09:44:42 -06:00
97c2732d02 Refactor: Cleanup InvokeContext (#20785)
* Move blockhash and fee_calculator in ThisInvokeContext instead of using a reference.

* Moves tx_wide_compute_cap into InvokeContext::push().

* Adds ThisInvokeContext::new_mock() constructor.

* Adds missing loader account in uses of MockInvokeContext.

* Use keyed_account_at_index() when accessing keyed_accounts.

* Makes sysvar interface consistent between ThisInvokeContext and MockInvokeContext,
in order to add InvokeContext::get_sysvars().

* Adds InvokeContext::set_blockhash() and InvokeContext ::set_fee_calculator().

* Adds new_mock_with_features.

* Makes ancestors optional in ThisInvokeContext.

* Adds prepare_mock_invoke_context() and mock_process_instruction().
2021-10-21 20:57:42 +02:00
a8098f37d0 add checked instructions sysvar api (#20790) 2021-10-19 21:01:58 -07:00
58164517e4 Add program heap bump instruction (#20607) 2021-10-19 21:01:39 -07:00
cb2bd65858 runtime: Add foundation stake pool withdraw authority (#20797) 2021-10-19 21:49:21 +00:00
47a58a38c2 clean_accounts calls AcctIdx: get_many (#20715)
* AcctIdx: get_many

* keep read lock

* AcctIdx: get_many optionally adds to cache

* rename
2021-10-19 15:54:06 -05:00
0acbfdfcb9 hash calc: sort time is redundantly counted as part of 'total time' (#20791) 2021-10-19 15:52:43 -05:00