2497 Commits

Author SHA1 Message Date
9e9a1a4876 AcctIdx: AccountInfo.lamports private (#21819) 2021-12-13 10:59:33 -06:00
c9e0bde407 AcctIdx: AccountInfo::stored_size private (#21821) 2021-12-13 10:10:06 -06:00
90f41fd9b7 use cost model to limit new account creation (#21369)
* use cost model to limit new account creation

* handle every system instruction

* remove &

* simplify match

* simplify match

* add datapoint for account data size

* add postgres error handling

* handle accounts:unlock_accounts
2021-12-12 14:57:18 -06:00
025a5a3b9c AccountInfo: construct with new() (#21788) 2021-12-12 14:36:05 -06:00
825f8bcea4 use AppendVecId instead of usize (#21792) 2021-12-11 21:38:13 -06:00
c5b6ea74ef replace some .lamports checks with trait (#21783) 2021-12-11 21:37:33 -06:00
4c0373b72a introduce AtomicAppendVecId (#21793) 2021-12-11 21:34:35 -06:00
ef7f49a21d move AccountInfo to its own file (#21784) 2021-12-11 11:47:05 -06:00
eeb97fe7ce Add accounts_data_len to Bank (#21781) 2021-12-11 09:34:38 -06:00
2bbe1d875a Deserialize accounts before acquiring stakes cache lock (#21733)
* Deserialize stored accounts before locking stakes cache

* fix test
2021-12-10 16:02:35 -05:00
9b41ddd9ba Add address lookup table program (#21616)
* Add address lookup table program

* feedback
2021-12-10 16:02:16 -05:00
ec7e17787e Compute accounts data len during generate_index() (#21757) 2021-12-10 13:27:59 -06:00
80eae20610 Fix master fmt 2021-12-10 11:33:39 -07:00
350845c513 Move type alias and use it more broadly (#21763) 2021-12-10 10:46:21 -07:00
fd175c1ea9 Add StakesCache struct to abstract away locking (#21738) 2021-12-10 10:51:33 -05:00
622fd7c7ec testing for the latest changes 2021-12-10 19:44:22 +05:30
d870f566ef chore: bump serde from 1.0.130 to 1.0.131 (#21758)
* chore: bump serde from 1.0.130 to 1.0.131

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.130 to 1.0.131.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.131)

---
updated-dependencies:
- dependency-name: serde
  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-12-10 08:47:46 +00:00
c1386d66e6 Nits in message-processor (#21755)
* Fixup typo

* Simplify types slightly
2021-12-09 23:38:36 -07:00
16a6dceb6b impl better debug for Ancestors (#21737) 2021-12-09 18:36:13 -06:00
1528f85112 Add return types to generate_index() (#21735) 2021-12-09 17:15:13 -06:00
6fc329180b Add more reporting for invalid stake cache members and prune them (#21654)
* Add more reporting for invalid stake cache members

* feedback
2021-12-09 14:12:11 -05:00
a2df1eb502 AcctIdx: disk generate index and filler accounts use more threads (#21566) 2021-12-09 11:54:14 -06:00
58a7d3fc0e AcctIdx: disable direct to disk for filler account upsert (#21710) 2021-12-09 10:14:57 -06:00
0090916735 skip clean on startup, too (#21718) 2021-12-09 09:36:02 -06:00
e020960f49 AcctIdx: generate index goes to mem not disk (#21709) 2021-12-08 19:48:12 -06:00
54862eba0d AcctIdx: env var to enable testing of disk buckets (#21494) 2021-12-08 19:47:25 -06:00
181c0092d6 AcctIdx: resize in-mem after startup for disk index (#21676) 2021-12-08 16:52:22 -06:00
8d1e5ac294 refactor and test scan abort code (#21390) 2021-12-08 14:09:34 -06:00
f0acf7681e Add vote instructions that directly update on chain vote state (#21531)
* Add vote state instructions

UpdateVoteState and UpdateVoteStateSwitch

* cargo tree

* extract vote state version conversion to common fn
2021-12-07 16:47:26 -08:00
1df88837c8 - Implicitly fixes invoke_context.return_data not being reset between instructions in process_message. (#21671)
- Lets InvokeContext::process_cross_program_instruction() handle the first invocation depth too.
- Marks InvokeContext::verify(), InvokeContext::verify_and_update() and InvokeContext::process_executable_chain() private.
- Renames InvokeContext::process_cross_program_instruction() to InvokeContext::process_instruction().
- Removes InvokeContext::new_mock_with_sysvars().
2021-12-07 23:00:04 +01:00
f6801a4af4 chore: bump itertools from 0.10.1 to 0.10.3 (#21643)
* chore: bump itertools from 0.10.1 to 0.10.3

Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.1 to 0.10.3.
- [Release notes](https://github.com/rust-itertools/itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.1...v0.10.3)

---
updated-dependencies:
- dependency-name: itertools
  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-12-06 23:23:26 -07:00
da4015a959 Ensure that StakeDelegations and StakeHistory serde (#21640)
Add tests to StakeDelegations and StakeHistory to ensure that the outer
types serialize and deserialize correctly to/from the inner types.
2021-12-06 17:34:10 -06:00
a1adcb23b6 Remove activated feature for filtering invalid stakes from rewards (#21641) 2021-12-06 17:56:05 -05:00
3dab1e711d Move transaction error code into new module (#21635) 2021-12-06 12:45:33 -05:00
d6f22433d0 Bump version to v1.10.0 2021-12-04 20:17:54 +00:00
46fe56171b Make StakeHistory clone-on-write (#21573) 2021-12-03 12:10:29 -06:00
1430b58a6d Remove deprecated slow epoch boundary methods (#21568) 2021-12-03 17:59:10 +00:00
b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
0ef1b25e4b Make StakeDelegations clone-on-write (#21542) 2021-12-03 08:54:38 -06:00
1a4a039913 Adds feature reject_empty_instruction_without_program. (#21591) 2021-12-03 15:47:18 +01:00
a9d5ef2055 Cleanup: InvokeContext accessors (#21574)
* Removes blockhash accessors from InvokeContext.

* Removes lamports_per_signature accessors from InvokeContext.

* Removes return_data accessors from InvokeContext.

* Removes feature_set accessor from InvokeContext.

* Removes instruction_recorders and instruction_index accessors from InvokeContext.

* Moves get_sysvars() into InvokeContext.

* Removes compute_meter parameter from InvokeContext::new().

* Removes InvokeContext::new_mock_with_sysvars_and_features().

* Removes InvokeContext::update_timing().
2021-12-03 12:15:22 +01:00
bdc33ba0a1 Remove unnecessary Option (#21569) 2021-12-02 20:19:22 +00:00
bf5b7f5d7f report compute units without tx_wide_compute_cap feature enabled (#21421) 2021-12-02 12:14:57 -06:00
f0b32b75ab AcctIdx: use ZeroLamport trait (#21552) 2021-12-02 12:10:11 -06:00
314605e149 AcctIdx: test cleanup (#21550) 2021-12-02 12:09:37 -06:00
976eb81d4f Cleanup the bank's use of nonces (#21246) 2021-12-02 09:57:05 -08:00
bfdb775ffc Unifies ThisInvokeContext and dyn trait InvokeContext. (#21563) 2021-12-02 18:47:16 +01:00
8dfa83c579 AcctIdx: minor code cleanup (#21547) 2021-12-02 11:05:54 -06:00
6bb884836c address review feedback - use u64 instead of usize 2021-12-02 08:12:30 -08:00
adbf31b98c avoid usize overflow for MAXIMUM_APPEND_VEC_FILE_SIZE on 32-bit platforms 2021-12-02 08:12:30 -08:00