Commit Graph

23210 Commits

Author SHA1 Message Date
Pankaj Garg fc35b13365
Cleanup load_program() in bank.rs (#32146) 2023-07-21 13:43:46 -07:00
Andrew Fitzgerald a7eda70ddb
Preliminary Changes for Updating Cargo (#32547) 2023-07-21 13:43:00 -07:00
behzad nouri 952d8861c6
removes feature-gate code for updating rewards from cached accounts (#32514) 2023-07-21 19:52:44 +00:00
HaoranYi 9e8639f7ae
Add distributed rewards for the block in partitioned reward metrics (#32580)
report distributed rewards for the block in metrics

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-21 14:42:52 -05:00
Pankaj Garg faff34403c
Move bank dependent tests out of serde_snapshot/tests.rs (#32571) 2023-07-21 12:08:32 -07:00
Yihau Chen 261007bb43
ci: fix post-command logic (#32587) 2023-07-21 17:41:33 +00:00
Yihau Chen a7b5664a30
ci: only upload the test result when the token is present (#32583) 2023-07-21 23:53:01 +08:00
behzad nouri 9efa0eacac
rolls out merkle shreds to ~20% of mainnet slots (#32532) 2023-07-21 14:37:57 +00:00
dependabot[bot] 5752505548
Bump serde from 1.0.171 to 1.0.174 (#32575)
* Bump serde from 1.0.171 to 1.0.174

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.171 to 1.0.174.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.171...v1.0.174)

---
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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-07-21 13:46:21 +00:00
dependabot[bot] 9553302052
Bump serde_yaml from 0.9.22 to 0.9.25 (#32576)
* Bump serde_yaml from 0.9.22 to 0.9.25

Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.22 to 0.9.25.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.22...0.9.25)

---
updated-dependencies:
- dependency-name: serde_yaml
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-07-21 13:45:43 +00:00
dependabot[bot] 1e8fc573ce
Bump syn from 2.0.25 to 2.0.27 (#32577)
* Bump syn from 2.0.25 to 2.0.27

Bumps [syn](https://github.com/dtolnay/syn) from 2.0.25 to 2.0.27.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.25...2.0.27)

---
updated-dependencies:
- dependency-name: syn
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-07-21 13:45:09 +00:00
dependabot[bot] 9020c77c33
Bump signal-hook from 0.3.15 to 0.3.17 (#32578)
* Bump signal-hook from 0.3.15 to 0.3.17

Bumps [signal-hook](https://github.com/vorner/signal-hook) from 0.3.15 to 0.3.17.
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/signal-hook/compare/v0.3.15...v0.3.17)

---
updated-dependencies:
- dependency-name: signal-hook
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-07-21 13:44:26 +00:00
dependabot[bot] 11e77d17eb
Bump anyhow from 1.0.71 to 1.0.72 (#32574)
* Bump anyhow from 1.0.71 to 1.0.72

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.71...1.0.72)

---
updated-dependencies:
- dependency-name: anyhow
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-07-21 13:43:43 +00:00
dependabot[bot] 0ef6944717
Bump reqwest from 0.11.17 to 0.11.18 (#32484)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.17 to 0.11.18.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](seanmonstar/reqwest@v0.11.17...v0.11.18)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-20 22:38:39 -07:00
dependabot[bot] 124b5b0996
Bump tokio-stream from 0.1.12 to 0.1.14 (#32486)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.12 to 0.1.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/tokio-0.1.14/CHANGELOG.md)
- [Commits](tokio-rs/tokio@46f974d8cfcb56c251d80cf1dc4a6bcf9fd1d7a0...398dfda56d3ee4b0d4d9e86abe15039e86979d83)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-20 22:36:57 -07:00
Trent Nelson b81678fd6e
ci: harden buildkite `group` generator (#32568) 2023-07-21 03:22:44 +00:00
Tao Zhu 19f5b49abb
Priority queue supports deprecated compute budget ix (#32567)
Supports deprecated compute budget instruction when getting transaction's priority details
2023-07-20 19:17:56 -05:00
dependabot[bot] 15f948b47c
Bump proc-macro2 from 1.0.64 to 1.0.66 (#32530)
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.64 to 1.0.66.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](dtolnay/proc-macro2@1.0.64...1.0.66)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-20 16:26:43 -07:00
dependabot[bot] dd049f56b4
Bump socket2 from 0.4.9 to 0.5.3 (#32531)
Bumps [socket2](https://github.com/rust-lang/socket2) from 0.4.9 to 0.5.3.
- [Release notes](https://github.com/rust-lang/socket2/releases)
- [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md)
- [Commits](rust-lang/socket2@v0.4.9...v0.5.3)

---
updated-dependencies:
- dependency-name: socket2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-20 16:24:39 -07:00
Brooks faa002c2b6
Adds error types for all of `add_bank_snapshot()` (#32564) 2023-07-20 18:30:19 -04:00
steviez d73fa1b590
Re-enable periodic compaction on several columns (#32548)
Periodic compaction was previously disabled on all columns in #27571 in
favor of the delete_file_in_range() approach that #26651 introduced.
However, several columns still rely on periodic compaction to reclaim
storage. Namely, the TransactionStatus and AddressSignatures columns, as
these columns contain a slot in their key, but as a non-primary index.

The result of periodic compaction not running on these columns is that
no storage space is being reclaimed from columns. This is obviously bad
and would lead to a node eventually running of storage space and
crashing.

This PR reintroduces periodic compaction, but only for the columns that
need it.
2023-07-20 16:34:42 -05:00
Greg Cusack 80f708298b
Report new received crds signatures and their respective origins to metrics (#32504)
* screwed up old branch and syncing with upstream branch

* add fixed size ring buff instead of variable sized vecdeque for reporting signatures

* modify difficulty to take in n 0 bits and check if signature ending ends in n 0 bits

* update to only push every 18 trailing zero bits. and clean up

* report origin with signature. and set trailing 0s to 8 for local testing

* change back to 18 trailing zeros and rm unused imports

* run cargo rmt

* run ./scripts/cargo-for-all-lock-files.sh tree

* allow integer arithmetic for bit comparison

* rm unused lifetime

* rm duplicate entry?

* re implement ring buf

* put ringbuf in sorted order

* ringbuf in cargo.toml now in sorted order

* rm ring buf, refactor, fix trailing zero bug

* fix bug in trailing zeros. was comparing wrong ones

* fix needless range loop bug

* fix bug

* change trailing zero checking to build in methods and only report first 8 bytes of signature and origin pubkey

* report full origin string and first 8 bytes of signature

* set SIGNATURE_SAMPLE_TRAILING_ZEROS back to 18

* forgot to run cargo tree

* avoid panic and change working

* rm bs58

* pass in Option<String> into datapoint_info

* shorten metric names
2023-07-20 14:33:40 -07:00
Will Hickey 83ac15dd97
Remove inappropriate use of usize. Refactor upcast. (#32539)
* Remove inappropriate use of usize. Refactor upcast.
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-07-20 14:53:08 -05:00
dependabot[bot] be10168674
Bump serde_json from 1.0.102 to 1.0.103 (#32529)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.102...v1.0.103)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-20 12:11:15 -07:00
Brooks 979913e1d5
Returns Self instead of Result<Self> for AccountsPackage::new_for_snapshot() (#32545) 2023-07-20 12:52:31 -04:00
Brooks 3fbfac41da
AccountsBackgroundService gracefully exits when snapshot request handling errors (#32543) 2023-07-20 11:53:06 -04:00
Jeff Washington (jwash) 0f70098410
allow shrinking to be in progress during `scan_account_storage` (#32553) 2023-07-20 08:01:10 -07:00
behzad nouri 7f2f0136bd
enables merkle shreds for devnet and development clusters (#32533) 2023-07-20 12:47:28 +00:00
Trent Nelson 1ce26ecba0
remove references to eol helloworld example repo (#32550) 2023-07-20 00:35:54 -05:00
carllin b6927db6a8
Detect duplicates in the same insert batch (#32528) 2023-07-19 21:17:59 -04:00
Brooks 6d30429dd1
Replaces `unwrap` with `?` when writing snapshot version file (#32542) 2023-07-19 16:42:46 -04:00
steviez d8516eea4c
Remove unnecessary clone of shred payload (#32540) 2023-07-19 15:34:16 -05:00
steviez c2ae30eb4d
Simplify signature for Blockstore::is_shred_duplicate() (#32537)
The existing signature unpacked elements from a Shred and took an owned
Vec<u8>, forcing a .clone() from the caller. The Shred can be passed in
directly to simplify argument list and avoid the clone.
2023-07-19 13:54:29 -05:00
behzad nouri a8b0c92873
simplifies update_stakes_cache implementation (#32534) 2023-07-19 18:13:30 +00:00
dependabot[bot] 3b8bcb4f7e
Bump tar from 0.4.38 to 0.4.39 (#32485)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.38 to 0.4.39.
- [Commits](alexcrichton/tar-rs@0.4.38...0.4.39)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-19 02:10:52 -07:00
dependabot[bot] dba39d9134
Bump word-wrap from 1.2.3 to 1.2.4 in /docs (#32527)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-18 18:29:00 -07:00
dependabot[bot] 275e227516
Bump serde_json from 1.0.100 to 1.0.102 (#32472)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.100 to 1.0.102.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.100...v1.0.102)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-18 18:21:44 -07:00
dependabot[bot] 9e22595857
Bump serde from 1.0.168 to 1.0.171 (#32456)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.168 to 1.0.171.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.168...v1.0.171)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Signed-off-by: Illia Bobyr <illia.bobyr@solana.com>
2023-07-18 18:15:57 -07:00
steviez 106c5569d3
Use Slot type instead of u64 for clarity (#32525) 2023-07-18 15:42:35 -05:00
samkim-crypto 5d9c1d8e36
big_mod_exp syscall: exclude inputs of numbers larger than 4096-bits (#32520)
* limit inputs length

* fix clippy

* add test_syscall_big_mod_exp test

* cargo fmt

* add SBPFVersion

---------

Co-authored-by: valiksinev <valiksinev@yahoo.com>
Co-authored-by: derrek <derrek.haxx@yahoo.com>
2023-07-19 04:29:09 +09:00
HaoranYi 719ba8c84f
Add RedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted StakeError (#32522)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-18 12:52:40 -05:00
HaoranYi 88c52a5c05
Add stake flags struct (#32521)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-18 11:19:33 -05:00
Tao Zhu c69bc00f69
cost model could double count builtin instruction cost (#32422)
1. add tests to demo builtin cost could be double counted;
2. quick fix for now
2023-07-17 15:50:13 -05:00
HaoranYi 5408872476
test force reward interval end fn (#32513)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-17 15:37:10 -05:00
Yueh-Hsuan Chiang a2d9870678
[TieredStorage] Implementation of AccountIndexFormat for hot accounts (#32497)
#### Summary of Changes
This PR implements AccountIndexFormat::AddressAndOffset, the index format
that will be used by the hot account storage.

#### Test Plan
Unit tests are included in this PR.
Tested via the prototype implementation of tiered-storage.
2023-07-16 07:23:08 +08:00
Pankaj Garg 2a86420777
Move calculate_fee() out of bank.rs (#32409)
* Move calculate_fee() to fee.rs

* fixup code for compilation
2023-07-14 20:17:38 -07:00
Ashwin Sekar 8c480d6d2d
Update consensus docs (#32482)
Update tower-bft docs
2023-07-14 19:08:11 -07:00
behzad nouri cfb028819a
deprecates Signature::new in favor of Signature::{try_,}from (#32481) 2023-07-14 22:51:12 +00:00
Brooks 78230050fb
Fixes measure in log when calculating accounts hash (#32502) 2023-07-14 17:02:14 -04:00
Pankaj Garg 7177dd9809
Remove calculate_fee()'s dependency on ComputeBudget (#32487) 2023-07-14 12:25:04 -07:00