Commit Graph

956 Commits

Author SHA1 Message Date
sakridge 770d3d383c
Accounts hash calculation metrics (#11433) 2020-08-06 21:39:10 -07:00
Greg Fitzgerald 3fdd8ffdf0
Remove circular dep between InstructionError and SystemError (#11427) 2020-08-06 22:04:43 +00:00
Jack May 03263c850a
Force program address off the curve (#11323) 2020-08-05 16:35:54 -07:00
Trent Nelson e12ab9d0dd Bump version to 1.4.0 2020-08-05 12:04:15 -06:00
Trent Nelson 29b3265dc7 Sanitize transactions during RPC preflight test 2020-08-05 06:06:57 +00:00
Trent Nelson 3f73affb2e Add From for SanitizeError > TransactionError 2020-08-05 06:06:57 +00:00
Michael Vines 1d40685b8e Remove support for 1.1.0 version snapshots 2020-08-04 01:01:50 +00:00
Michael Vines 7db144c5da Remove legacy_system_instruction_processor0 2020-08-04 00:45:09 +00:00
Michael Vines eefcf484cb clippy 2020-08-03 18:35:15 +00:00
Greg Fitzgerald 1d2426ddbc
Move simulate_transaction from rpc to bank (#11294) 2020-07-30 19:15:45 +00:00
Jack May 2dbed80e48
Disable cross-program invocations for OperatingMode::Stable (#11272) 2020-07-29 15:29:52 -07:00
Trent Nelson e553a98d2f Rerere-enable RecentBlockhashes fix on testnet (epoch 76) 2020-07-29 02:43:10 +00:00
Ryo Onodera 3e4f49f9c9
Fix race condition between shrinking and cleaning (#11235)
* Fix race condition between shrinking and cleaning

* Minor formatting

* fix ci

* Update comments

* More update comment

* Adjust fn naming
2020-07-29 06:06:14 +09:00
Michael Vines ed01591be6 Designate mainnet-beta epoch 61 as an upgrade epoch 2020-07-27 11:41:39 -07:00
Trent Nelson 7931579610 Remove accidental MB activation for RecentBlockhashes consistency fix 2020-07-26 17:34:52 +00:00
Trent Nelson 1f8df36b7d Push back activation epochs
Effects:
- Re-enabling inflation
- Nonce FeeCalculator overwrite / RecentBlockhashes sysvar inconsistency fix
2020-07-24 12:54:31 -06:00
carllin 6578ad7d08
Speed up local cluster partitioning tests (#11177)
* Fix long local cluster partition tests by skipping slot warmup

Co-authored-by: Carl <carl@solana.com>
2020-07-23 18:50:42 -07:00
Tyera Eulberg ca6480a8ac
Use OrderedIterator in collect_balances (#11166) 2020-07-23 13:35:10 -06:00
Jack May e75f0bdfd3
panic on native load failure (#11182) 2020-07-23 12:11:01 -07:00
Tyera Eulberg b5a6a2f461
Initialize BlockCommitmentCache slot and root on node boot (#11178)
* Initialize commitment-cache slot and root on node boot

* Ignore long tests
2020-07-23 11:44:57 -06:00
Michael Vines a5dd848702 getEpochInfo RPC endpoint now includes the current block height 2020-07-21 17:24:07 -07:00
Tyera Eulberg 6c38369042
Use OrderedIterator in TransactionStatusService (#11149)
* Split out get-first-err for unit testing

* Add failing test

* Add missing ordering
2020-07-21 20:06:49 +00:00
Rob Walker 7cc2a6801b
fix rewards points (#10914)
* fix rewards points

* fixups

* * verify that we don't spend more in rewards than we've allocated for rewards
* purge f64s from calculations that could be done with integers

* test typical values

* simplify iteration over delegations some

* fixups

* Use try_from

* Add a comment for commission_split()

* Add assertion to detect inconsistent reward dist.

* Fix vote_balance_and_staked

* Don't overwrite accounts with stale copies

* Fix CI...

* Add tests for vote_balance_and_staked

* Add test for the determinism of update_rewards

* Revert "Don't overwrite accounts with stale copies"

This reverts commit 9886d085a69d695f48970f48f2f567e62ba05414.

* Make stake_delegation_accounts to return hashmap

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-07-21 13:57:25 +09:00
Greg Fitzgerald 23c2e55cbf
Use BlockCommitmentCache for RPC slots, take 2 (#11137)
* Use BlockCommitmentCache for RPC slots (#11103)

* Add BankForks::highest_descendant(slot)

* Update debug messages

* Update core/src/rpc.rs

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

* cargo fmt

* Remove highest_descendant

* Fix test

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

* Fix crossed-in-flight compilation error

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-07-20 23:03:40 +00:00
Ryo Onodera 3db246f596
Add --warp-epoch and --force-inflation to ledger-tool cap. (#11107)
* Add --warp-epoch and --force-inflation to ledger-tool cap.

* Add more arguments

* Address review comments

* Fix message

* Fix various typos...
2020-07-20 19:09:38 +09:00
Michael Vines d19cd3a18a
Revert "Use BlockCommitmentCache for RPC slots (#11103)" (#11122)
This reverts commit 815b0f31b4.
2020-07-18 16:39:12 -07:00
Greg Fitzgerald 815b0f31b4
Use BlockCommitmentCache for RPC slots (#11103)
* Add BankForks::highest_descendant(slot)

* Update debug messages

* Update core/src/rpc.rs

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

* cargo fmt

* Remove highest_descendant

* Fix test

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-07-17 16:22:27 -06:00
Tyera Eulberg a255b0fc86
Rename CacheSlotInfo to CommitmentSlots (#11111) 2020-07-17 17:54:49 +00:00
Michael Vines e5d8c4383f Add Bank support for "upgrade epochs" where all non-vote transactions will be rejected 2020-07-17 08:48:42 -07:00
Tyera Eulberg fdff681bcc
Simplify BlockCommitmentCache slot info (#11106)
* Refactor BlockCommitmentCache, store a CacheSlotInfo

* Comma
2020-07-17 09:24:51 -06:00
Tyera Eulberg 1da9f9f05a
Gate nonce-overwrite change (#11081) 2020-07-15 21:45:30 +00:00
sakridge 8bf3a0aa05
accounts_clean: Convert stack dependency calculation with iterative (#11067)
* accounts_clean: Convert stack dependency calculation with iterative

* optimize clean with by creating a reverse-lookup hashset of the affected
keys

* Add dependency bench

reduce bench

* Huge clean
2020-07-15 06:49:22 -07:00
Trent Nelson 5741002a32 Mode gate RecentBlockhashes/BlockhashQueue sync 2020-07-14 00:36:31 +00:00
Trent Nelson 51283c931c Fix test advancing banks from incomplete slots 2020-07-14 00:36:31 +00:00
Trent Nelson 837ac77c02 Bump goldens 2020-07-14 00:36:31 +00:00
Trent Nelson 5357ff6d60 Synchronize BlockhashQueue and RecentBlockhashes sysvar update 2020-07-14 00:36:31 +00:00
Trent Nelson 9cc379af6c Factor locked portion of Bank::update_recent_blockhashes() out to helper 2020-07-14 00:36:31 +00:00
Tyera Eulberg 942c019d50 Add failing test 2020-07-14 00:36:31 +00:00
dependabot-preview[bot] cee9177ec7 Bump libc from 0.2.71 to 0.2.72
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.71 to 0.2.72.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.71...0.2.72)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 15:00:27 -07:00
Ryo Onodera de379a8cd6
Ensure to digest non-empty snapshot_storages and add asserts (#11021)
* Add asserts to detect not-digestable example data

* Ensure to digest non-empty snapshot_storages
2020-07-13 15:58:34 +00:00
Kristofer Peterson ed5a2f2a90
Fold bank serialisation into serde snapshot (#10581)
* Move bank (de)serialisation logic from bank and snapshot_utils to serde_snapshot.
Add sanity assertions between genesis config and bank fields on deserialisation.
Atomically update atomic bool in quote_for_specialization_detection().
Use same genesis config when restoring snapshots in test cases.

* Tidy up namings and duplicate structs to version

* Apply struct renames to tests

* Update abi hashes

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-07-13 23:00:59 +09:00
sakridge edf2b1ee85
Check for deleting key, make sure list is empty again (#11007) 2020-07-11 20:38:34 -07:00
Greg Fitzgerald 145906123a
Simplify use of SendTransactionService (#10999)
* Send transaction upon recv

This will allow us to move the channel to the public interface

* Use a channel, not a method, to communicate

* Pipeline the services

* Ignore unused return values

* Fix clippy warning
2020-07-11 01:14:41 +00:00
Jack May 57576b07ef
Fix warnings (#10992)
* Fix warnings

* disable warning
2020-07-10 20:02:55 +00:00
sakridge 631f051c68
Add jitter to cleanup to prevent all nodes cleaning at the same time (#10936) 2020-07-10 11:54:45 -07:00
sakridge 1f5070e569
Add custom print for Bloom object (#10971) 2020-07-10 11:53:24 -07:00
Ryo Onodera f1c1152948
Fix skipped slot detection for eager rent collect (#10890) 2020-07-10 08:49:18 +09:00
Tyera Eulberg 25228ca957
Fix nonce fee_calculator overwrite (#10973)
* Add failing test

* Pass fee_calculator to prepare_if_nonce_account; only overwrite in error case
2020-07-09 20:22:21 +00:00
Greg Fitzgerald 16eeea4f82
Move SendTransactionService to solana_runtime (#10972) 2020-07-09 18:28:26 +00:00
Greg Fitzgerald ebadbce920
Drop bank from BlockCommitmentCache (#10959)
* Remove bank reference from BlockCommitmentCache

* Don't use a Bank to create BlockCommitmentCache

* Rename recent_slot to slot
2020-07-09 00:50:13 +00:00