2497 Commits

Author SHA1 Message Date
84ac4ff57f add metrics around rewards (#24160) (#24168)
(cherry picked from commit 48d1af01c8)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-04-14 23:04:56 +00:00
95a279f310 Double the chunk size for sending the program binary data in tx
(cherry picked from commit 03ed334ebb)

# Conflicts:
#	programs/bpf/tests/programs.rs
2022-04-13 09:15:12 -07:00
15acdcc19a Bump version to v1.10.9 (#24253) 2022-04-11 13:30:11 -06:00
623ac6567b AcctIdx: fix infinite loop (#23806) (#23816)
(cherry picked from commit 965ab9186d)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-04-11 09:54:11 -05:00
a628034eb5 Bump version to v1.10.8 2022-04-09 00:06:32 -06:00
8bce2dd446 Address review comments
(cherry picked from commit a058f348a2)
2022-04-08 19:22:35 -05:00
60020632c1 Unittest for cost tracker after process_and_record_transactions
(cherry picked from commit 2ed29771f2)
2022-04-08 19:22:35 -05:00
864253a85b Adjustments to cost_tracker updates
- don't store pending tx signatures and costs in CostTracker
- apply tx costs to global state immediately again
- go from commit_or_cancel to update_or_remove, where the cost tracker
  is either updated with the true costs for successful tx, or the costs
  of a retryable tx is removed
- move the function into qos_service and hold the cost tracker lock for
  the whole loop

(cherry picked from commit 924b8ea1eb)
2022-04-08 19:22:35 -05:00
637ac7933b - Only commit successfully executed transactions' cost to cost_tracker;
- In-fly transactions are pended in cost_tracker until being committed
  or cancelled;

(cherry picked from commit 9e07272af8)
2022-04-08 19:22:35 -05:00
c5541efdc2 Set drop callback on first root bank (#23999) (#24129)
(cherry picked from commit 4ea59d8cb4)

Co-authored-by: carllin <carl@solana.com>
2022-04-05 20:32:17 +00:00
1b6de0f08d Bump version to v1.10.7 (#24105) 2022-04-04 11:20:53 -05:00
8d5c7b7d89 hides implementation details of vote-accounts from public interface (#24087) (#24102)
(cherry picked from commit ef3e3dce7a)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-04-04 15:08:21 +00:00
3f661f25fb improves Stakes::activate_epoch performance (#24068) (#24081)
Tested with mainnet stakes obtained from the ledger at 5 recent epoch
boundaries, this code is ~30% faster than current master.

Current code:
  epoch: 289, elapsed: 82901us
  epoch: 290, elapsed: 80525us
  epoch: 291, elapsed: 79122us
  epoch: 292, elapsed: 79961us
  epoch: 293, elapsed: 78965us

This commit:
  epoch: 289, elapsed: 61710us
  epoch: 290, elapsed: 55721us
  epoch: 291, elapsed: 55886us
  epoch: 292, elapsed: 55399us
  epoch: 293, elapsed: 56803us

(cherry picked from commit fa7eb7f30c)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-04-03 13:44:19 +00:00
b157a9111f Note this is a modified backport that does not SAVE the new fields, but does load them. (#24074)
Original:
Start saving/loading prior_roots(_with_hash) to snapshot (#23844)

    * Start saving/loading prior_roots(_with_hash) to snapshot

    * Update runtime/src/accounts_index.rs

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

    * Update runtime/src/accounts_index.rs

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

    * update comment

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

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-04-02 17:22:33 +00:00
a639282c0f Bump version to 1.10.6 (#23969) 2022-03-28 10:56:01 -05:00
0c740ebba6 Specify if archive size datapoint is for full or incremental snapshots (#23941) (#23957)
(cherry picked from commit 31b707b625)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-03-26 19:25:39 +00:00
fd49ed1959 Bump version to 1.10.5 (#23955) 2022-03-26 11:34:12 -05:00
f0c5962817 disable 'check_hash' on accounts hash calc (#23873) (#23902)
(cherry picked from commit 5a892af2fe)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-03-24 18:33:50 +00:00
2ed9655958 Set accounts_data_len on feature activation (#23730) (#23810)
(cherry picked from commit cb06126388)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-03-21 21:50:31 +00:00
15357480ec Refactor instruction compilation and update message account key ordering (#23729)
* Refactor: Make instruction compilation usable for other message versions

* apply trents feedback

* Fix tests

* Fix bpf compatiblity
2022-03-21 20:53:32 +08:00
258db77100 AcctIdx: factor 'scan' out of flush_internal (#23777) 2022-03-20 22:00:38 -05:00
f34434f96b Drop lock (#23765) 2022-03-20 21:27:24 -04:00
dd69f3baf5 throttle index adding to allow disk flushing to keep up and reduce startup ram usage (#23773) 2022-03-20 19:56:20 -05:00
335c4b668b Fix bug in bank/sysvar_cache tests (#23780) 2022-03-19 21:38:18 -05:00
df29276eb0 AcctIdx: remove -> evict (#23775) 2022-03-18 17:13:21 -05:00
a419374fa4 factor out function (#23742) 2022-03-18 14:10:52 -05:00
56428be629 Not exposing inner cost_table to encapsulating implementation details,
making future change easier.
2022-03-18 12:58:43 -05:00
998e7d18f9 AcctIdx: never retry a bucket flush (#23732) 2022-03-18 12:20:42 -05:00
0ed23899e7 directly use compute_budget MAX_UNITS and DEFAULT_UNITS 2022-03-18 08:53:11 -05:00
a4cacf3389 add deterministic default cost 2022-03-18 08:53:11 -05:00
857576d76f AcctIdx: move write to disk outside in mem write lock (#23731) 2022-03-17 23:09:41 -05:00
7ff8c80e25 Add accounts_data_len to bank snapshot (#23714) 2022-03-17 20:14:54 -05:00
664deb2157 AcctIdx: get rid of unused is_dirty (#23733) 2022-03-17 16:29:36 -05:00
2f58c9e501 Bump version to 1.10.4 (#23743) 2022-03-17 14:02:13 -05:00
66b1f55351 AcctIdx: cheaper check for should evict while flushing (#23705) 2022-03-17 08:46:32 -05:00
3a46f45650 AcctIdx: add stats for flushing and estimated memory (#23709) 2022-03-17 08:46:00 -05:00
b4350a2522 Make solana-address-lookup-table-program crate bpf compatible (#23700) 2022-03-17 08:21:07 +08:00
be0aeea01a AcctIdx: check for range holds outside lock (#23706) 2022-03-16 17:44:59 -05:00
caddb851be acct idx flush keeps slot_list read lock open (#23704) 2022-03-16 17:29:04 -05:00
fa7926580a minor VoteAccount refactoring (#23686) 2022-03-16 09:50:12 -05:00
3252dc7203 uses structural sharing for stake-delegations hash-map (#23585)
StakeDelegations is using Arc to implement copy-on-write semantics:
https://github.com/solana-labs/solana/blob/58c0db970/runtime/src/stake_delegations.rs#L14-L16

However a single delegation change will still clone the entire hash-map,
resulting in excessive memory use as observed in:
https://github.com/solana-labs/solana/issues/23061#issuecomment-1063444072

This commit instead uses immutable hash-map implementing structural
sharing:
> which means that if two data structures are mostly copies of each
> other, most of the memory they take up will be shared between them.
https://docs.rs/im/latest/im/
2022-03-16 12:58:05 +00:00
584ac80b1e Revert: KeyedAccount refactoings in builtin programs (#23649)
* Revert "Replaces KeyedAccount by BorrowedAccount in the BPF loader. (#23056)"

6c56eb9663

* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in `system_instruction_processor`. (#23217)"

ee7e411d68

* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in `nonce_keyed_account`. (#23214)"

1a68f81f89

* Revert "Replaces KeyedAccount by BorrowedAccount in the config processor. (#23302)"

a14c7c37ee

* Revert "Replaces `KeyedAccount` by `BorrowedAccount` in vote processor (#23348)"

e2fa6a0f7a

* Revert "Refactor: Prepare stake_instruction.rs to remove `KeyedAccount`s (#23375)"

ee3fc39f1c
2022-03-16 11:30:01 +01:00
2d3501dff9 make upsert infallible op 2022-03-15 17:05:41 -05:00
b5a99b9b09 avoid data copies in writing to cache (#23674) 2022-03-15 16:42:26 -05:00
29af42f428 chore: bump zstd from 0.11.0+zstd.1.5.2 to 0.11.1+zstd.1.5.2 (#23679)
* chore: bump zstd from 0.11.0+zstd.1.5.2 to 0.11.1+zstd.1.5.2

Bumps [zstd](https://github.com/gyscos/zstd-rs) from 0.11.0+zstd.1.5.2 to 0.11.1+zstd.1.5.2.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/commits)

---
updated-dependencies:
- dependency-name: zstd
  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 <you@example.com>
2022-03-15 15:31:14 -06:00
8c4f010b8d fix logging: only walk remote dir if it exist (#23663) 2022-03-15 08:56:22 -05:00
8c8f9694e0 Refactor: Sanitized transaction creation (#23558)
* Refactor: SanitizedTransaction::try_create optionally computes hash

* Refactor: Add SimpleAddressLoader
2022-03-15 12:02:22 +08:00
f05ac7a899 move to get_slots_in_epoch (#23657) 2022-03-14 22:47:45 -05:00
102dd68a03 Rename AccountsDb plugins to Geyser plugins (#23604) 2022-03-14 19:18:46 -06:00
c68c0e881e consolidate use-jit flag (#23652) 2022-03-14 15:00:00 -07:00