Commit Graph

41 Commits

Author SHA1 Message Date
Trent Nelson 5572d23efa
ci: deflake `Measurement` tests (#31812)
* measure: test timer and conversion separately

* measure: test `timing::duration_as_*()` directly...
2023-05-25 12:46:46 -06:00
Michael Vines 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
Jeff Washington (jwash) f8dcb2f38b
report mem stats (#21258) 2021-11-13 00:59:41 +00:00
Jeff Washington (jwash) 88fd9670df
add a few useful methods to AtomicInterval (#20152) 2021-09-24 10:27:23 -05:00
sakridge 84e78316b1
Write helper for multithread update (#18808) 2021-07-29 03:16:36 +02:00
Tyera Eulberg 5b2b824a53
Sdk: remove integer arithmetic (#15962)
* Fix timing

* Fix secp256k1_instruction

* Fix secp256k1 tests
2021-03-18 01:33:50 +00:00
Tyera Eulberg e3e8179f2d
Sdk: start to appease clippy's integer arithmetic check (#15736)
* Move to module-level clippy allowance

* Fix stake_weighted_timestamp math

* Fix genesis_config

* Fix shred_version

* Fix hard_forks

* Fix process_instruction

* Add ArithmeticOverflow ix error

* Fix nonce_keyed_account

* Update BankSlotDelta frozen abi due to new ix error
2021-03-08 18:37:57 -07:00
Ryo Onodera 40ccade5cc
Update to rust 1.44.0 (#10585)
* Update rust 1.44.0

* Update rust nightly 1.46.0

* Update docs

* Fix clippy errors

* Compile all source code with stable and nightly

* Add another note

* script tweaks

* Fix a test...

* Add another workaround

* Add hack

* Increase timeout...

* Revert "Add hack"

This reverts commit 5960f087203be8792ec0728a6755288c317a2788.

* Revert "Add another workaround"

This reverts commit e14300d01ffd1b8e86e676662177545549b45c13.

* Require nightly rustfmt and use older nightly a bit

* Improve document a bit

* Revert now not-existing clippy check...
2020-06-17 01:32:16 +09:00
Kristofer Peterson 58ef02f02b
9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Michael Vines 7d27be2a73 Upgrade to Rust 1.41.1 2020-02-28 10:10:42 -07:00
Tyera Eulberg 3ab8185777
Add intermittent Timestamping to Votes (#7233)
* Add intermittent timestamp to Vote

* Add timestamp to VoteState, add timestamp processing to program

* Print recent timestamp with solana show-vote-account

* Add offset of 1 to timestamp Vote interval to initialize at node boot (slot 1)

* Review comments

* Cache last_timestamp in Tower and use for interval check

* Move work into Tower method

* Clarify timestamping interval

* Replace tuple with struct
2019-12-06 14:38:49 -07:00
Tyera Eulberg 58c144ee55
Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api

* Add getBlockTime to docs

* Fix duration rounding for common tick/slot durations; add slot duration calculation

* Expose slots_per_year

* Use genesis values instead of clock defaults to calculate block offset

* Add get-block-time cli subcommand

* Fix test_rent: decrease magic number usage
2019-11-26 00:40:36 -07:00
Rob Walker 8a879faac7
add genesis stake placeholders (#6969)
* add investor stake placeholders

fixups

fixups

review comments, fixups

make more data-looky for easier management

rent may be zero

rework with more tables, derived keys

fixups

rebase-fix

fixups

fixups

* genesis is now too big to boot in 10 seconds
2019-11-21 12:05:31 -08:00
Jack May e8d88f3237
Split SDK's timing.rs (#5823) 2019-09-06 14:30:56 -07:00
Rob Walker 93ae98812b
change DEFAULT_NUM_TICKS_PER_SECOND to DEFAULT_TICKS_PER_SECOND (#5559) 2019-08-19 23:22:56 -07:00
Sagar Dhawan 7c12ecbe81
Fix unnecessary computation (#5055) 2019-07-12 11:30:37 -07:00
Sagar Dhawan 0a36a78133
Fix replicator segment selection (#5046) 2019-07-11 18:31:41 -07:00
Sagar Dhawan 35ec7a5156
Decouple turns from segments in PoRep (#5004)
* Decouple Segments from Turns in Storage

* Get replicator local cluster tests running in a reasonable amount of time

* Fix unused imports

* Document new RPC APIs

* Check for exit while polling
2019-07-10 13:33:29 -07:00
Sagar Dhawan b8e7736af2 Move SLOTS_PER_SEGMENT to genesis (#4992)
automerge
2019-07-09 16:48:40 -07:00
Pankaj Garg 38b44f2496
Reduce slot duration and consecutive leader slots (#4838)
* change consecutive leader slots to 4

* reduce polling frequency for transaction signature confirmation

* adjust wait time for transaction signature confirmation

* fix nominal test

* fix flakiness in wallet pay test
2019-07-01 13:21:00 -07:00
Sagar Dhawan 74a06e4230
Update thinclient to resend the same tx until its blockhash expires (#4807) 2019-06-24 16:46:34 -07:00
Rob Walker a49f5378e2
rewrite vote credits redemption to eat from rewards_pools on an epoch-sensitive basis (#4775)
* move redemption to rewards pools

* rewrite redemption, touch a few other things

* re-establish test coverage
2019-06-21 20:43:24 -07:00
Michael Vines 392a39dd54
Poh subsystem cleanup, genesis plumbing, enable real PoH on edge testnet (#4292)
* Remove unused PohServiceConfig::Step

* Clarify variable name

* Poh::hash() now takes an iteration counter

* man -> max

* Inline functions with single call site

* Move PohServiceConfig into GenesisBlock

* Add plumbing to enable real PoH on testnets

* Batch hashes to improve PoH hash rate

* Ensure a constant hashes_per_tick

* Remove PohEntry mixin field

* Poh/PohEntry no longer maintains tick_height

* Ensure a constant hashes_per_tick

* ci/localnet-sanity.sh: Use real PoH

* Rework Poh/PohService to keep PohRecorder unlocked as much as possible while hashing
2019-05-18 14:01:36 -07:00
Pankaj Garg c9b86018c6
Filter out all unprocessed transactions before forwarding them (#4266)
* Filter out all unprocessed transactions before forwarding them

* fix clippy
2019-05-13 14:40:05 -07:00
Pankaj Garg 133be2df51
Check for transaction forwarding delay to detect an expired transaction before forwarding it (#4249)
Also refactored code for forwarding packets, and added test for it
2019-05-10 14:28:38 -07:00
sakridge f4e40d2c41
Add bench-exchange tx send metrics (#3890) 2019-04-18 22:31:25 -07:00
carllin 4f232cbc27
Make MAX_RECENT_BLOCKHASHES <= MAX_HASH_AGE_IN_SECONDS (#3679)
* Make MAX_RECENT_BLOCKHASHES == MAX_HASH_AGE_IN_SECONDS
2019-04-09 11:45:25 -07:00
Pankaj Garg 56fcc93ef5
Schedule node for consecutive slots as leader (#3353)
* Also tweak epoch and slot duration

* new test for leader schedule
2019-03-19 06:36:45 -07:00
Pankaj Garg 8d2bd2b30f Reduce ticks per second
- It's improving TPS. Temp fix for beacons timeframe
2019-03-13 17:50:53 -07:00
anatoly yakovenko 0c592c52f6
Wake up replay stage when the poh bank is cleared. (#3211)
* wake up replay stage when the poh bank is cleared

* bump ticks per second

* Increase ticks per slot to match faster tick rate

* Remove check that working bank must be the bank for the greatest slot

* Make start_leader() skip starting TPU for slots we've already been leader for
2019-03-11 13:58:23 -07:00
anatoly yakovenko 1c0cfb17a3 Start leader based on Poh tick height. (#3084)
* Start leader based on poh and test

* Equalize validator and leader stakes in LocalCluster

* Clear WorkingBank on poh_recorder reset
2019-03-05 17:56:51 -08:00
Michael Vines a9a7fc56eb Purge MAX_RECENT_TICK_HASHES 2019-03-02 17:04:42 -08:00
Michael Vines a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
Michael Vines 176d5e0d37 Rename Transaction last_id field to recent_block_hash 2019-03-02 12:13:30 -07:00
Michael Vines d5de5bec4f Register a new last_id once per slot 2019-03-02 08:47:31 -08:00
Michael Vines fdc31e99df Clean up type casts 2019-03-01 13:38:17 -08:00
Michael Vines 67b6be66c8 Rename MAX_ENTRY_IDS 2019-03-01 13:38:17 -08:00
anatoly yakovenko 6dcb97af9e
Move PohService and PohRecorder out of banking_stage and into fullnode (#2852)
* Move PohService out of banking_stage and into fullnode.

* 10 second slots
2019-02-26 10:48:18 -08:00
Greg Fitzgerald dde886f058 Move Bank to its own crate
Also:
* counters.rs to solana_metrics
* genesis_block.rs to solana_sdk
2019-02-19 07:17:04 -07:00
Greg Fitzgerald d357640fbf Centralize decentralized timing constants 2019-02-18 19:46:58 -08:00
Michael Vines 6ac5700f2e Move metrics into its own crate 2018-11-16 15:10:07 -08:00