Commit Graph

672 Commits

Author SHA1 Message Date
Michael Vines 9720c894f1 Use commas to make a log message more readable 2020-01-06 22:31:01 -07:00
Ryo Onodera e5425d4a27
Fix AppendVec test breakage... (#7693) 2020-01-07 09:21:59 +09:00
Ryo Onodera 58e6d4aabb
Sanitize AppendVec's file_size (#7373)
* Check append vec file size

* Don't use panic

* Clean up a bit

* Clean up

* Clean ups

* Change assertion into sanization check

* Remove...

* Clean up

* More clean up

* More clean up

* Use assert_matches
2020-01-07 08:14:56 +09:00
Michael Vines e782c26908 Prune older epoch stakes 2020-01-04 09:34:27 -07:00
Trent Nelson 7e94cc2cc3 Move nonce into system program (#7645)
automerge
2020-01-03 16:34:58 -08:00
Rob Walker 63f185f9bf
Delete unused type (#7653) 2020-01-02 13:15:31 -08:00
Rob Walker e1ebaa902b
Add base pubkey to create_account_with_seed (#7636) 2019-12-29 16:42:24 -08:00
Rob Walker e0564f628e
Use lamports in genesis (#7631)
* Use lamports in genesis

* readability
2019-12-28 12:49:10 -08:00
Rob Walker 120c8f244c
Add slot_history for slashing (#7589)
* Add slot_history for slashing

* fixup

* fixup
2019-12-23 12:23:45 -08:00
Ryo Onodera c8fe4043b6
Rename slot_hash => bank_hash in AcoountsDB (#7579)
* Rename slot_hash => bank_hash in AcoountsDB
2019-12-23 10:50:31 +09:00
sakridge 7dec934bb3
Optimize lock_accounts mutex use (#7593)
Use the lock for the whole batch instead of per-tx
Optimize the critical section to pre-generate the keys necessary
before taking the lock.
2019-12-21 10:43:22 -08:00
Dan Albert ca10cf081f
Update cargo.toml files from 0.22.0 to 0.23.0 (#7596) 2019-12-20 21:45:42 -05:00
Ryo Onodera 3c361eb759
Check account hashes in snapshot (#7559)
* Check for incorrect hash value

* Finish up checking for incorrect hash value

* Fix comment a bit

Co-authored-by: sakridge <sakridge@gmail.com>
2019-12-20 09:39:30 +09:00
Tyera Eulberg 6aaf742dfe Extend getConfirmedBlock rpc to return account pre- and post-balances (#7543)
automerge
2019-12-18 09:56:29 -08:00
Ryo Onodera 629a4b5bf8
Strictly sanitize mmapped AppendVec file contents (#7464)
* Clean up align_to_8byte!

* small clean up

* Strictly sanitize mmapped AppendVec files

* Clean up

* Fix typo

* Rename align_to_8byte => u64_align

* Fix typo

* Clean up unsafe into methods of StoredAccount

* Made oddness more apparent

* Yet more clarification

* Promote a PR comment into a src comment

* Fix typo...

* Move ref_executable_byte out of tests impl
2019-12-18 14:10:36 +09:00
Trent Nelson 0ea2843ec9
Durable Nonce - Authorized Noncer (#7417)
* Durable Nonce: Add authorized noncer to initialize instruction

* CLI: Adapt to nonce authority

* Durable Nonce: Introduce Authorize instruction

* Specify who needs to sign  ix

* 'authorized-noncer' -> 'nonce-authority'

* Document signing authority for all instructions
2019-12-17 09:34:21 -05:00
Jack May 7c92bf15e2
Only return accounts that have changed since the bank's parent (#7520)
* Only return accounts that have changed since the bank's parent

* add test
2019-12-16 23:24:18 -08:00
Tyera Eulberg f03ed9f5bf
Add helper fn and runtime test (#7516) 2019-12-16 17:02:40 -07:00
dependabot-preview[bot] 7ad64c8d45 Bump serde from 1.0.103 to 1.0.104
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 08:50:09 -07:00
Rob Walker f05860672c
Add create-address-with-seed to solana-cli (#7472)
* Add create account with seed to cli

* clippy

* fixup
2019-12-14 04:38:24 -08:00
sakridge 9d5a07bac4
Move create_dir_all to AccountsDB::new (#7465)
AppendVec create doesn't need to try and create
paths every time and it can stall while snapshot
create is happening.
2019-12-13 16:46:16 -08:00
Rob Walker 777ae3c215
Add time since genesis to sysvar::clock (#7289)
* genesis timestamp

* remove clock::create_account()

* ..

* add configure-able creation time

* dividing by 1T, should be dividing by 1B
2019-12-12 14:03:43 -08:00
Rob Walker ea0ba19089
Add SystemInstruction::CreateAccountWithSeed (#7390)
* address generator

* coverage

* fixups

* remove ascii restriction

* illustrate that utf-8 doesn't expand the space
2019-12-12 11:12:09 -08:00
Ryo Onodera a1ab81a896
Include rent_epoch and executable into account hash (#7415)
* Clean a bit

* Add rent_epoch and executable into account hashing

* Remove comment and instead create an issue
2019-12-12 13:03:33 +09:00
sakridge 0aa4dc904e
Accounts index updates, remove pubkey when dead account (#7408) 2019-12-11 11:11:31 -08:00
Parth feeb1cb566
distribute leftover lamports (#7396)
* distribute leftover lamports

* add test scenario

* fix naming
2019-12-11 02:41:08 +05:30
dependabot-preview[bot] 6f457292ff Bump bincode from 1.2.0 to 1.2.1
Bumps [bincode](https://github.com/servo/bincode) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-10 10:00:56 -07:00
Parth 696cb298ab
put limit on account data length (#7320)
* put limit on account data length

* proper debug message
2019-12-10 22:17:11 +05:30
Rob Walker 39cd6dff7d
turn on rent (#7368)
* turn on rent

* add rent exempt balances for bootstrap accounts

* use Rent::free() when not testing rent
2019-12-09 21:56:43 -08:00
Trent Nelson 5d2b27d916 Address post-merge review for #7353 (#7378)
automerge
2019-12-09 12:54:10 -08:00
Justin Starry 43e608af47
Expose stake delegations from bank for winner tool (#7354)
* Expose stake delegations from bank

* cargo fmt

* Add test
2019-12-08 20:52:01 -08:00
Trent Nelson 059e631f41
Durable Nonce: Re-introduce Initialize instruction (#7353)
Toward an Authorized Noncer
2019-12-08 10:16:55 -07:00
dependabot-preview[bot] 891767c6b7 Bump serde_json from 1.0.42 to 1.0.44
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.42 to 1.0.44.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.42...v1.0.44)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-08 09:43:24 -07:00
Trent Nelson 1ffd6b4b4d
Add program and runtime support for Durable Transaction Nonces (#6845)
* Rework transaction processing result forwarding

Durable nonce prereq

* Add Durable Nonce program API

* Add runtime changes for Durable Nonce program

* Register Durable Nonce program

* Concise comments and bad math

* Fix c/p error

* Add rent sysvar to withdraw ix

* Remove rent exempt required balance from Meta struct

* Use the helper
2019-12-07 12:54:10 -07:00
Justin Starry b7d4330dd4
Fail fast if account paths cannot be canonicalized (#7300)
* Canonicalize account paths to avoid symlink issues

* fixes
2019-12-05 21:41:29 -05:00
sakridge cfc21e1225
Only serialize rooted append vecs (#7281) 2019-12-05 14:27:46 -08:00
Parth 0d1fed78af Pay rent to validators (#7164)
automerge
2019-12-05 06:10:34 -08:00
Jack May 9485eba73d
nudge (#7279) 2019-12-04 19:28:20 -08:00
Jack May 23c4a7dc49
nudge (#7280) 2019-12-04 19:28:00 -08:00
Jack May 9b172879a2
Remove deprecated solana_entrypoint macro (#7257) 2019-12-04 00:42:50 -08:00
Parth ba688cf629
enforce proper range for rent burn_percent (#7217)
* enforce proper range for burn_percent
2019-12-04 00:54:01 +05:30
Rob Walker d5c8b26a45
bank_leak_mac_os (#7209) 2019-12-03 00:09:05 -08:00
Rob Walker f9df17d8d0
track bank size (#7144)
* track bank size

* support non-linux a bit better
2019-12-02 13:47:20 -08:00
Sagar Dhawan 0e2e13f018 Update usages of u64 to Slot (#7191)
automerge
2019-12-02 11:57:40 -08:00
sakridge 887bff572a
More conservative purge_zero_lamport_accounts purge logic (#7157) 2019-12-02 09:51:05 -08:00
dependabot-preview[bot] 0f872af502 Bump libc from 0.2.65 to 0.2.66 (#7180)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.65 to 0.2.66.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.65...0.2.66)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 09:56:03 -07:00
dependabot-preview[bot] 7f4feaee08 Bump serde from 1.0.102 to 1.0.103 (#7163)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.102...v1.0.103)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 09:10:25 -07:00
Rob Walker 8d75efdc58
genesis config hashmaps (#7107) 2019-11-26 19:23:37 -08:00
dependabot-preview[bot] c810913861 Bump serde_derive from 1.0.102 to 1.0.103 (#7141)
automerge
2019-11-26 14:44:20 -08:00
dependabot-preview[bot] 2b13158e29 Bump serde_json from 1.0.41 to 1.0.42 (#7142)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.41 to 1.0.42.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.41...v1.0.42)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 15:09:01 -07:00