Commit Graph

2256 Commits

Author SHA1 Message Date
Jack May bfbbc53dac
Divorce the runtime from FeeCalculator (#20737) 2021-10-22 14:32:40 -07:00
Justin Starry 735016661b
Report timing info for stakes cache updates from txs (#20856) 2021-10-22 12:49:02 -04:00
dependabot[bot] 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
Alexander Meißner 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
Jack May a8098f37d0
add checked instructions sysvar api (#20790) 2021-10-19 21:01:58 -07:00
Jack May 58164517e4
Add program heap bump instruction (#20607) 2021-10-19 21:01:39 -07:00
Jon Cinque cb2bd65858
runtime: Add foundation stake pool withdraw authority (#20797) 2021-10-19 21:49:21 +00:00
Jeff Washington (jwash) 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
Jeff Washington (jwash) 0acbfdfcb9
hash calc: sort time is redundantly counted as part of 'total time' (#20791) 2021-10-19 15:52:43 -05:00
Tao Zhu 7496b5784b
- make cost_tracker a member of bank, remove shared instance from TPU; (#20627)
- decouple cost_model from cost_tracker; allowing one cost_model
  instance being shared within a validator;
- update cost_model api to calculate_cost(&self...)->transaction_cost
2021-10-19 14:37:33 -05:00
Michael Vines 2b76ea51b4 Reduce visibility of `Hash` struct contents 2021-10-19 09:30:47 -07:00
Jeff Washington (jwash) 46bf7d4a4a
AcctIdx: support 2^24 bins (#20739) 2021-10-18 14:05:16 -05:00
Brooks Prumo 751b45df64
Make pub get_incremental_snapshot_archives() (#20725) 2021-10-18 13:48:50 -05:00
sakridge c9b367c350
Minimum of 1 lamport for rent (#20650) 2021-10-18 19:09:53 +02:00
Jeff Washington (jwash) 6ec159a1ae
parallelize update_index (#20601) 2021-10-18 09:07:01 -05:00
Jeff Washington (jwash) 0d934d311e
sort shrink acct indexes (#20708) 2021-10-18 09:06:32 -05:00
Alexander Meißner e98cfbb570
Removes deprecated BpfComputeBudget. (#20728) 2021-10-18 09:55:41 +02:00
Jeff Washington (jwash) 70b2e5fef2
hash calc uses all threads during startup (#20735) 2021-10-15 17:41:23 -05:00
Jeff Washington (jwash) 47de4f31b6
AcctIdx: cleanup bg threads (#20731) 2021-10-15 16:15:11 -05:00
Jeff Washington (jwash) 254ad45878
sort pubkeys for clean (#20706) 2021-10-15 14:31:06 -05:00
Jeff Washington (jwash) 6d7da6dbee
clean:clone uncleaned_roots for loop (#20714) 2021-10-15 13:18:00 -05:00
Jeff Washington (jwash) 5a6d732d48
AcctIdx: separate account index by startup and !startup (#20711) 2021-10-15 13:04:32 -05:00
Jeff Washington (jwash) 9d62963240
AcctIdx: get_internal allows not adding to in_mem (#20716) 2021-10-15 13:04:05 -05:00
Jeff Washington (jwash) 1e064c32e2
pull append_vec_id() out of loop (#20713) 2021-10-15 10:41:23 -05:00
Jeff Washington (jwash) 00b9056004
clean metric: total_us (#20707) 2021-10-15 10:41:05 -05:00
Jeff Washington (jwash) b80fd7566a
add worker threads during startup (#20700) 2021-10-15 10:40:36 -05:00
Tao Zhu e225ed7ab0
update config by testnet (#20699) 2021-10-15 15:32:46 +00:00
Jeff Washington (jwash) 7eead4e25f
clean stats on acct idx lookup (#20632) 2021-10-14 08:37:42 -05:00
Jeff Washington (jwash) c43b6e0248
log metric for clean_accounts.delta_insert_us (#20634) 2021-10-14 08:37:14 -05:00
Jeff Washington (jwash) 9b042fed30
AcctIdx: support unref first class for perf (#20638) 2021-10-14 08:36:53 -05:00
Jack May da45be366a
Remove blockhash from fee calculation (#20641) 2021-10-13 13:10:58 -07:00
Tao Zhu 220fd41bbc
fix unstable test (#20645) 2021-10-13 11:43:18 -05:00
Jeff Washington (jwash) aec9d8bf2f
add clean stats (#20631) 2021-10-13 08:22:11 -05:00
Alexander Meißner 1d813ea078
Refactor: Make program_id always last in program chain (#20598)
* Replaces program_id field in InvokeContextStackFrame by index.

* Swaps order of program account and programdata account.

* Removes program_id parameter from InvokeContext::push().
2021-10-13 08:58:20 +02:00
Jeff Washington (jwash) 7631011d8c
AcctIdx: add flush remove stat (#20625) 2021-10-12 16:13:32 -05:00
Alexander Meißner 06cad19c91
Adds missing program_id in InvokeContext::push() calls. (#20621) 2021-10-12 19:26:55 +02:00
Tao Zhu 005d6863fd
- move cost tracker into bank, so each bank has its own cost tracker; (#20527)
- move related modules to runtime
2021-10-12 08:51:33 -05:00
Jack May b0ee5d6cfa
Add debug guard to catch invalid params (#20603) 2021-10-11 16:47:17 -07:00
Jeff Washington (jwash) 0da677e213
AcctIdx: write disk only when removing from mem (#20578) 2021-10-11 14:47:06 -05:00
dependabot[bot] 9d94e43839
chore: bump ouroboros from 0.12.0 to 0.13.0 (#20591)
* chore: bump ouroboros from 0.12.0 to 0.13.0

Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

---
updated-dependencies:
- dependency-name: ouroboros
  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 <you@example.com>
2021-10-11 11:54:37 -06:00
Jeff Washington (jwash) a8e000a2a6
add filler accounts to bloat validator and predict failure (#20491)
* add filler accounts to bloat validator and predict failure

* assert no accounts match filler

* cleanup magic numbers

* panic if can't load from snapshot with filler accounts specified

* some renames

* renames

* into_par_iter

* clean filler accts, too
2021-10-11 12:46:27 -05:00
Alexander Meißner f30f3bddbb
Refactor: Remove program_id from process_instruction() (#20540)
* Replaces usage of program_id parameter by invoke_context.get_caller()?.

* Removes "pubkey: &Pubkey" parameter from "process_instruction()".
2021-10-10 22:29:18 +02:00
Jeff Washington (jwash) 8cf222b8bd
AcctIdx: combine if (#20545) 2021-10-10 13:48:18 -05:00
Jeff Washington (jwash) 33d8c07364
AcctIdx: combine scan and update loops (#20546) 2021-10-10 13:47:52 -05:00
Justin Starry db9336c99e
Remove feature switch handling for checking vote init (#20557) 2021-10-08 23:35:26 -04:00
Jeff Washington (jwash) 0545306f0c
AcctIdx: remove stats from write lock section (#20548) 2021-10-08 15:27:38 -05:00
Brooks Prumo 5440c1d2e1
SnapshotPackagerService pushes incremental snapshot hashes to CRDS (#20442)
Now that CRDS supports incremental snapshot hashes,
SnapshotPackagerService needs to push 'em!

This commit does two main things:

1. SnapshotPackagerService now knows about incremental snapshot hashes,
   and will push SnapshotPackage::IncrementalSnapshot hashes to CRDS.
2. At startup, when loading from a full + incremental snapshot, the
   hashes need to be passed all the way to SnapshotPackagerService so it
   can push these starting hashes to CRDS.  Those values have been piped
   through.

Fixes #20441 and #20423
2021-10-08 15:14:56 -05:00
Jeff Washington (jwash) 4f6a0b2650
AcctIdx: stats for buckets on disk, add median (#20528) 2021-10-08 13:58:38 -05:00
Jeff Washington (jwash) 2c3d52b4cc
AcctIdx: avoid overcounting inserts (#20544) 2021-10-08 13:57:47 -05:00
Alexander Meißner 4e65487d2f
Refactor: process_instruction() (#20448)
* Adds first_instruction_account parameter to process_instruction().

* Removes InvokeContext::remove_first_keyed_account() from all BPF loaders.

* Removes InvokeContext::remove_first_keyed_account() from all builtin programs.

* Removes InvokeContext::remove_first_keyed_account() from all mock ups.

* Deprecates InvokeContext::remove_first_keyed_account().

* Documents index base of keyed_account_at_index().

* Adds dynamic offset to call sites of "keyed_account_at_index()".
2021-10-08 11:41:07 +02:00
Jeff Washington (jwash) 069586c171
AcctIdx: set startup around clean and shrink at startup to flush cache (#20526) 2021-10-07 22:57:40 +00:00
Tao Zhu 177a375479
Tpu vote 1.7 (#20187) (#20494)
* Add separate vote processing tpu port

* Add feature to send to tpu vote port

* Add vote rejecting sigverify mode

* use packet.meta.is_simple_vote_tx in place of deserialization

* consolidate code that identifies vote tx atcommon path for cpu and gpu

* new key for feature set

* banking forward tpu vote

* add tpu vote port to dockerfile and other review changes

* Simplify thread id compare

* fix a test; updated cluster_info ABI change

Co-authored-by: Tao Zhu <tao@solana.com>

Co-authored-by: sakridge <sakridge@gmail.com>
2021-10-07 09:38:23 +00:00
Jeff Washington (jwash) df39b37cb8
improve clean stats (#20469) 2021-10-06 20:04:26 -05:00
Trent Nelson 767f740305 Bump version to 1.9.0 2021-10-06 17:57:41 -07:00
Michael Vines 3b70cdb8d8 Upgrade to Rust 1.55.0 2021-10-06 17:48:58 -07:00
Jack May 785fcb63f5
Remove support for dynamically loaded native programs (#20444) 2021-10-06 14:53:23 -07:00
Michael Vines 7027d56064 Resolve nightly-2021-10-05 clippy complaints 2021-10-06 10:37:58 -07:00
Jeff Washington (jwash) 895b46e0c3
simplify AccountsDb::new_with_config (#20473) 2021-10-06 11:41:23 -05:00
Justin Starry 129716f3f0
Optimize stakes cache and rewards at epoch boundaries (#20432)
* Optimize stakes cache and rewards at epoch boundaries

* Fetch from accounts db

* Add cli flag for disabling epoch boundary optimization
2021-10-06 00:53:26 -04:00
Justin Starry 250a8503fe
Make rewards tracer async friendly (#20452) 2021-10-05 21:30:08 -04:00
Jeff Washington (jwash) d03bf2bbfe
AcctIdx: metrics fixes (#20449) 2021-10-05 22:26:29 +00:00
Jeff Washington (jwash) 4267419349
AcctIdx: sleep thread when enough threads are running to complete the remaining work (#20446) 2021-10-05 16:48:23 -05:00
Jeff Washington (jwash) 0d98a91511
AcctIdx: metric for bucket grow time (#20445) 2021-10-05 20:22:01 +00:00
Jeff Washington (jwash) 64cf354651
Add clean metrics (#20410) 2021-10-04 18:21:45 -05:00
Jeff Washington (jwash) 2d78f8ad2a
parallelize unref_from_storage from clean_dead_slots_from_accounts_index (#20411) 2021-10-04 18:20:10 -05:00
Justin Starry 0ddb34a0b4
Add struct and convenience methods to track stake activation status (#20392)
* Add struct and convenience methods to track stake activation status

* fix nits

* rename
2021-10-04 18:59:11 -04:00
Jeff Washington (jwash) b6a6d6986d
lift store.slot() from loop (#20409) 2021-10-04 16:07:01 -05:00
Jeff Washington (jwash) 8da2eb980a
AcctIdx: introduce BucketApi for access to a specific bucket (#20359) 2021-10-04 11:48:09 -05:00
Jeff Washington (jwash) e31c065544
AcctIdx: when disk index insert needs to grow, drop locks, grow, then restart flush (#20333) 2021-09-30 19:27:09 -04:00
Lijun Wang fe97cb2ddf
AccountsDb plugin framework (#20047)
Summary of Changes

Create a plugin mechanism in the accounts update path so that accounts data can be streamed out to external data stores (be it Kafka or Postgres). The plugin mechanism allows

Data stores of connection strings/credentials to be configured,
Accounts with patterns to be streamed
PostgreSQL implementation of the streaming for different destination stores to be plugged in.

The code comprises 4 major parts:

accountsdb-plugin-intf: defines the plugin interface which concrete plugin should implement.
accountsdb-plugin-manager: manages the load/unload of plugins and provide interfaces which the validator can notify of accounts update to plugins.
accountsdb-plugin-postgres: the concrete plugin implementation for PostgreSQL
The validator integrations: updated streamed right after snapshot restore and after account update from transaction processing or other real updates.
The plugin is optionally loaded on demand by new validator CLI argument -- there is no impact if the plugin is not loaded.
2021-09-30 14:26:17 -07:00
dependabot[bot] 9ef1f06b3f
chore: bump ouroboros from 0.11.1 to 0.12.0 (#20344)
* chore: bump ouroboros from 0.11.1 to 0.12.0

Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

---
updated-dependencies:
- dependency-name: ouroboros
  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-09-30 13:20:05 -06:00
Jeff Washington (jwash) 8db9586599
AcctIdx: randomly evict items from in mem (#20319) 2021-09-30 02:51:54 +00:00
Jeff Washington (jwash) 5e05f12c48
AcctIdx: bucket perf improvements (#20328) 2021-09-30 01:53:26 +00:00
Jeff Washington (jwash) 59112adac1
AcctIdx: us stats were showing ms (#20324) 2021-09-29 22:18:07 +00:00
Jeff Washington (jwash) 2ec74474e9
AcctIdx: optimize should_remove_from_mem (#20327) 2021-09-29 16:41:54 -05:00
Alexander Meißner 4de5fff3ca
Simplifies return_data accessors in InvokeContext. (#20290) 2021-09-29 19:11:06 +02:00
Alexander Meißner 57c8abf499
Refactor: Merge message processor into invoke context (#20308)
* Inlines MessageProcessor::execute_instruction() in MessageProcessor::process_message().

* Moves MessageProcessor::create_pre_accounts() into ThisInvokeContext::push().

* Move instruction_recorders slice into InvokeContext.

* Makes account_indices optional in InvokeContext::push().

* Separates initial InvokeContext::push() from ThisInvokeContext::new().

* invoke_context.pop() the base invocation frame.

* Zip message.instructions.iter() and program_indices.iter().

* Moves ThisInvokeContext::new() to the beginning of the loop inside MessageProcessor::process_message().

* Hoists ThisInvokeContext::new() out of loop inside MessageProcessor::process_message().

* Removes unnecessary clone() from ThisInvokeContext::new() in MessageProcessor ::process_message().

* Stop ignoring errors from MessageProcessor::create_pre_accounts().

* Moves MessageProcessor::verify_account_references() and MessageProcessor::verify() into InvokeContext::verify().
2021-09-29 12:05:25 -05:00
Jeff Washington (jwash) 062d8e6c5a
AcctIdx: fix logic on should_remove_from_mem (#20302) 2021-09-29 13:07:40 +00:00
Jeff Washington (jwash) bd9b2f6f39
AcctIdx: throttling bg flushing to spread out work over interval (#20176)
* AcctIdx: throttling bg flushing to spread out work over interval

* prevent hang
2021-09-29 07:42:54 -05:00
Jack May 8fee9a2e1a
Dont call precompiled programs (#19930) 2021-09-29 06:25:08 +00:00
Jack May 491877de3d
Revert "Refactor: Merge MessageProcessor into InvokeContext (#20165)" (#20301)
This reverts commit df6905c3a6.
2021-09-28 16:59:01 -07:00
Jeff Washington (jwash) fa5b091b4c
prior to panicing with cap mismatch, try other calculation (#20292) 2021-09-28 16:09:36 -05:00
Jeff Washington (jwash) 320beb76f6
AcctIdx: implement wait_for_idle (#20256) 2021-09-28 11:07:19 -05:00
Tyera Eulberg 2cd9dc99b6
Restore ability for programs to upgrade themselves (#20265)
* Make helper associated fn

* Add feature definition

* Add handling to preserve program-id write lock when upgradeable loader is present; restore bpf upgrade-self test

* Use single feature
2021-09-28 09:59:08 -06:00
Jack May 4e27543415
Allow programs to realloc their accounts within limits (#19475) 2021-09-28 01:13:03 -07:00
Jeff Washington (jwash) e50a26e6cf
AcctIdx: add age_interval_ms() to remove constant use (#20264) 2021-09-28 01:22:07 +00:00
Jeff Washington (jwash) af309c126c
AcctIdx: refactor get to use more refs (#20268) 2021-09-28 00:18:36 +00:00
dependabot[bot] 34406d4815
chore: bump ouroboros from 0.10.1 to 0.11.1 (#20244)
* chore: bump ouroboros from 0.10.1 to 0.11.1

Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.10.1 to 0.11.1.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

---
updated-dependencies:
- dependency-name: ouroboros
  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-09-27 23:26:08 +00:00
Jeff Washington (jwash) f6812523cd
handle race condition with flush and delete (#20255) 2021-09-27 16:55:15 -05:00
Jeff Washington (jwash) bbd2f9672d
clone -> Arc::clone to make cost clear (#20262) 2021-09-27 16:49:53 -05:00
Jeff Washington (jwash) 4f83818fdb
get rid of WriteAccountMapEntry instance (#19093) 2021-09-27 16:24:19 -05:00
Jeff Washington (jwash) e4795ae7ed
AcctIdx: keep cached or multiple slot lists in cache (#20257) 2021-09-27 16:09:26 -05:00
Jeff Washington (jwash) 9d91a6f1b7
shrink slots at startup uses more threads (#20251) 2021-09-27 14:14:55 -05:00
Jeff Washington (jwash) 8266864adc
AcctIdx: maybe advance age when a bg thread wakes up (#20250)
* fix math error with stats calc

* AcctIdx: maybe report stats when a bg thread wakes up
2021-09-27 18:39:41 +00:00
Brooks Prumo 95fbc29500
Add stats when getting snapshot storages (#20234) 2021-09-27 13:07:00 -05:00
Jeff Washington (jwash) 46263d405e
fix math error with stats calc (#20253) 2021-09-27 11:55:19 -05:00
Jeff Washington (jwash) bc50fd4ad6
allocate threads for accounts idx based on cpus (#20118) 2021-09-27 11:25:06 -05:00
Jeff Washington (jwash) 025261c05e
AcctIdx: when no disk index, always wait for stats (#20248) 2021-09-27 11:24:36 -05:00
Jeff Washington (jwash) 833f7761d2
AcctIdx: upsert uses get from mem first (#20186) 2021-09-27 11:23:53 -05:00
Jeff Washington (jwash) d8f98b3dcb
AcctIdx: avoid crazy #s on ms_per_age stat (#20184) 2021-09-27 08:25:23 -05:00
Alexander Meißner df6905c3a6
Refactor: Merge MessageProcessor into InvokeContext (#20165)
* Inlines MessageProcessor::execute_instruction() in MessageProcessor::process_message().

* Moves MessageProcessor::create_pre_accounts() into ThisInvokeContext::push().

* Hoists ThisInvokeContext::new() out of loop inside MessageProcessor::process_message().

* Moves MessageProcessor::verify_account_references() and MessageProcessor::verify() into InvokeContext::verify().
2021-09-27 08:28:45 +02:00
Jeff Washington (jwash) c6d189dac2
bg threads wait until next expected event (#20126) 2021-09-24 16:00:41 -05:00
Jeff Washington (jwash) 122206dbb1
AcctIdx: bg loop sleeps when all buckets flushed at current age (#20168) 2021-09-24 13:19:06 -05:00
Jeff Washington (jwash) 1d13594c1c
AcctIdx: store # threads in BucketHolder. Used later. (#20151) 2021-09-23 19:56:44 -05:00
Jeff Washington (jwash) b3bb079d9f
AcctIdx: condense upsert to always use read lock (#20148) 2021-09-23 19:19:27 -05:00
Brooks Prumo 1347b507da
Handle duplicate AppendVec IDs (#20096)
When reconstructing the AccountsDb, if the storages came from full and
incremental snapshots generated on different nodes, it's possible that
the AppendVec IDs could overlap/have duplicates, which would cause the
reconstruction to fail.

This commit handles this issue by unconditionally remapping the
AppendVec ID for every AppendVec.

Fixes #17088
2021-09-23 17:34:32 -05:00
Jeff Washington (jwash) 2ae1e80013
AcctIdx: items needs to load from disk (#20138) 2021-09-23 17:33:54 -05:00
Jeff Washington (jwash) 334d38d200
AcctIdx: generation per thread starts at a random bucket (#20122) 2021-09-23 19:59:37 +00:00
Jeff Washington (jwash) 254d9c8903
range takes a ref (#20140) 2021-09-23 13:57:56 -05:00
Jeff Washington (jwash) 093dd68214
AcctIdx: stats for how much time bg threads wait (#20127) 2021-09-23 18:37:14 +00:00
Jeff Washington (jwash) fe28f17718
AcctIdx: startup causes us to flush remove everything asap (#20121) 2021-09-23 12:17:52 -05:00
Jeff Washington (jwash) 5dae615208
AcctIdx: set age of cache accesses to future (#20125) 2021-09-23 11:43:48 -05:00
Jeff Washington (jwash) fb55e9a9b6
AcctIdx: when stop_flush is disabled, prepare to age (#20113) 2021-09-23 11:42:32 -05:00
Jeff Washington (jwash) 5bbb0da7b8
AcctIdx: stats for in-mem (#20114) 2021-09-23 08:14:53 -05:00
Jeff Washington (jwash) cb9d93525b
AcctIdx: metrics for loading from disk (#20124) 2021-09-23 08:14:08 -05:00
Jeff Washington (jwash) 4d3e32803f
AcctIdx: PreAllocatedAccountMapEntry (#20117) 2021-09-23 08:11:32 -05:00
Trent Nelson 7b365c564f
runtime: remove inactive delegation from stakes cache 2021-09-22 20:50:58 -06:00
Jeff Washington (jwash) 476124de50
AcctIdx: report disk bucket stats (#20120) 2021-09-22 18:17:20 -05:00
Jeff Washington (jwash) f7eebadbed
AcctIdx: remove old items from cache (#20076) 2021-09-22 21:37:15 +00:00
Jeff Washington (jwash) 0eb0d7f73b
AcctIdx: consolidate lock_and_update_slot_list (#20090) 2021-09-22 18:40:19 +00:00
Jeff Washington (jwash) 4fb77183ef
AcctIdx: move background() to bucket holder (#20085) 2021-09-22 17:40:30 +00:00
Jeff Washington (jwash) 681e8728a1
get rid of logs left in test (#20116) 2021-09-22 12:39:48 -05:00
Jeff Washington (jwash) bbd7bc2985
AcctIdx: Fix bad test (#20115) 2021-09-22 12:39:31 -05:00
Jeff Washington (jwash) 1eeddf2e23
orderings on AcctIdx dirty (#20087) 2021-09-22 11:24:16 -05:00
Jeff Washington (jwash) 681d6d121e
AcctIdx: 2 upserts use disk (#20072) 2021-09-22 11:14:08 -05:00
Jeff Washington (jwash) deab944b30
AcctIdx: flush inserts to disk (#20074) 2021-09-22 09:55:40 -05:00
Jeff Washington (jwash) 804ed825f7
AcctIdx: rework timing of bg loop (#20077) 2021-09-22 09:39:49 -05:00
Jeff Washington (jwash) a6aef76f52
AcctIdx: put_range_in_cache loads from disk (#20073) 2021-09-22 09:37:34 -05:00
Jeff Washington (jwash) c944bfb1d9
AcctIdx tests use disk buckets (#20070) 2021-09-22 08:55:58 -05:00
Jeff Washington (jwash) 9e9417b474
AcctIdx: initialze stats with # bins (#20088) 2021-09-22 08:55:07 -05:00
Jeff Washington (jwash) b918c2f4cd
AcctIdx: remove_if_slot_list_empty uses disk backing (#20069) 2021-09-22 08:48:44 -05:00
Jeff Washington (jwash) 6c518102dd
AcctIdx: fix some missing dirty calls (#20089) 2021-09-22 08:45:08 -05:00
dependabot[bot] 1b58166e9d
chore: bump memmap2 from 0.4.0 to 0.5.0 (#20057)
* chore: bump memmap2 from 0.4.0 to 0.5.0

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: memmap2
  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-09-21 17:20:49 -06:00
Jeff Washington (jwash) e6795e6fdd
AcctIdx: get can load from disk (#20067) 2021-09-21 12:40:07 -05:00
Jeff Washington (jwash) 7f3d445af5
AcctIdx: Orderings and cleanup (#20046) 2021-09-21 10:52:39 -05:00
Jeff Washington (jwash) bbe151e594
AcctIdx: only flush if disk index being used (#20045) 2021-09-21 08:42:13 -05:00
Jeff Washington (jwash) 38ea3aa31a
AcctIdx: keys impl when items are on disk (#20039) 2021-09-21 08:41:39 -05:00
Jeff Washington (jwash) fb71e80962
AcctIdx: accessors for age (#20023) 2021-09-21 08:41:17 -05:00
Jeff Washington (jwash) c3679ab9bd
AcctIdx: first pass at aging buckets (#20008) 2021-09-21 08:40:55 -05:00
Alexander Meißner b507715d44
CPI without Account Refs (#20034)
* Removes search for accounts and unsafe lifetime transmute in InvokeContext::push().

* Replaces accounts by account_indices in verify_and_update() and process_cross_program_instruction().

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2021-09-21 14:41:02 +02:00
Jeff Washington (jwash) 94330de843
AcctIdx: delete from disk index (#20035) 2021-09-20 16:19:21 -05:00
Jeff Washington (jwash) 6399a87485
AcctIdx: report age in stats (#20025) 2021-09-20 14:30:12 -05:00
Jeff Washington (jwash) e9ee90a121
AcctIdx: age adds time component (#20024) 2021-09-20 14:29:34 -05:00
Jeff Washington (jwash) d842705622
AcctIdx: when bg processing in multiple threads, avoid bin collisions (#20019) 2021-09-20 11:50:22 -05:00
Jeff Washington (jwash) e6934e7247
AcctIdx: consolidate to correct CondVar (#20017) 2021-09-20 09:58:20 -05:00
Jeff Washington (jwash) 55d9ff9899
WaitableCondVar supports notify_one (#20013) 2021-09-20 09:57:57 -05:00
Jeff Washington (jwash) bc7983b13e
AcctIdx: metric for active bg threads (#20026) 2021-09-20 09:44:40 -05:00
Jeff Washington (jwash) 2a42f8a06e
AcctIdx: disk index now holds a bucket map (#19995) 2021-09-20 08:40:10 -05:00
Jeff Washington (jwash) af5b0d42a8
AcctIdx: initial index items have future age to flush (#20010) 2021-09-19 20:22:09 -05:00
Jeff Washington (jwash) c1d181add5
add --accounts-index-memory-limit-mb (#19269) 2021-09-19 18:00:15 -05:00
Jeff Washington (jwash) f579f73700
AcctIdx: introduce age per in-mem bucket (#19982) 2021-09-18 22:09:37 -05:00
Jeff Washington (jwash) 742155c214
call set_startup and add metrics on generate_index (#20006) 2021-09-18 22:08:58 -05:00
Jeff Washington (jwash) db40d06a39
AcctIdx: introduce startup to bucket map (#20004) 2021-09-18 12:55:57 -05:00
Jeff Washington (jwash) bed0049a51
AcctIdx: add age per item in in_mem acct idx (#19981) 2021-09-18 09:56:26 -05:00
Jeff Washington (jwash) 8df8f4396d
AcctIdx: start calling flush on in mem cache buckets (#19966)
* AcctIdx: start calling flush on in mem cache buckets

* fix orderings
2021-09-18 09:56:08 -05:00
Jeff Washington (jwash) 4089f8b06b
AcctIdx: with multiple bg threads, only log stats once per time interval (#19984) 2021-09-18 09:55:20 -05:00
Jeff Washington (jwash) 4e038e94fd
add 'drives' to AccountsIndexConfig (#19989) 2021-09-18 09:54:57 -05:00
Jeff Washington (jwash) f500c99a6d
pass AcctIdxConfig to BucketMapHolder (#19997) 2021-09-18 09:54:00 -05:00
Jeff Washington (jwash) bd86f41e18
acct idx tests use 2 bins instead of 8k (#19996) 2021-09-18 09:53:44 -05:00
Jeff Washington (jwash) 4dc2f08198
AcctIdx: hold_range_in_memory (#19955) 2021-09-17 22:19:29 +00:00
Jeff Washington (jwash) 24b136a993
AcctIdx: configurable flush threads (#19983) 2021-09-17 22:02:43 +00:00
Jeff Washington (jwash) b2152be3b2
introduce bucket map (#19848)
* introduce bucket map

* rename BucketMap bits to num_buckets_pow2

* use u64::BITS

* Store the number of buckets in BucketMapConfig as a regular number

* remove redundant type aliases

* use Slot from sdk

* use Arc::clone() instead

* fixup erase drives

* rename num_buckets to max_buckets

* add doc to BucketMapConfig::new()

* add more documentation

* rename to DEFAULT_CAPACITY_POW2

* doc

* add more traits while we can

* rename capacity to capacity_pow2

* fix a naming for max_buckets_pow2

* remove unused/incorrect DataBucket::bytes

* rework benches a bit

* fixup bench docs

* rename create_bucket_capacity_pow2 to bucket_capacity_when_created_pow2

* rename BucketMapKeyValue to BucketItem

* rename to items_in_range

* remove values()

* remove addref and unref

* remove more addref and unref

* resurect addref and unref since tests use 'em for now

* rename to BucketStorage

* move stats in bucket_stats

* remove specializations (i don't think they are needed)

* move MaxSearch and RefCount into lib.rs

* move BucketItem to bucket_item.rs

* add doc

* keys no longer returns an option

* Revert "remove specializations (i don't think they are needed)"

This reverts commit b22f78e072cf0f7107851b08e58c2e3fead3f64d.

Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-09-17 15:11:27 -05:00
Jeff Washington (jwash) cddb9da4f0
AcctIdx: central age functions/state (#19980) 2021-09-17 15:11:07 -05:00
Jeff Washington (jwash) 99f5684dc4
AcctIdx: handle future config defaults (#19967) 2021-09-17 13:12:06 -05:00
Jeff Washington (jwash) 9998e16df3
AcctIdx: prepare to spin up multiple bg threads (#19969) 2021-09-17 11:53:25 -05:00
Jack May 7b0bf64404
cleanup old features (#19956) 2021-09-17 09:46:49 -07:00
Jeff Washington (jwash) 37d6f5013f
AcctIdx: initialize acct idx by config (#19968) 2021-09-17 16:39:41 +00:00
dependabot[bot] b8106e2450
chore: bump memmap2 from 0.3.1 to 0.4.0 (#19974)
* chore: bump memmap2 from 0.3.1 to 0.4.0

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.3.1...v0.4.0)

---
updated-dependencies:
- dependency-name: memmap2
  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 <you@example.com>
2021-09-17 10:00:12 -06:00
Jeff Washington (jwash) 376b20c3d2
AcctIdx: add some bucket flush helpers (#19965) 2021-09-17 10:41:30 -05:00
Jeff Washington (jwash) 4d8b3aa578
AcctsIdx: introduce dirty state per pubkey (#19960) 2021-09-16 21:36:23 -05:00
Jeff Washington (jwash) 58f25a8752
AcctIdx: move background() to AccountsIndexStorage (#19948) 2021-09-16 17:52:06 -05:00
Jeff Washington (jwash) 66e0fafc21
AccountsIndexStorage holds InMemAccountsIndex[] (#19947) 2021-09-16 21:12:22 +00:00
sakridge dc69cc1ae4
Only allow votes when root distance gets too high (#19917) 2021-09-16 15:12:26 +02:00
Jack May bd434d92e1
nit: misspelling (#19929) 2021-09-16 01:27:26 +00:00
dependabot[bot] fd60ef78eb
chore: bump flate2 from 1.0.21 to 1.0.22 (#19863)
* chore: bump flate2 from 1.0.21 to 1.0.22

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

---
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>
2021-09-15 14:30:30 -06:00
Jeff Washington (jwash) eddd583cd5
AcctIdx: pass bins to BucketMapHolder (#19906) 2021-09-15 18:07:53 +00:00
Jeff Washington (jwash) 99f2c746d1
AcctIdx: Put InMemAcctIndex behind arc (#19904) 2021-09-15 17:36:08 +00:00
Jeff Washington (jwash) b467e7fb3b
AcctIdx: remove auto Debug trait (#19905) 2021-09-15 09:54:16 -05:00
Brooks Prumo 8e3c420414
Add logging after taking a bank snapshot (#19891) 2021-09-15 07:39:21 -05:00
Jeff Washington (jwash) d3c80be7d5
AcctIdx: use stats() accessor (#19890) 2021-09-15 05:28:44 +00:00
Jeff Washington (jwash) 691bea8776
extract map to map() (#19883) 2021-09-14 23:08:17 -05:00
Jeff Washington (jwash) 229b378ed1
in-mem acct idx hash map uses rwlock (#19878) 2021-09-14 18:01:34 -05:00
Jeff Washington (jwash) fc647eed19
introduce trait IndexValue for accounts index (#19859) 2021-09-14 17:51:07 -05:00
Brooks Prumo 21bc7e94f5
Add logging of incremental snapshots to purge_old_snapshot_archives() (#19874) 2021-09-14 17:49:15 -05:00
Jeff Washington (jwash) 60276da1fd
rework acct idx entry to prepare for hashmap (#19875) 2021-09-14 15:27:23 -05:00
Jeff Washington (jwash) 2a795614d3
accounts index keys returns by value (#19858) 2021-09-14 09:38:59 -05:00
Jack May 00d7981f64
Fix native invoke writable privileges (#19750)
* Fix native invoke writable privileges

* build downstream spl bpf programs for tests
2021-09-13 22:57:37 -07:00
Jeff Washington (jwash) 910f241c3f
add <T> through accounts index (#19852) 2021-09-13 22:59:03 -05:00
Jeff Washington (jwash) b57e86abf2
cache account hash info (#19426)
* cache account hash info

* ledger_path -> accounts_hash_cache_path
2021-09-13 20:39:26 -05:00
Jeff Washington (jwash) dca49a614f
size and per-bin stats (#19842) 2021-09-13 19:26:49 -05:00
carllin 87a7f00926
Track reset bank in PohRecorder (#19810) 2021-09-13 16:55:35 -07:00
Brooks Prumo 3071c4caad
Set is_startup=true for exhaustively_free_unused_resource() (#19846) 2021-09-13 18:08:06 -05:00
Jeff Washington (jwash) e1a038e791
add stats inserts, deletes, updates_in_mem (#19807) 2021-09-13 15:59:01 -05:00
Brooks Prumo ef749a2506
Flush accounts cache before calling clean_accounts() (#19839) 2021-09-13 14:56:13 -05:00
Jeff Washington (jwash) c05226620f
metrics on accounts index entry (#19806) 2021-09-13 08:33:45 -05:00
Brooks Prumo 3f6eb96d6e
Call `Bank::update_accounts_hash()` before taking bank snapshot (#19765)
This is a bugfix.

When `load_frozen_forks()` called `snapshot_bank()`, the accounts hash
was not computed.  So then when a snapshot archive was eventually
created, its hash would be all 1s, which is clearly wrong.  The fix is
to update the bank's accounts hash before taking the bank snapshot.
2021-09-13 08:27:50 -05:00
Jeff Washington (jwash) d388c5c257
move update_key_if_exists to InMemAccountsIndex (#19803) 2021-09-13 08:27:21 -05:00
Jeff Washington (jwash) 3cea535fdb
InMemAccountsIndex::remove is no longer called (#19805) 2021-09-12 22:01:41 -05:00
Jeff Washington (jwash) b992c02708
in_mem_accounts_index filters by range (#19779) 2021-09-12 21:57:15 -05:00
Jeff Washington (jwash) 0263ffb2ed
move upsert and a handful of helpers to InMemAccountsIndex (#19799) 2021-09-12 21:54:09 -05:00
Jeff Washington (jwash) 3617d43e76
accounts index stats (#19797) 2021-09-12 22:14:59 +00:00
Jeff Washington (jwash) d9674f7ff0
consolidate another use of remove_if_slot_list_empty (#19804) 2021-09-12 19:05:44 +00:00
Brooks Prumo 62c8bcf565
Add default() to SnapshotConfig (#19776) 2021-09-12 13:44:27 -05:00
Jeff Washington (jwash) c9a3b8941f
move insert_new_entry_if_missing_with_lock into InMemAccountsIndex (#19800) 2021-09-12 13:39:29 -05:00
Jeff Washington (jwash) a295febf04
move remove_if_slot_list_empty to InMemAccountsIndex (#19801) 2021-09-12 10:26:04 -05:00
Jeff Washington (jwash) 361101bd31
rename generic V -> T. Matches intent better. V is now a larger type that contains T (#19798) 2021-09-12 10:25:09 -05:00
Giles Cope c9261e034e remove dev deps 2021-09-11 14:33:53 -07:00
Giles Cope c3a610374a unused deps 2021-09-11 14:33:53 -07:00
Jeff Washington (jwash) 91c3b18e1e
InMemAccountsIndex iter returns vec<owned> (#19778) 2021-09-11 20:33:04 +00:00
Jeff Washington (jwash) 7de2236284
accounts index get returns value (#19777) 2021-09-11 13:28:56 -05:00
Jeff Washington (jwash) ed7a6c6732
push use of AccountMapEntry one level deeper (#19775) 2021-09-11 02:09:51 +00:00
Jeff Washington (jwash) cba834808a
refactor generate_index zero lamports (#19769) 2021-09-10 23:46:08 +00:00
Jeff Washington (jwash) 595bba95b4
accounts index traits (#19768) 2021-09-10 18:32:10 -05:00
Jeff Washington (jwash) 9899cd359a
accounts index iterator uses copy of pubkey and account map entry (#19767) 2021-09-10 17:52:49 -05:00
Jeff Washington (jwash) 11b10439b4
factor out InMemAccountsIndex to prepare for disk index (#19773) 2021-09-10 17:52:25 -05:00
Brooks Prumo 7aa5f6b833
Add CLI args for incremental snapshots (#19694)
Add `--incremental-snapshots` flag to enable incremental snapshots.
This will allow setting `--full-snapshot-interval-slots` and
`--incremental-snapshot-interval-slots`.

Also added `--maximum-incremental-snapshots-to-retain`.

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-09-10 15:59:26 -05:00
Jeff Washington (jwash) 2de2c6ddd7
log accounts loaded for shrink stats (#19747) 2021-09-10 12:51:58 -05:00
Sean Young 098585234d Add return data implementation
This consists of:
 - syscalls
 - passing return data from invoked to invoker
 - printing to stable log
 - rust and C SDK changes
2021-09-10 14:25:54 +01:00
Alexander Meißner 88c1b8f047
Index loaders / executable accounts (#19469)
* Appends loaders / executable_accounts to accounts in transaction loading.

* Adds indices to loaders / executable_accounts.

* Moves MessageProcessor::create_keyed_accounts() into InvokeContext::push().

* Removes "executable_accounts",
now referenced by transaction wide index into "accounts".

* Removes create_pre_accounts() from InstructionProcessor,
as it is already in MessageProcessor.

* Collect program account indices directly in load_executable_accounts().
2021-09-10 08:36:21 +02:00
Jeff Washington (jwash) df5befdaca
metrics on rent partitions (#19728) 2021-09-09 10:50:35 -05:00
Jeff Washington (jwash) 8489ee7df9
Revert "collect rent in parallel for partitions (#19478)" (#19723)
This reverts commit 1560d5e3c3.
2021-09-08 21:27:08 -05:00
Jeff Washington (jwash) 97418bede3
introduce BinnedHashData type to improve some code readability (#19722) 2021-09-08 19:25:52 -05:00
Jeff Washington (jwash) 1cf7ae51f8
add comment (#19705) 2021-09-08 19:25:20 -05:00
Jeff Washington (jwash) 001ed66b4d
minor constant cleanup (#19721) 2021-09-08 18:26:10 -05:00
Tyera Eulberg 38bbb77989
Return error if Transaction contains writable executable or ProgramData accounts (#19629)
* Return error if Transaction locks an executable as writable

* Return error if a ProgramData account is writable but the upgradable loader isn't present

* Remove unreachable clause

* Fixup bpf tests

* Review comments

* Add new TransactionError

* Disallow writes to any upgradeable-loader account when loader not present; remove is_upgradeable_loader_present exception for all other executables
2021-09-08 15:21:52 -06:00
sakridge 3a8c678f62
Remove some copying (#19691) 2021-09-08 18:32:38 +02:00
Jeff Washington (jwash) 456bf15012
AccountsIndexConfig -> AccountsDbConfig (#19687) 2021-09-08 04:30:38 +00:00
Jeff Washington (jwash) d3f938f0cf
Remove Copy from AccountsIndexConfig. Not all types will support it (#19686) 2021-09-07 20:09:40 -05:00
Brooks Prumo 4a5f83d3a7
Add fn to check when to take snapshots (#19682) 2021-09-07 23:26:35 +00:00
Brooks Prumo a0552e5b46
Make startup aware of Incremental Snapshots (#19600) 2021-09-07 20:43:43 +00:00
Jeff Washington (jwash) 982454a455
refactor do_shrink_slot_stores (#19560) 2021-09-07 15:10:49 -05:00
Jeff Washington (jwash) 1560d5e3c3
collect rent in parallel for partitions (#19478)
* collect rent in parallel for partitions

* combine use

* use fg accounts db thread pool
2021-09-07 11:51:59 -05:00
Brooks Prumo 9d9482b9d8
Plumb `maximum_incremental_snapshot_archives_to_retain` (#19640) 2021-09-06 18:01:56 -05:00
Sean Young 8b9e472a6c feat: add ed25519 signature verify program
Solang requires a method for verify ed25519 signatures. Add a new
builtin program at address Ed25519SigVerify111111111111111111111111111
which takes any number of ed25519 signature, public key, and message.
If any of the signatures fails to verify, an error is returned.

The changes for the web3.js package will go into another commit, since
the tests test against a released solana node. Adding web3.js ed25519
testing will break CI.
2021-09-05 18:59:37 +01:00
Sean Young d461a9ac10 verify_precompiles needs FeatureSet
Rather than pass in individual features, pass in the entire feature set
so that we can add the ed25519 program feature in a later commit.
2021-09-05 18:59:37 +01:00
Brooks Prumo 333e5a9446
Make purge_old_snapshot_archives aware of maximum_incremental_snapshot_archives_to_retain (#19615) 2021-09-04 07:37:29 -05:00
Tyera Eulberg decec3cd8b
Demote write locks on transaction program ids (#19593)
* Add feature

* Demote write lock on program ids

* Fixup bpf tests

* Update MappedMessage::is_writable

* Comma nit

* Review comments
2021-09-04 03:05:30 +00:00
Jeff Washington (jwash) 7578db7ee3
add lowest_pubkey_from_bin (#19617) 2021-09-04 02:20:55 +00:00
Jeff Washington (jwash) b3fae0a01a
move constants in functions to global space (#19622) 2021-09-03 19:46:42 -05:00
Jeff Washington (jwash) e6055010eb
accounts index iterator takes &Range (#19618) 2021-09-03 18:00:49 -05:00
Jon Cinque 2c3bdedea3
stake: Advance `credits_observed` on activation epoch (#19309)
* stake: Advance `credits_observed` on activation epoch

* Add test for merging stakes just after activation
2021-09-03 23:20:56 +02:00
Brooks Prumo 5e25ee5ebe
Add maximum_incremental_snapshot_archives_to_retain to SnapshotConfig (#19612) 2021-09-03 20:21:32 +00:00
Brooks Prumo 7ab0aec61f
Rename maximum_full_snapshot_archives_to_retain (#19610)
To prepare for adding maximum_incremental_snapshot_archives_to_retain,
rename the current field in SnapshotConfig.
2021-09-03 11:28:10 -05:00
Jeff Washington (jwash) df040c05da
get rid of unneeded mut and refactor addref (#19594) 2021-09-03 10:45:37 -05:00
Jack May 170927b7c4
nit: Move builtins types to builtins file (#19597) 2021-09-02 21:29:11 -07:00
Jeff Washington (jwash) 3936c10aa0
rename var (#19588) 2021-09-03 00:55:35 +00:00
Jeff Washington (jwash) 9cc57fb076
remove file that accidentally got added (#19586) 2021-09-03 00:15:25 +00:00
Brooks Prumo e9374d32a3
Revert "Make startup aware of Incremental Snapshots (#19550)" (#19599)
This reverts commit d45ced0a5d.
2021-09-02 19:14:41 -05:00
Brooks Prumo d45ced0a5d
Make startup aware of Incremental Snapshots (#19550) 2021-09-02 19:05:15 -05:00
Jeff Washington (jwash) 57f51352f6
refactor AccountEntry addref/unref (#19583) 2021-09-02 23:25:27 +00:00